public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug tui/14159] New: Tui Segfault
@ 2012-05-24  8:02 ducksource at duckpond dot ch
  2012-05-24  9:31 ` [Bug tui/14159] Segfault during quit, if Tui enabled ducksource at duckpond dot ch
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: ducksource at duckpond dot ch @ 2012-05-24  8:02 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=14159

             Bug #: 14159
           Summary: Tui Segfault
           Product: gdb
           Version: 7.1
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tui
        AssignedTo: unassigned@sourceware.org
        ReportedBy: ducksource@duckpond.ch
    Classification: Unclassified


Getting a segfault during quit routine if TUI is active..

++++ System +++++++
$ uname -a
Linux <<<<NAME>>>> 3.3.6-1-ARCH #1 SMP PREEMPT Sun May 13 10:52:32 CEST 2012
x86_64 GNU/Linux
$ gdb --version
GNU gdb (GDB) 7.4.1
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>

++++Reproduce++++++
$ gdb ./prog
GNU gdb (GDB) 7.4.1
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from <<<<path shorthened>>>>/prog...done.
(gdb) layout asm

<<<<TUI / ASM thingy starts>>>>

Cannot access memory at address 0x400176
(gdb) break _start
Breakpoint 1 at 0x400110
(gdb) r
Starting program: <<<<path shorthened>>>>/prog 

Breakpoint 1, 0x0000000000400110 in _start ()
(gdb) q
q
A debugging session is active.
        Inferior 1 [process 22497] will be killed.

Quit anyway? (y or n) <<<<ENTER>>>>

Please answer y or n. <<<<ENTER>>>>
@(F^A(y or n) 

Please answer y or n. <<<<ENTER>>>>
(y or n) 

Please answer y or n. <<<<ENTER>>>>
@(F^A(y or n) 

Please answer y or n. <<<<ENTER>>>>
Segmentation fault

++++GDB in GDB++++++
(gdb) bt
#0  0x00007ffff6eeb435 in vfprintf () from /lib/libc.so.6
#1  0x00007ffff6f15c44 in vasprintf () from /lib/libc.so.6
#2  0x000000000042337d in xstrvprintf (format=format@entry=0x7ca097 "%s",
ap=ap@entry=0x7fffffffe408) at ./common/common-utils.c:129
#3  0x0000000000413ab1 in vfprintf_maybe_filtered (stream=0xb50770,
format=format@entry=0x7ca097 "%s", args=args@entry=0x7fffffffe408, filter=1,
filter=1) at utils.c:2408
#4  0x0000000000413af7 in vfprintf_filtered (stream=<optimized out>,
format=format@entry=0x7ca097 "%s", args=args@entry=0x7fffffffe408) at
utils.c:2418
#5  0x000000000048fe30 in tui_query_hook (msg=0x7ca097 "%s",
argp=0x7fffffffe408) at ./tui/tui-hooks.c:79
#6  0x000000000041417e in query (ctlstr=ctlstr@entry=0x7ca097 "%s") at
utils.c:1546
#7  0x0000000000410794 in quit_confirm () at top.c:1264
#8  0x0000000000481658 in quit_command (args=0x0, from_tty=1) at
./cli/cli-cmds.c:335
#9  0x000000000041028d in execute_command (p=0xa94161 "", p@entry=0xa94160 "q",
from_tty=1) at top.c:441
#10 0x000000000051a664 in command_handler (command=0xa94160 "q") at
event-top.c:435
#11 0x000000000051b02c in command_line_handler (rl=<optimized out>) at
event-top.c:636
#12 0x00000000005f69f9 in rl_callback_read_char () at callback.c:220
#13 0x000000000051a6c9 in rl_callback_read_char_wrapper (client_data=<optimized
out>) at event-top.c:169
#14 0x0000000000519536 in process_event () at event-loop.c:401
#15 process_event () at event-loop.c:351
#16 0x0000000000519c5f in gdb_do_one_event () at event-loop.c:453
#17 0x0000000000519e15 in start_event_loop () at event-loop.c:490
#18 0x0000000000407933 in captured_command_loop (data=data@entry=0x0) at
./main.c:232
#19 0x000000000051425e in catch_errors (func=func@entry=0x407920
<captured_command_loop>, func_args=func_args@entry=0x0,
errstring=errstring@entry=0x6b16b8 "", mask=mask@entry=6) at exceptions.c:502
#20 0x0000000000408616 in captured_main (data=data@entry=0x7fffffffe820) at
./main.c:942
#21 0x000000000051425e in catch_errors (func=func@entry=0x407a10
<captured_main>, func_args=func_args@entry=0x7fffffffe820,
errstring=errstring@entry=0x6b16b8 "", mask=mask@entry=6) at exceptions.c:502
#22 0x00000000004088a4 in gdb_main (args=args@entry=0x7fffffffe820) at
./main.c:951
#23 0x00000000004076fe in main (argc=<optimized out>, argv=<optimized out>) at
gdb.c:34
(gdb) frame 2
#2  0x000000000042337d in xstrvprintf (format=format@entry=0x7ca097 "%s",
ap=ap@entry=0x7fffffffe408) at ./common/common-utils.c:129
129      int status = vasprintf (&ret, format, ap);
(gdb) list
124    
125    char *
126    xstrvprintf (const char *format, va_list ap)
127    {
128      char *ret = NULL;
129      int status = vasprintf (&ret, format, ap);
130    
131      /* NULL is returned when there was a memory allocation problem, or
132         any other error (for instance, a bad format string).  A negative
133         status (the printed length) with a non-NULL buffer should never
(gdb) p ret
$1 = 0x0
(gdb) p format
$2 = 0x7ca097 "%s"
(gdb) p ap
$3 = (struct __va_list_tag *) 0x7fffffffe408
(gdb)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug tui/14159] Segfault during quit, if Tui enabled
  2012-05-24  8:02 [Bug tui/14159] New: Tui Segfault ducksource at duckpond dot ch
@ 2012-05-24  9:31 ` ducksource at duckpond dot ch
  2012-05-24 15:51 ` palves at redhat dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: ducksource at duckpond dot ch @ 2012-05-24  9:31 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=14159

ducksource at duckpond dot ch changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Tui Segfault                |Segfault during quit, if
                   |                            |Tui enabled

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug tui/14159] Segfault during quit, if Tui enabled
  2012-05-24  8:02 [Bug tui/14159] New: Tui Segfault ducksource at duckpond dot ch
  2012-05-24  9:31 ` [Bug tui/14159] Segfault during quit, if Tui enabled ducksource at duckpond dot ch
