Ethereal-users: Re: [Ethereal-users] Fixes for crashes in tethereal version 9.0.x

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

From: Guy Harris <gharris@xxxxxxxxx>
Date: Fri, 28 Jun 2002 03:00:48 -0700
On Fri, Jun 21, 2002 at 06:16:45PM +0100, Ian Parker wrote:
> 1. tethereal crash on ctrl-C
> 
> Bug in capture_cleanup(int signum _U_) in tethereal.c:
> Call to
> 
> longjmp(ld.stopenv, 1);
> 
> crashes as ld.stopenv is an invalid address (it does not appear to have
> been initialised)

"ld.stopenv" is a jmp_buf, and it *is* initialized.

However, signal handlers execute in a separate thread, so you can't do a
"longjmp()" in a signal handler; *that's* why it crashes.

Fortunately, you don't need to do a "longjmp()" on Windows, so your fix:

> I have replaced this by:
> 
> ld.go = FALSE;
> 
> as described in the comment (0.8.x version included this statement
> rather than the longjmp)

works *on Windows*.  It does *not* work on many versions of UNIX, so the
fix I checked in still does the longjmp on UNIX (which *does* work), but
just sets "ld.go" to FALSE on Windows.

> 4. On at least Windows XP, tethereal crashes when no interface is
> specified.

I suspect this was fixed by Gerald Combs' recent checkin.