Ethereal-dev: Re: [Ethereal-dev] Crash after using IO-stat

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Tue, 13 Jan 2004 13:12:09 -0800

On Jan 13, 2004, at 2:14 AM, Biot Olivier wrote:

Open a capture file in Ethereal, open IO-stat, filter once. Now close
IO-stat. Apply a display filter. You get a crash.

The IO-stat code wasn't preserving the invariant "tap registered iff graph enabled"; the code to close the IO-stat window was assuming that invariant was true, and only unregistering taps for enabled graphs, so taps would be left around for disabled graphs when the window is closed, and those taps would be called if the display was filtered - unfortunately, the data structure for the tap, used by the tap's callbacks, had been freed when the IO-stat window was destroyed.

For some reason, filtering a graph in the IO-stat window disables the graph, so that led to the crash in question.

I've checked in changes to clean up the IO-stat code somewhat, including making it remove taps when a graph is disabled, to preserve the invariant in question.