This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH: toplev.c] PR jit/64721: don't install signal-handlers when running within libgccjit
- From: Jakub Jelinek <jakub at redhat dot com>
- To: David Malcolm <dmalcolm at redhat dot com>
- Cc: jit at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Thu, 22 Jan 2015 22:28:53 +0100
- Subject: Re: [PATCH: toplev.c] PR jit/64721: don't install signal-handlers when running within libgccjit
- Authentication-results: sourceware.org; auth=none
- References: <1421880243-21485-1-git-send-email-dmalcolm at redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Jan 21, 2015 at 05:44:03PM -0500, David Malcolm wrote:
> Don't install signal handlers in toplev.c if we're called from libgccjit,
> only install them if we're called from main.c, thus avoiding
> touching process-wide state from a shared library (see the PR for
> details of how this is currently leading to SIGSEGV on errors in
> "make check-jit").
>
> Is this one sufficiently obvious to still be applicable in stage 4?
> (assuming bootstrap?)
>
> gcc/ChangeLog:
> PR jit/64721
> * main.c (main): Construct toplev instances with init_signals=true.
> * toplev.c (general_init): Add param "init_signals", and use it to
> conditionalize the calls to signal and host_hooks.extra_signals.
> (toplev::toplev): Add param "init_signals".
> (toplev::main): When invoking general_init, pass m_init_signals
> to control whether signal-handlers are installed.
> * toplev.h (toplev::toplev): Add param "init_signals".
> (toplev::m_init_signals): New field.
>
> gcc/jit/ChangeLog:
> PR jit/64721
> * jit-playback.c (gcc::jit::playback::context::compile): Construct
> toplev instances with init_signals=false.
Ok for stage4.
Jakub