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: [patch] Fix ASAN crash for gdb.compile/compile.exp


Jan Kratochvil <jan.kratochvil@redhat.com> writes:

> Now compile_object_run() called from line
> 	(gdb) compile code puts("hello")
> has finished for a long time.  But we still need to have that injected code
> OBJFILE valid when GDB is executing it.  Therefore OBJFILE is freed only from
> destructor of the frame #1.

Hmm, you are right.

>
> At the patched line of call_function_by_hand_dummy() the dummy frame
> destructor has not yet been run but it will be run before the fetched NAME
> will get used.
>
> In fact I do not see now how to fix it differently than what the patch does.

Your patch is fine by me.

-- 
Yao (éå)


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