Saturday, January 28, 2023

Re: lang/sbcl will not work with x-only

On 2023/01/28 12:33:29 +0000, Stuart Henderson <stu@spacehopper.org> wrote:
> (Also while on the subject of sbcl, we still have "map stack for pid XX
> failed" in dmesg when it runs; I don't know how bad that is but sbcl is
> the only program which gets run during an i386 ports build which does
> that).

it's not too bad but neither good. sbcl calls sigaltstack to have
signals delivered on the stack of the "control thread". Now, that
thread stack is mmap'ed as RWX (as all allocations done by sbcl via
os_validates) and thus fails with sigaltstack.

at runtime i'm not too sure what happens. I've tested some ncurses
programs and guess SIGWINCH (at least) is handled correctly. A dummy
program with an infinite loop that triggers a stack overflow dies with
SIGILL now, where before was still dying but due to sbcl erroring.

I had a wip diff to use a fresh RX page for the sigaltstack handling
that seemed to work, but got stuck at trying to figuring out how the
sbcl' backtrace interacts with the control thread and got nowhere.

No comments:

Post a Comment