From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 359 invoked by alias); 2 Feb 2015 03:40:42 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 329 invoked by uid 55); 2 Feb 2015 03:40:41 -0000 From: "cvs-commit at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug ada/17854] Nothing sets pspace_data->sym_cache? Date: Mon, 02 Feb 2015 03:40:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: ada X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-q1/txt/msg00167.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=17854 --- Comment #5 from cvs-commit at gcc dot gnu.org --- The gdb-7.9-branch branch has been updated by Joel Brobecker : https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=19a5737950b966d0ff3e50c01bb43742a870bb9e commit 19a5737950b966d0ff3e50c01bb43742a870bb9e Author: Joel Brobecker 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.