Possible regression on gdb.gdb/complaints.exp (was: Re: [RFA 0/9] Radically simplify the complaint system)
Sergio Durigan Junior
sergiodj@redhat.com
Mon Jun 4 20:25:00 GMT 2018
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 <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
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/
More information about the Gdb-patches
mailing list