Re: Callbacks to Lisp from C (and SIGSEGV handling)
Douglas Katzman via Sbcl-help <[email protected]> Sat, 22 Mar 2025 14:48:10 -0400
| Newsgroups | gmane.lisp.steel-bank.general |
|---|---|
| Message-ID | <CAOrNasyiuJspq2jrMGJ62XLkHO3UszTB0V4h9aw=sDx7RdQSoA@mail.gmail.com> |
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