This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

breakpoints/2115: invalid number of printf arguments within command block causes segfault


>Number:         2115
>Category:       breakpoints
>Synopsis:       invalid number of printf arguments within command block causes segfault
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 13 20:18:01 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Sean Burford
>Release:        6.3
>Organization:
>Environment:
Ubuntu
>Description:
Setting up a printf with an invalid number of arguments within a command block will crash gdb.
>How-To-Repeat:
Populate test.gdb with:
break _init
commands
  printf "goodbye", $arg0
end
run

And run:
gdb -x test.gdb /bin/ls

gdb will segfault, and then the output of ls will still appear.  Here is the bt for gdb:

#0  0x080ae46a in if_command ()
#1  0x080adfdb in execute_control_command ()
#2  0x080c7d45 in bpstat_do_actions ()
#3  0x0807d4a5 in command_loop ()
#4  0x0807d0ba in read_command_file ()
#5  0x080af34b in script_from_file ()
#6  0x080af95b in source_command ()
#7  0x0807cfff in catch_errors ()
#8  0x0807cf7e in catch_exceptions_with_msg ()
#9  0x0807ce11 in throw_exception ()
#10 0x0807cfd4 in catch_errors ()
#11 0x0807d04e in catch_command_errors ()
#12 0x0807544e in main ()
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]