GNU bug report logs - #5847
ETAGS: Segmentation fault, because of incorrect scope presumption

Previous Next

Package: emacs;

Reported by: Hubert Gosselmeyer <gosselmeyer <at> googlemail.com>

Date: Tue, 6 Apr 2010 13:46:01 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #31 received at 5847-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: agrambot <at> gmail.com
Cc: gosselmeyer <at> googlemail.com, 5847-done <at> debbugs.gnu.org
Subject: Re: bug#5847: [Hubert Gosselmeyer] Re: bug#5847: ETAGS: Segmentation
 fault, because of incorrect scope presumption
Date: Wed, 31 Aug 2016 18:59:20 +0300
> Date: Sat, 20 Aug 2016 19:27:21 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 5847 <at> debbugs.gnu.org, Hubert Gosselmeyer <gosselmeyer <at> googlemail.com>
> 
> > Date: Sat, 20 Aug 2016 18:55:36 +0300
> > From: Eli Zaretskii <eliz <at> gnu.org>
> > Cc: 5847 <at> debbugs.gnu.org
> > 
> > That file blows up the runtime stack because of recursive calls to
> > put_entries when etags writes out the tree of nodes it collected.
> > Since recovery from stack overflow is inherently OS dependent and
> > unreliable, I don't see what we can do in this case.  Even if we do
> > detect the upcoming stack overflow, the only thing we can do is print
> > an error message and quit.
> 
> Actually, one way of avoiding stack overflow would be to use some BFS
> algorithm that allocates memory off the heap.  Patches welcome.

I've done that now and committed the changes on the master branch.
The resulting etags successfully tagged a dozen of large source trees
together, whereas the original version crashed quite quickly.  The
test file posted here also no longer causes a crash.

The non-recursive version is somewhat slower, so patches to speed it
up are welcome.

I'm closing this bug.




This bug report was last modified 8 years and 319 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.