This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: segfaults in MD_FROB_UPDATE_CONTEXT and MD_FALLBACK_FRAME_STATE_FOR


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]