From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alex =?utf-8?Q?Benn=C3=A9e?= Newsgroups: gmane.emacs.devel Subject: Debugging low level problems with Valgrind Date: Wed, 29 Jan 2014 09:04:04 +0000 Message-ID: <87r47r2m7v.fsf@linaro.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1390986260 26790 80.91.229.3 (29 Jan 2014 09:04:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 29 Jan 2014 09:04:20 +0000 (UTC) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 29 10:04:28 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W8R4M-00062J-T4 for ged-emacs-devel@m.gmane.org; Wed, 29 Jan 2014 10:04:27 +0100 Original-Received: from localhost ([::1]:41099 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8R4M-0000wQ-Fo for ged-emacs-devel@m.gmane.org; Wed, 29 Jan 2014 04:04:26 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53347) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8R4D-0000rZ-Th for emacs-devel@gnu.org; Wed, 29 Jan 2014 04:04:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W8R47-00046j-Tu for emacs-devel@gnu.org; Wed, 29 Jan 2014 04:04:17 -0500 Original-Received: from static.88-198-71-155.clients.your-server.de ([88.198.71.155]:46665 helo=socrates.bennee.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8R47-00045N-Nf for emacs-devel@gnu.org; Wed, 29 Jan 2014 04:04:11 -0500 Original-Received: from localhost ([127.0.0.1]) by socrates.bennee.com with esmtp (Exim 4.80) (envelope-from ) id 1W8R72-0000LL-6e for emacs-devel@gnu.org; Wed, 29 Jan 2014 10:07:12 +0100 User-agent: mu4e 0.9.9.6pre2; emacs 24.3.50.1 X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: kernel-hacker@bennee.com X-SA-Exim-Scanned: No (on socrates.bennee.com); SAEximRunCond expanded to false X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 88.198.71.155 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:169196 Archived-At: Hi, I'm currently trying to track down the rather annoying --daemon crash when I delete-frame (reported on list). As it's a access after free I thought I would try using valgrind to find where the free occurs (it's also sporadic, it doesn't happen every delete frame). So far I've had no joy getting valgrind to run. I've built with CFLAGS="-O0 0g3" ./configure --with-x-toolkit=lucid But valgrind keeps complaining when I run: --17777-- Contents of /proc/version: --17777-- Linux version 3.8.11 (chrome-bot@build31-m2) (gcc version 4.8.x-google 20130905 (prerelease) (4.8.1_cos_gg_b42cc22_4.8.1-r62) ) #1 SMP Thu Jan 23 19:39:17 PST 2014 --17777-- Arch and hwcaps: AMD64, amd64-cx16-rdtscp-sse3-avx --17777-- Page sizes: currently 4096, max supported 4096 --17777-- Valgrind library directory: /usr/lib/valgrind --17777-- Reading syms from /home/alex/src/emacs/emacs.git/src/emacs --17777-- WARNING: Serious error when reading debug info --17777-- When reading debug info from /home/alex/src/emacs/emacs.git/src/emacs: --17777-- Can't make sense of .data section mapping And then later on is finding stuff but can't resolv the symbols: ==17803== Invalid free() / delete / delete[] / realloc() ==17803== at 0x4C2C72E: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==17803== by 0x5A840B: ??? (in /home/alex/src/emacs/emacs.git/src/emacs) ==17803== by 0x59ED7A: ??? (in /home/alex/src/emacs/emacs.git/src/emacs) ==17803== by 0x5A748C: ??? (in /home/alex/src/emacs/emacs.git/src/emacs) ==17803== by 0x58D045: ??? (in /home/alex/src/emacs/emacs.git/src/emacs) ==17803== by 0x58D30A: ??? (in /home/alex/src/emacs/emacs.git/src/emacs) ==17803== by 0x58DD14: ??? (in /home/alex/src/emacs/emacs.git/src/emacs) ==17803== by 0x5F6B9A: ??? (in /home/alex/src/emacs/emacs.git/src/emacs) ==17803== by 0x5F72C9: ??? (in /home/alex/src/emacs/emacs.git/src/emacs) ==17803== by 0x5CEF1F: ??? (in /home/alex/src/emacs/emacs.git/src/emacs) ==17803== by 0x610E8B: ??? (in /home/alex/src/emacs/emacs.git/src/emacs) ==17803== by 0x5CF53E: ??? (in /home/alex/src/emacs/emacs.git/src/emacs) ==17803== Address 0x1014070 is not stack'd, malloc'd or (recently) free'd I'm wondering if I have a subtly busted toolchain or there are some other magic runes I should use to set emacs up for valgrinding. -- Alex Bennée