bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#39962: 27.0.90; Crash in Emacs 27.0.90


From: Pip Cet
Subject: bug#39962: 27.0.90; Crash in Emacs 27.0.90
Date: Sat, 14 Mar 2020 15:34:14 +0000

On Sat, Mar 14, 2020 at 9:16 AM Pip Cet <pipcet@gmail.com> wrote:
> I don't think it's desirable as default behavior, at this point. It
> seems not entirely trivial to get it to work, at least in the case
> where system libraries aren't built with -fsplit-stack.

It turns out my problems were due to vfork, which doesn't appear to
work with -fsplit-stack and non-split-stack libraries.

The attached patch works, but it appears the standard behavior of
-fsplit-stack is to allocate the stack one page at a time, so it runs
into Linux system limits after 128K stack pages (with guard pages).
That corresponds to somewhere between 4M and 8M symbols in the linked
list, using my test program.

To make this work, configure with CFLAGS="-fsplit-stack", edit
config.h to define USE_SPLIT_STACK and #define vfork fork.

Note that this version marks the entire mapped stack, not just the
area that is actually used; that should be easy enough to fix, but it
doesn't appear to cause any immediate problems.

So, in summary, it's possible to get it to work, but you have to work
around the vfork limitation, and it doesn't help all that much because
the allocation strategy needs to be adjusted, and even then it would
need some extra work not to mark stack areas that were once used but
now aren't.

Attachment: 0001-split-stack-support.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]