This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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: RFC: Fix crash on i386 (%gs-)threaded programs using execve(2)


On Fri, Jul 21, 2006 at 08:15:57PM +0200, Jan Kratochvil wrote:
> Hi Daniel,
> 
> I am now copyright assignment compliant (as Red Hat employee).
> 
> The mail below was never replied; the patch still applies to the latest CVS.
> Could you please review it?

Turning on MAY_FOLLOW_EXEC is not a good idea.  No one really knows how
that behavior works, a lot of it doesn't, and the way it implicitly
changes the symbol file is very disorienting.  Please don't mix it up
with the fix for your current bug.

It seems to me that you need thread_db_wait to check for EXECD, and pop
the threading target off the stack when it happens.  Maybe, if you want
to be fancy, figure out the right place to push itself back on - but
that's more troublesome to get right.

unpush_target (&thread_db_ops);
using_thread_db = 0;
wipe the thread list?;
return some the underlying process pid;

-- 
Daniel Jacobowitz
CodeSourcery


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