[Bug 1171511] Re: seg fault when using auto completion for the condition command
Dave Gilbert
ubuntu at treblig.org
Sun Apr 28 15:56:33 UTC 2013
0x0000000000541894 in condition_completer (cmd=0xc9a930, text=0x7fffffffd8da "1", word=0x7fffffffd8da "1") at /build/buildd/gdb-7.6~20130417/gdb/breakpoint.c:1019
1019 /build/buildd/gdb-7.6~20130417/gdb/breakpoint.c: No such file or directory.
(gdb) where
#0 0x0000000000541894 in condition_completer (cmd=0xc9a930, text=0x7fffffffd8da "1", word=0x7fffffffd8da "1") at /build/buildd/gdb-7.6~20130417/gdb/breakpoint.c:1019
#1 0x00000000005e35ec in complete_line_internal (text=0xde7890 "1", line_buffer=0xe9b4e0 "condition 1", point=11, reason=handle_completions) at /build/buildd/gdb-7.6~20130417/gdb/completer.c:749
#2 0x00000000005e3628 in complete_line (text=0xde7890 "1", line_buffer=0xe9b4e0 "condition 1", point=11) at /build/buildd/gdb-7.6~20130417/gdb/completer.c:771
#3 0x00000000005e37e9 in line_completion_function (text=0xde7890 "1", matches=0, line_buffer=0xe9b4e0 "condition 1", point=11) at /build/buildd/gdb-7.6~20130417/gdb/completer.c:872
#4 0x00000000005e247f in readline_line_completion_function (text=0xde7890 "1", matches=0) at /build/buildd/gdb-7.6~20130417/gdb/completer.c:102
#5 0x00007ffff7bb2f20 in rl_completion_matches () from /lib/x86_64-linux-gnu/libreadline.so.6
#6 0x00007ffff7bb3b04 in rl_complete_internal () from /lib/x86_64-linux-gnu/libreadline.so.6
#7 0x00007ffff7baacc0 in _rl_dispatch_subseq () from /lib/x86_64-linux-gnu/libreadline.so.6
#8 0x00007ffff7bab2a2 in readline_internal_char () from /lib/x86_64-linux-gnu/libreadline.so.6
#9 0x00007ffff7bc0bed in rl_callback_read_char () from /lib/x86_64-linux-gnu/libreadline.so.6
#10 0x00000000005e0d7d in rl_callback_read_char_wrapper (client_data=0x0) at /build/buildd/gdb-7.6~20130417/gdb/event-top.c:163
#11 0x00000000005e115e in stdin_event_handler (error=0, client_data=0x0) at /build/buildd/gdb-7.6~20130417/gdb/event-top.c:371
#12 0x00000000005dfd02 in handle_file_event (data=...) at /build/buildd/gdb-7.6~20130417/gdb/event-loop.c:768
#13 0x00000000005df1ab in process_event () at /build/buildd/gdb-7.6~20130417/gdb/event-loop.c:342
#14 0x00000000005df272 in gdb_do_one_event () at /build/buildd/gdb-7.6~20130417/gdb/event-loop.c:406
#15 0x00000000005df2c3 in start_event_loop () at /build/buildd/gdb-7.6~20130417/gdb/event-loop.c:431
#16 0x00000000005e0da7 in cli_command_loop () at /build/buildd/gdb-7.6~20130417/gdb/event-top.c:176
#17 0x00000000005d76ff in current_interp_command_loop () at /build/buildd/gdb-7.6~20130417/gdb/interps.c:331
#18 0x00000000005d8194 in captured_command_loop (data=0x0) at /build/buildd/gdb-7.6~20130417/gdb/main.c:258
#19 0x00000000005d6446 in catch_errors (func=0x5d8179 <captured_command_loop>, func_args=0x0, errstring=0x8772c2 "", mask=6) at /build/buildd/gdb-7.6~20130417/gdb/exceptions.c:546
#20 0x00000000005d95f1 in captured_main (data=0x7fffffffdef0) at /build/buildd/gdb-7.6~20130417/gdb/main.c:1041
#21 0x00000000005d6446 in catch_errors (func=0x5d8430 <captured_main>, func_args=0x7fffffffdef0, errstring=0x8772c2 "", mask=6) at /build/buildd/gdb-7.6~20130417/gdb/exceptions.c:546
#22 0x00000000005d9627 in gdb_main (args=0x7fffffffdef0) at /build/buildd/gdb-7.6~20130417/gdb/main.c:1050
#23 0x00000000004509ba in main (argc=2, argv=0x7fffffffdff8) at /build/buildd/gdb-7.6~20130417/gdb/gdb.c:34
ALL_BREAKPOINTS (b)
{
1019 int single = b->loc->next == NULL;
struct bp_location *loc;
int count = 1;
(gdb) p b
$1 = (struct breakpoint *) 0xde7690
(gdb) p b->loc
$2 = (struct bp_location *) 0x0
(gdb) p *b
$3 = {ops = 0xc3fc40 <bkpt_breakpoint_ops>, next = 0x0, type = bp_breakpoint, enable_state = bp_enabled, disposition = disp_donttouch, number = 1, loc = 0x0, silent = 0 '\000', display_canonical = 0 '\000', ignore_count = 0, enable_count = 0, commands = 0x0,
frame_id = {stack_addr = 0, code_addr = 0, special_addr = 0, stack_addr_p = 0, code_addr_p = 0, special_addr_p = 0, artificial_depth = 0}, pspace = 0xd75b50, addr_string = 0xdd76c0 "nocxx.cpp:54", filter = 0x0, addr_string_range_end = 0x0, gdbarch = 0xe051b0,
language = language_c, input_radix = 10, cond_string = 0x0, extra_string = 0x0, related_breakpoint = 0xde7690, thread = -1, task = 0, hit_count = 0, condition_not_parsed = 1, py_bp_object = 0x7ffff7eb98a0}
so looks like that int single line needs to check b->loc before
comparing next
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gdb in Ubuntu.
https://bugs.launchpad.net/bugs/1171511
Title:
seg fault when using auto completion for the condition command
Status in “gdb” package in Ubuntu:
Triaged
Bug description:
When hunting a bug in libreoffice, gdb crashed with a seg fault. After
some testing following procedure leads to the crash:
1. Start gdb with any program you want to debug
2. set a pending breakpoint, e.g. "b nofile.cxx:54"
3. type "condition 1" + Tab
the core dump of the first crash is attached. I have some more core
dumps, so if they are required I can upload them, too.
ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: gdb 7.5-0ubuntu2
ProcVersionSignature: Ubuntu 3.5.0-27.46-generic 3.5.7.7
Uname: Linux 3.5.0-27-generic x86_64
ApportVersion: 2.6.1-0ubuntu10
Architecture: amd64
Date: Mon Apr 22 17:13:49 2013
InstallationDate: Installed on 2012-12-22 (121 days ago)
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.5)
MarkForUpload: True
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
XDG_RUNTIME_DIR=<set>
LANG=de_DE.UTF-8
SHELL=/bin/bash
SourcePackage: gdb
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gdb/+bug/1171511/+subscriptions
More information about the foundations-bugs
mailing list