public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug tui/26036] New: GDB core dump TUI + rl
@ 2020-05-25  6:02 phi.debian at gmail dot com
  2020-05-27  5:58 ` [Bug tui/26036] " phi.debian at gmail dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: phi.debian at gmail dot com @ 2020-05-25  6:02 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=26036

            Bug ID: 26036
           Summary: GDB core dump TUI + rl
           Product: gdb
           Version: 9.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tui
          Assignee: unassigned at sourceware dot org
          Reporter: phi.debian at gmail dot com
  Target Milestone: ---

Hi Guru's

I bumped into this the other day.

GDB coming from ubuntu 20.04
GNU gdb (Ubuntu 9.1-0ubuntu1) 9.1

Or the one I built on ubuntu 20.04 with latest launchpad  (that one have nice
colorify btw)

I got no .gdbinit  and no .inputrc (to remove this from the equation)

Yet starting gdb on my helloworld program in -tui if I strike ^X^A from the
prompt it cores dump :(

PW$ gdb -tui ./c
[Strike ^X^A here]
Aborted (core dumped)

PW$ 

A brute core inspection (on my own build, so addr may vary) give this

Dunno if this helps, the BT shows
(gdb) bt
#0  0x00007f0c717c418b in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f0c717a3859 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x0000564770c3c2bc in handle_sigsegv (sig=11)
    at /ldev/gdb-9.1/gdb/event-top.c:884
#3  <signal handler called>
#4  0x00007f0c718044a5 in fwrite () from /lib/x86_64-linux-gnu/libc.so.6
#5  0x0000564770fcb990 in _rl_output_some_chars (
    string=0x564772173270 "(gdb) ", count=6)
    at /ldev/gdb-9.1/readline/readline/terminal.c:647
#6  0x0000564770fc3d75 in update_line (old=0x56477215d320 "",
    new=0x564772173270 "(gdb) ", current_line=0, omax=79, nmax=79,
    inv_botlin=0) at /ldev/gdb-9.1/readline/readline/display.c:2088

....

The offentding fwrite

   643   /* Write COUNT characters from STRING to the output stream. */
   644   void                                                          
   645   _rl_output_some_chars (const char *string, int count)        
B+ 646   {                                                            
  >647     fwrite (string, 1, count, _rl_out_stream);                  
   648   }                                                            
   649       

The _rl_output_some_chars() args.

(gdb) p string
$5 = 0x5555561c57d0 "(gdb) "
(gdb) p count
$6 = 6
(gdb) p _rl_out_stream
$7 = (FILE *) 0x0  <====== is that expected ?=====

I am not a GDB developer so I don't dare chasing why we got thsi NULL ptr and
where to patch.

Cheers,
Phi

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-06-09 19:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-25  6:02 [Bug tui/26036] New: GDB core dump TUI + rl phi.debian at gmail dot com
2020-05-27  5:58 ` [Bug tui/26036] " phi.debian at gmail dot com
2020-05-27  6:20 ` phi.debian at gmail dot com
2020-05-27  7:00 ` phi.debian at gmail dot com
2020-06-06 18:18 ` tromey at sourceware dot org
2020-06-09  7:43 ` phi.debian at gmail dot com
2020-06-09 10:41 ` phi.debian at gmail dot com
2020-06-09 17:27 ` cbiesinger at google dot com
2020-06-09 19:48 ` phi.debian at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).