Re: [PATCH] Throw an exception when mutating read-only data

2017-04-14 Thread Andy Wingo
Hi Pedro, On Mon 03 Apr 2017 12:49, Pedro Alves writes: > AFAICS, guile uses bare setjmp/longjmp for exceptions. > > But, one should not use longjmp to jump out of a signal handler, since > that leaves the signal mask disabled if the system automatically masks > the signal on handler entry (whic

Re: [PATCH] Throw an exception when mutating read-only data

2017-04-14 Thread Andy Wingo
Hi :) On Sun 02 Apr 2017 17:34, Derek Upham writes: > Andy Wingo writes: > >> * libguile/init.c (scm_i_init_guile): Install the SIGSEGV handler unless >> GUILE_INSTALL_SIGSEGV_HANDLER is 0. >> * libguile/loader.c >> (scm_maybe_throw_exception_for_mutation_of_read_only_data): New public >>

Re: [PATCH] Throw an exception when mutating read-only data

2017-04-03 Thread Pedro Alves
Hi Andy, I'm mostly clueless on Guile's internals, but this patch caught my eye, given the potential for conflict with GDBs use of libguile. On 04/02/2017 11:11 AM, Andy Wingo wrote: > +void > +scm_maybe_throw_exception_for_mutation_of_read_only_data (void *addr) > +{ > + if (!find_mapped_elf_i

Re: [PATCH] Throw an exception when mutating read-only data

2017-04-02 Thread Derek Upham
Andy Wingo writes: > * libguile/init.c (scm_i_init_guile): Install the SIGSEGV handler unless > GUILE_INSTALL_SIGSEGV_HANDLER is 0. > * libguile/loader.c > (scm_maybe_throw_exception_for_mutation_of_read_only_data): New public > function. > (sigsegv_handler): New helper. > (scm_install_

[PATCH] Throw an exception when mutating read-only data

2017-04-02 Thread Andy Wingo
* libguile/init.c (scm_i_init_guile): Install the SIGSEGV handler unless GUILE_INSTALL_SIGSEGV_HANDLER is 0. * libguile/loader.c (scm_maybe_throw_exception_for_mutation_of_read_only_data): New public function. (sigsegv_handler): New helper. (scm_install_sigsegv_handler): New public functi