@ 2012-05-24 15:51 ` palves at redhat dot com
  2012-05-24 15:55 ` cvs-commit at gcc dot gnu.org
  2012-05-24 15:58 ` palves at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: palves at redhat dot com @ 2012-05-24 15:51 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=14159

Pedro Alves <palves at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |palves at redhat dot com
         AssignedTo|unassigned at sourceware    |palves at redhat dot com
                   |dot org                     |

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug tui/14159] Segfault during quit, if Tui enabled
  2012-05-24  8:02 [Bug tui/14159] New: Tui Segfault ducksource at duckpond dot ch
  2012-05-24  9:31 ` [Bug tui/14159] Segfault during quit, if Tui enabled ducksource at duckpond dot ch
  2012-05-24 15:51 ` palves at redhat dot com
@ 2012-05-24 15:55 ` cvs-commit at gcc dot gnu.org
  2012-05-24 15:58 ` palves at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2012-05-24 15:55 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=14159

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> 2012-05-24 15:55:04 UTC ---
CVSROOT:    /cvs/src
Module name:    src
Changes by:    palves@sourceware.org    2012-05-24 15:54:57

Modified files:
    gdb            : ChangeLog 
    gdb/tui        : tui-hooks.c 

Log message:
    2012-05-24  Pedro Alves  <palves@redhat.com>

    PR tui/14159

    * tui/tui-hooks.c (tui_query_hook): Pre-compute the question
    string, instead of reusing the va_list argument.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.14288&r2=1.14289
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/tui/tui-hooks.c.diff?cvsroot=src&r1=1.47&r2=1.48

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug tui/14159] Segfault during quit, if Tui enabled
  2012-05-24  8:02 [Bug tui/14159] New: Tui Segfault ducksource at duckpond dot ch
                   ` (2 preceding siblings ...)
  2012-05-24 15:55 ` cvs-commit at gcc dot gnu.org
@ 2012-05-24 15:58 ` palves at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: palves at redhat dot com @ 2012-05-24 15:58 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=14159

Pedro Alves <palves at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |7.5

--- Comment #2 from Pedro Alves <palves at redhat dot com> 2012-05-24 15:58:17 UTC ---
Thanks.  Now fixed.  The "@(F^A" corruption is gone too.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

end of thread, other threads:[~2012-05-24 15:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-24  8:02 [Bug tui/14159] New: Tui Segfault ducksource at duckpond dot ch
2012-05-24  9:31 ` [Bug tui/14159] Segfault during quit, if Tui enabled ducksource at duckpond dot ch
2012-05-24 15:51 ` palves at redhat dot com
2012-05-24 15:55 ` cvs-commit at gcc dot gnu.org
2012-05-24 15:58 ` palves at redhat 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).