unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Derek Upham <sand@blarg.net>
To: Andy Wingo <wingo@pobox.com>
Cc: guile-devel@gnu.org
Subject: Re: [PATCH] Throw an exception when mutating read-only data
Date: Sun, 02 Apr 2017 08:34:26 -0700	[thread overview]
Message-ID: <87a87y962l.fsf@priss.frightenedpiglet.com> (raw)
In-Reply-To: <20170402101131.10387-1-wingo@pobox.com>

Andy Wingo <wingo@pobox.com> 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_sigsegv_handler): New public function.
> * libguile/loader.h: Declare new API.

That doesn’t support systems without HAVE_SIGACTION.  Do we assume HAVE_SIGACTION for all systems these days?

The handler setup code is outside of scmsig.c, so there will be conflicts with the save/restore mechanisms.  For example, scm_restore_signals won’t re-establish that handler.

Derek

-- 
Derek Upham
sand@blarg.net



  reply	other threads:[~2017-04-02 15:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-02 10:11 [PATCH] Throw an exception when mutating read-only data Andy Wingo
2017-04-02 15:34 ` Derek Upham [this message]
2017-04-14  8:44   ` Andy Wingo
2017-04-03 10:49 ` Pedro Alves
2017-04-14  9:04   ` Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a87y962l.fsf@priss.frightenedpiglet.com \
    --to=sand@blarg.net \
    --cc=guile-devel@gnu.org \
    --cc=wingo@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).