From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4562 invoked by alias); 18 Jan 2015 05:25:57 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 4546 invoked by uid 89); 18 Jan 2015 05:25:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f180.google.com Received: from mail-wi0-f180.google.com (HELO mail-wi0-f180.google.com) (209.85.212.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sun, 18 Jan 2015 05:25:52 +0000 Received: by mail-wi0-f180.google.com with SMTP id bs8so10570558wib.1 for ; Sat, 17 Jan 2015 21:25:49 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.180.211.169 with SMTP id nd9mr21625214wic.4.1421558749184; Sat, 17 Jan 2015 21:25:49 -0800 (PST) Received: by 10.27.39.198 with HTTP; Sat, 17 Jan 2015 21:25:49 -0800 (PST) Date: Sun, 18 Jan 2015 05:25:00 -0000 Message-ID: Subject: ada symbol lookup cache: disable for 7.9? From: Doug Evans To: Joel Brobecker Cc: "gdb-patches@sourceware.org" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-01/txt/msg00505.txt.bz2 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. :-)