This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug ada/17854] Nothing sets pspace_data->sym_cache?
- From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Mon, 02 Feb 2015 03:32:15 +0000
- Subject: [Bug ada/17854] Nothing sets pspace_data->sym_cache?
- Auto-submitted: auto-generated
- References: <bug-17854-4717 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=17854
--- Comment #4 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Joel Brobecker <brobecke@sourceware.org>:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=66c168ae56fa2d67f821ccae774fd25c695fd9ce
commit 66c168ae56fa2d67f821ccae774fd25c695fd9ce
Author: Joel Brobecker <brobecker@adacore.com>
Date: Mon Feb 2 07:20:58 2015 +0400
[Ada] pspace_data->sym_cache is always NULL
The Ada symbol cache has been designed to have one instance of that
of that cache per program space, and for each instance to be created
on-demand. ada_get_symbol_cache is the function responsible for both
lookup and creation on demand.
Unfortunately, ada_get_symbol_cache forgot to store the reference
to newly created caches, thus causing it to:
- Leak old caches;
- Allocate a new cache each time the cache is being searched or
a new entry is to be inserted.
This patch fixes the issue by avoiding the use of the local variable,
which indirectly allowed the bug to happen. We manipulate the reference
in the program-space data instead.
gdb/ChangeLog:
PR gdb/17854:
* ada-lang.c (ada_get_symbol_cache): Set pspace_data->sym_cache
when allocating a new one.
--
You are receiving this mail because:
You are on the CC list for the bug.