From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26007 invoked by alias); 4 Jun 2018 23:29:23 -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 25962 invoked by uid 89); 4 Jun 2018 23:29:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=freed X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 04 Jun 2018 23:29:20 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 34A67407539C; Mon, 4 Jun 2018 23:29:19 +0000 (UTC) Received: from localhost (unused-10-15-17-196.yyz.redhat.com [10.15.17.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id 15C40111AF09; Mon, 4 Jun 2018 23:29:19 +0000 (UTC) From: Sergio Durigan Junior To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: Possible regression on gdb.gdb/complaints.exp References: <20180522050704.10845-1-tom@tromey.com> <87a7saz4d2.fsf@redhat.com> <87lgbu44h6.fsf@tromey.com> Date: Mon, 04 Jun 2018 23:29:00 -0000 In-Reply-To: <87lgbu44h6.fsf@tromey.com> (Tom Tromey's message of "Mon, 04 Jun 2018 15:38:29 -0600") Message-ID: <87sh62xh9t.fsf@redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2018-06/txt/msg00087.txt.bz2 On Monday, June 04 2018, Tom Tromey wrote: >>>>>> "Sergio" == Sergio Durigan Junior writes: > > Sergio> (gdb) PASS: gdb.gdb/complaints.exp: run until breakpoint at captured_command_loop > Sergio> set stop_whining = 2 > Sergio> (gdb) PASS: gdb.gdb/complaints.exp: set stop_whining = 2 > Sergio> set var $cstr = "Register a complaint" > Sergio> (gdb) PASS: gdb.gdb/complaints.exp: set var $cstr = "Register a complaint" > Sergio> call complaint_internal ($cstr) > Sergio> free(): invalid pointer > > This seems fishy. I wonder if debugging gdb running under valgrind > would show anything interesting. I did try that this weekend, but it hasn't gotten me very far. What I did was to start a valgrind gdbserver debugging ./gdb/gdb, and then attach a GDB to it (also debugging ./gdb/gdb). When the abort happens, valgrind doesn't report something useful: ==6539== TO DEBUG THIS PROCESS USING GDB: start GDB like this ==6539== /path/to/gdb ./gdb/gdb ==6539== and then give GDB the following command ==6539== target remote | /usr/lib64/valgrind/../../bin/vgdb --pid=6539 ==6539== --pid is optional if only one valgrind process is running ==6539== ==6539== Jump to the invalid address stated on the next line ==6539== at 0x0: ??? ==6539== Address 0x0 is not stack'd, malloc'd or (recently) free'd Strangely enough, I also tried doing some printf-debugging on complaint_internal, but nothing is printed. -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/