Subject: Re: bug#5847: [Hubert Gosselmeyer] Re: bug#5847: ETAGS: Segmentation fault, because of incorrect scope presumption

From: Eli Zaretskii <[email-masked]>
Date: Sat, 20 Aug 2016 19:27:21 +0300

> Date: Sat, 20 Aug 2016 18:55:36 +0300
> From: Eli Zaretskii <[email-masked]>
> Cc: [email-masked]
> 
> 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.

OTOH, the program in question is 91MB of invalid C, so I guess fixing
this is not very urgent.