From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2672 invoked by alias); 4 Jun 2018 20:25:34 -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 120290 invoked by uid 89); 4 Jun 2018 20:25:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=tuesday, Tuesday, encrypted, sk:complai 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 20:25:22 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 58D767D84D; Mon, 4 Jun 2018 20:25:14 +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 3B58720357CA; Mon, 4 Jun 2018 20:25:14 +0000 (UTC) From: Sergio Durigan Junior To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Possible regression on gdb.gdb/complaints.exp (was: Re: [RFA 0/9] Radically simplify the complaint system) References: <20180522050704.10845-1-tom@tromey.com> Date: Mon, 04 Jun 2018 20:25:00 -0000 In-Reply-To: <20180522050704.10845-1-tom@tromey.com> (Tom Tromey's message of "Mon, 21 May 2018 23:06:55 -0600") Message-ID: <87a7saz4d2.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/msg00079.txt.bz2 On Tuesday, May 22 2018, Tom Tromey wrote: > I must confess, I've long disliked the complaint system. It got in > the way a little bit, ages ago, when I tried to multi-thread the > psymtab reader. And, it got in the way a bit more during one of my > attempts to format the "Reading symbols" output more nicely (spoiler: > I have another approach to this in the works, but I took this detour > first). Aside from these things, the code also seemed unusually > complex for the task it performed. > > This series radically simplifies the complaint system. It removes > most of the code -- which, I think, has never really been used. > > Tested by the buildbot. I also locally tested complaints.exp with > each patch in the series. Hi Tom, While preparing a Fedora GDB release for rawhide, I stumbled upon a failure on gdb.gdb/complaints.exp. Here's what I see here: (gdb) PASS: gdb.gdb/complaints.exp: run until breakpoint at captured_command_loop set stop_whining = 2 (gdb) PASS: gdb.gdb/complaints.exp: set stop_whining = 2 set var $cstr = "Register a complaint" (gdb) PASS: gdb.gdb/complaints.exp: set var $cstr = "Register a complaint" call complaint_internal ($cstr) free(): invalid pointer Thread 1 "xgdb" received signal SIGSEGV, Segmentation fault. 0x00007ffff5c535ce in raise () from /lib64/libc.so.6 The program being debugged was signaled while in a function called from GDB. GDB remains in the frame where the signal was received. To change this behavior use "set unwindonsignal on". Evaluation of the expression containing the function (complaint_internal(char const*, ...)) will be abandoned. When the function is done executing, GDB will silently stop. While trying to reproduce it on my Fedora 27, I wasn't able to trigger the failures. Anyway, after a lot of time investigating this issue, I found that you have to use a recent GCC (git HEAD as of 2018-06-04, for example), and you have to compile GDB using -O2 -g. I'm not sure if this is a regression introduced by your patch, so I also ran a git-bisect on GCC and found the following possible culprit: ea5d398198b93e37e9a343dfdb7660f71fdca404 is the first bad commit commit ea5d398198b93e37e9a343dfdb7660f71fdca404 Author: hubicka Date: Thu Oct 19 20:19:15 2017 +0000 Not sure if it makes sense... Anyway, I'm reporting because I thought it was the right thing to do. As per IRC discussions recently, I know gdb.gdb/ is fragile and one idea (by Tom) is to replace it by selftests. Thanks, -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible http://sergiodj.net/