Re: [patch] Fix ASAN crash for gdb.compile/compile.exp

Yao Qi
2015-05-19T13:43:13Z

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 (齐尧)