From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Throw an exception when mutating read-only data Date: Fri, 14 Apr 2017 10:44:00 +0200 Message-ID: <87a87j8jlb.fsf@pobox.com> References: <20170402101131.10387-1-wingo@pobox.com> <87a87y962l.fsf@priss.frightenedpiglet.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1492159608 2535 195.159.176.226 (14 Apr 2017 08:46:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 14 Apr 2017 08:46:48 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: guile-devel@gnu.org To: Derek Upham Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Apr 14 10:46:44 2017 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cywsK-0000VF-04 for guile-devel@m.gmane.org; Fri, 14 Apr 2017 10:46:40 +0200 Original-Received: from localhost ([::1]:52366 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cywsP-0004cO-HP for guile-devel@m.gmane.org; Fri, 14 Apr 2017 04:46:45 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58552) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cywpx-0003EG-AJ for guile-devel@gnu.org; Fri, 14 Apr 2017 04:44:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cywpu-0003F4-6s for guile-devel@gnu.org; Fri, 14 Apr 2017 04:44:13 -0400 Original-Received: from pb-sasl1.pobox.com ([64.147.108.66]:52755 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cywpu-0003Er-2o for guile-devel@gnu.org; Fri, 14 Apr 2017 04:44:10 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 65DD36F5F9; Fri, 14 Apr 2017 04:44:08 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=sasl; bh=VYOYFe1QlToe n1TPvvYb6/hCrZc=; b=WmJw52ZmW2JoqF9s9i33Ox5XMOVVzlz071sic3t4SFNG wrDh50c8HIUAQvdLUAU+KoGhzX0EHDXgxBJwIQAkVJ0H7RItLJG+WEmlUc1mVVIB xHThkr2ATr9V8Dx+O4yEdKZm+21RZ3pWpRMXY/a+wALAdyE+mCup6NGW5QRANRM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=sasl; b=Z2Y6UP QLPrAOaerNov80QC9AVpl9bkBI6egtZCyBBXXtK8jRfy4zuHZFbmq/NbVuois6Mh WcpHdUPgCnMDP5V7KsRlSbU4/fp/FXAaHd2wTdFxeYsmnU+BMVNOG0FLb5G2+9Sk CnhmOvJ5IjA1kJxUuo3Skx5GPwQig3jtSuRXg= Original-Received: from pb-sasl1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 5E4496F5F8; Fri, 14 Apr 2017 04:44:08 -0400 (EDT) Original-Received: from clucks (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl1.pobox.com (Postfix) with ESMTPSA id 6CCEB6F5F7; Fri, 14 Apr 2017 04:44:07 -0400 (EDT) In-Reply-To: <87a87y962l.fsf@priss.frightenedpiglet.com> (Derek Upham's message of "Sun, 02 Apr 2017 08:34:26 -0700") X-Pobox-Relay-ID: 85CEB4FE-20EE-11E7-A3DA-07D2064AB293-02397024!pb-sasl1.pobox.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 64.147.108.66 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.org gmane.lisp.guile.devel:19103 Archived-At: 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 >> function. >> (sigsegv_handler): New helper. >> (scm_install_sigsegv_handler): New public function. >> * libguile/loader.h: Declare new API. > > That doesn=E2=80=99t support systems without HAVE_SIGACTION. Do we assume > HAVE_SIGACTION for all systems these days? I think we use Gnulib to ensure that sigaction is available, at least as a wrapper. On the other hand apparently that doesn't ensure that SA_SIGINFO is available on mingw :/ Too bad. If we find a way to make this work reliably on POSIX I guess we could have it work there but not yet on mingw. > 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=E2=80=99t re-establish that handler. Good point! It seems this patch is but half-baked :) Andy