Re: posix_spawn

"Kirill A. Korinsky" <[email protected]>
Newsgroups gmane.lisp.gcl.devel
Message-ID <[email protected]>
Hello!

> On 24. Dec 2023, at 15:17, Camm Maguire <[email protected]> wrote:
> 
> "Kirill A. Korinsky" <[email protected]> writes:
> 
>> Thus, additionaly I've added patch below to catch the real place where it crashes:
>> 
>> --- o/main.c
>> +++ o/main.c
>> @@ -665,10 +665,10 @@ main(int argc, char **argv, char **envp) {
>> /* catch certain signals */
>> void install_segmentation_catcher(void)
>> {
>> -  unblock_signals(SIGSEGV,SIGSEGV);
>> -  unblock_signals(SIGBUS,SIGBUS);
>> -  (void) gcl_signal(SIGSEGV,segmentation_catcher);
>> -  (void) gcl_signal(SIGBUS,segmentation_catcher);
>> +/*   unblock_signals(SIGSEGV,SIGSEGV); */
>> +/*   unblock_signals(SIGBUS,SIGBUS); */
>> +/*   (void) gcl_signal(SIGSEGV,segmentation_catcher); */
>> +/*   (void) gcl_signal(SIGBUS,segmentation_catcher); */
>> }
>> 
> 
> A new issue specific to arm?  Where does it fail without this?

Not as far as I recall. I have the same behaviour on macOS 12 x86_64.

This patch allows to ignore GCL's error handler which masks real stacktrace and simple says "Segmentation violation" without any trace, instead an application failed and OS catches it and makes nice crash report which allows to investigate where.
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE3/KLNtcfWfLw7JxqmNjZhndZIm4FAmWIP0QACgkQmNjZhndZ
Im5jPxAAmrE+PGc7S8YOFS4fZE48uQTkgfMMeZVXGZ+0JFXWzPDhzdgtUnPM4wzJ
t1OGn2WQsK9eseTMUpTJpgmBMc1my5+KWBAp8jwikkBqy/IYv7yfN0YD8oaWuUvL
13bpDl4DnYBGcPNwZ19C37RQ+Eari86GB9M3pdnDr6vxDZ6PqtD/hM0FiQBCF6NB
NQY3t8xmz06uqV4BQpbaU26/TiD+C0s0oJczfMAh34oc9TwwymVjBO/AAr/A/cKe
ihMuj+611R1gxO9FGrtU95FF/Km3wjt7g23MCq4xgYoYqiCSpVeQqQgEQfwumYB/
J3H9U1XELifuKWyE0z2EvHO8vu2duK4p2z5yMriLm9uM4UkzRj9/F7JnHC3/WoOf
SqnTgjgrqIerKIqr4eW485QSQusuk6+OFUneZJcoRavqEkunWimEvWjbdc8TMPrE
T2tPUcJRql7daNQUnZd13m/W9VjoaCONAhnsx7UWYHEL4FwacOykFg4vdoBeyU5s
XCosndrpR+/D/y0l5nKg62e0b7xpF43guYihOd51bMl/fWqx1LKxQWcGL+th7dC4
dzbRh2UFmbLDE9rcM56Pee86hyrr1hf2sXNdzFwe6q9eVe/I7jXC96kbN7g3GHLg
3KVuPHGBCxdHqGz/JQcMI0EI/pERdC74JBctHZZ1qW3g/miEkKQ=
=AhAO
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.