Re: Callbacks to Lisp from C (and SIGSEGV handling)

Stas Boukarev <[email protected]> Sat, 22 Mar 2025 22:35:22 +0300
Newsgroups gmane.lisp.steel-bank.general
Message-ID <CAF63=13XG41UNPDdwOdtdXYiCLYcpFFFTfvWpdxQ=wtv+fS+jw@mail.gmail.com>
All well until the parent process starts claiming SIG_STOP_FOR_GC for itself.

On Sat, Mar 22, 2025 at 9:50 PM Douglas Katzman via Sbcl-help
<[email protected]> wrote:
>
> There is restore_sbcl_signals() in the C runtime.  But using it sounds like a bad idea to me. Since signal handlers are not per-thread, there's no way to make this reliable. An SBCL-internal thread (of which there is at least one, but could be more) could do an operation that receives sigsegv while some random thread called the C thing that changed the handler. The SBCL thread will probably react badly to having the wrong handler called.
> On a more positive note, we are almost at the point where there is no need for sigsegv. Most of the so-called dynamic space does not use it.  I have to remove sigsegv for tracking writes to slots of symbols, and there's not a lot else. (One other object type, falling under "not a lot else").  Maybe by the next SBCL release (April, not the pending one), I can complete the work needed to confine use of sigsegv for actual faults and not "normal" activity.
> _______________________________________________
> Sbcl-help mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/sbcl-help


_______________________________________________
Sbcl-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sbcl-help