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]

ada symbol lookup cache: disable for 7.9?


Hi.

Just a heads up that I've filed three bugs related to ada's symbol lookup cache.
I happened on the first one, 17854, while trying to see why my testcase to
exercise the failure I'd expect from 17855 wasn't working.
It turns out that ada-lang.c accidently never uses its symbol lookup
cache (AFAICT!).
Rather, it will create a new one for each lookup, not recording the
cache in pspace_data,
and leaking the memory.

Once I fixed 17854 I verified 17855 is real, though I don't yet have a
testcase that crashes gdb
(we should add some sort of deterministic assert that the cache has
been flushed after symbols have been reloaded).

I then found 17856, which is that now that the cache is being used, I
see ada-lang.c
trying to save back in the cache a symbol it just found in the cache.
I stopped looking at this point.

Anyways, given that until now ada's symbol lookup cache has never been used,
if we turn it on I'm not sure if there aren't more bugs, and to fix
the mem-leak for 7.9
(which happens for every non-local symbol lookup IIUC), maybe it'd be
safer to disable the cache.

https://sourceware.org/bugzilla/show_bug.cgi?id=17854
https://sourceware.org/bugzilla/show_bug.cgi?id=17855
https://sourceware.org/bugzilla/show_bug.cgi?id=17856

btw, I'm totally ok with not including the general symbol lookup cache in 7.9.
I thought it was sufficiently robust, but once I found 17855 I had to
reassess that. :-)


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