Subject: Re: bug#30675: Ask the user what to do when shr-make-table: Variable binding depth exceeds max-specpdl-size

From: Noam Postavsky <[email-masked]>
Date: Fri, 13 Apr 2018 08:15:53 -0400

Lars Ingebrigtsen <[email-masked]> writes:

> Hm...  On what architectures is there a potential for a C stack
> overflow?  I thought that these days, C stack overflows basically didn't
> happened, and we only had the max-specpdl-size as a sanity check to
> avoid deep lisp backtraces and stuff, but I may well have misunderstood
> things.

The default stack size soft ulimit on GNU/Linux seems to be 8MB, Emacs
tries to increase the limit by some fixed amount.  It can be set to
unlimited (I wouldn't expect most users to do that though).  On macOS,
there seems to be a hard limit of 64MB, so setting to unlimited doesn't
work.

Recent changes to Emacs have caused `read' to use more stack space, so
it's definitely possible to hit the limits when reading a deeply nested
structure (see bugs #27571 and #27779).  Not sure how likely it is when
reading deeply nested HTML, but I'm sure if you increase
max-specpdl-size enough with the right HTML page you can manage it :)