This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: segfaults in MD_FROB_UPDATE_CONTEXT and MD_FALLBACK_FRAME_STATE_FOR
- From: Jakub Jelinek <jakub at redhat dot com>
- To: gcc at gcc dot gnu dot org
- Cc: drepper at redhat dot com
- Date: Tue, 31 Aug 2004 05:44:30 +0200
- Subject: Re: segfaults in MD_FROB_UPDATE_CONTEXT and MD_FALLBACK_FRAME_STATE_FOR
- References: <20040830023443.GE24853@bubble.modra.org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Aug 30, 2004 at 12:04:44PM +0930, Alan Modra wrote:
> Executive summary:
> A call to nptl pthread_exit can cause a segfault if a function in a
> dlclose'd shared lib is somewhere in the pthread_exit call chain.
> Testcase attached that demonstrates the problem on powerpc64-linux.
>
> My first reaction on seeing the bug report that complained about this
> problem was "Well, don't do that!", but after properly investigating
> I'm reasonably convinced this is a real bug. At least, a target that
> doesn't use MD_FROB_UPDATE_CONTEXT or MD_FALLBACK_FRAME_STATE_FOR will
> quite happily work with the testcase.
I think this is definitely a don't do that situation.
As pthread_exit must be able to run all cleanups in the backtrace
which called it, all functions in the backtrace simply must be available
at the time pthread_exit is called.
IMHO working around application bugs is not necessary.
Jakub