Subject: Re: bug#5847: ETAGS: Segmentation fault, because of incorrect scope presumption

From: Ivan Shmakov <[email-masked]>
Date: Sat, 20 Aug 2016 17:57:34 +0000

>>>>> Eli Zaretskii <[email-masked]> writes:

[…]

 > 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.  A workaround is to build Etags with a
 > larger stack.

	If it’s the OS stack we’re talking about, the limit on its size
	may very well be a run-time parameter on Unix-like systems;
	check the ‘ulimit’ shell command, for instance.

	E. g., for Bash on GNU/Linux:

$ ulimit -Ss ; ulimit -Hs 
5604
unlimited
$ ulimit -s 65536 
$ ulimit -Ss 
65536
$ 

-- 
FSF associate member #7257  http://am-1.org/~ivan/      … 3013 B6A0 230E 334A