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]

[Bug python/18734] New: Segfault in gdb.events.new_objfile.connect(lambda x: dir(x.new_objfile)


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

            Bug ID: 18734
           Summary: Segfault in gdb.events.new_objfile.connect(lambda x:
                    dir(x.new_objfile)
           Product: gdb
           Version: 7.9
            Status: NEW
          Severity: normal
          Priority: P2
         Component: python
          Assignee: unassigned at sourceware dot org
          Reporter: kevin.pouget at gmail dot com
  Target Milestone: ---

Version
-------
GNU gdb (GDB) 7.9.50.20150505-cvs

Steps to reproduce
------------------
gdb -nx /usr/bin/ls # whatever

(gdb) py gdb.events.new_objfile.connect(lambda x: dir(x.new_objfile))
(gdb) run

Result
------

Program received signal SIGSEGV, Segmentation fault.
gdb_py_generic_dict (self=0x7f608524a2b8, closure=0xc12b20
<objfile_object_type>) at ../../gdb/gdb/python/py-utils.c:429
429       Py_INCREF (result);
(../../gdb/gdb/python/py-utils.c:429 gdb_py_generic_dict gdb)
$ where
#0  0x0000000000504b0b in gdb_py_generic_dict (self=0x7f608524a2b8,
closure=0xc12b20 <objfile_object_type>) at ../../gdb/gdb/python/py-utils.c:429
#1  0x00007f60862bfbae in getset_get () at /usr/lib/libpython2.7.so.1.0
#2  0x00007f60862e6a11 in _PyObject_GenericGetAttrWithDict () at
/usr/lib/libpython2.7.so.1.0
#3  0x00007f60862e62a4 in PyObject_GetAttrString () at
/usr/lib/libpython2.7.so.1.0
#4  0x00007f60862e783e in PyObject_Dir () at /usr/lib/libpython2.7.so.1.0
#5  0x00007f6086339ba6 in builtin_dir () at /usr/lib/libpython2.7.so.1.0
#6  0x00007f6086341b3f in PyEval_EvalFrameEx () at /usr/lib/libpython2.7.so.1.0
#7  0x00007f6086342abc in PyEval_EvalCodeEx () at /usr/lib/libpython2.7.so.1.0
#8  0x00007f60862cf3cc in function_call () at /usr/lib/libpython2.7.so.1.0
#9  0x00007f60862aa9e3 in PyObject_Call () at /usr/lib/libpython2.7.so.1.0
#10 0x00007f60862ab27c in PyObject_CallFunctionObjArgs () at
/usr/lib/libpython2.7.so.1.0
#11 0x00000000004f4f90 in evpy_emit_event (event=0x7f6085e901b0,
registry=<optimized out>) at ../../gdb/gdb/python/py-event.c:111
#12 0x00000000004fc280 in emit_new_objfile_event
(objfile=objfile@entry=0x28f30f0) at
../../gdb/gdb/python/py-newobjfileevent.c:67
#13 0x00000000004fa61a in python_new_objfile (objfile=0x28f30f0) at
../../gdb/gdb/python/py-inferior.c:229
#14 0x00000000005ed8dd in observer_notify_new_objfile (args=0x7ffecbf5d740,
subject=<optimized out>) at ../../gdb/gdb/observer.c:167
#15 0x00000000005ed8dd in observer_notify_new_objfile
(objfile=objfile@entry=0x28f30f0) at ./observer.inc:582
#16 0x00000000005832bd in symbol_file_add_with_addrs (abfd=<optimized out>,
name=name@entry=0x28f2680 "/lib64/ld-linux-x86-64.so.2",
add_flags=add_flags@entry=8, addrs=addrs@entry=0x2817850, flags=<optimized
out>, flags@entry=2, parent=parent@entry=0x0) at ../../gdb/gdb/symfile.c:1239
#17 0x0000000000583825 in symbol_file_add_from_bfd (abfd=<optimized out>,
name=name@entry=0x28f2680 "/lib64/ld-linux-x86-64.so.2",
add_flags=add_flags@entry=8, addrs=addrs@entry=0x2817850, flags=flags@entry=2,
parent=parent@entry=0x0) at ../../gdb/gdb/symfile.c:1280
#18 0x000000000068d479 in solib_read_symbols (so=so@entry=0x28f2470,
flags=flags@entry=8) at ../../gdb/gdb/solib.c:706
#19 0x000000000068d8f0 in solib_add (pattern=pattern@entry=0x0,
from_tty=from_tty@entry=0, target=<optimized out>, readsyms=1) at
../../gdb/gdb/solib.c:1029
#20 0x0000000000494317 in enable_break (info=0x28dfe30, from_tty=0) at
../../gdb/gdb/solib-svr4.c:2380
#21 0x000000000059211f in post_create_inferior (target=0xc43680
<current_target>, from_tty=from_tty@entry=0) at ../../gdb/gdb/infcmd.c:442
#22 0x0000000000592763 in run_command_1 (args=<optimized out>, from_tty=1,
tbreak_at_main=<optimized out>) at ../../gdb/gdb/infcmd.c:629
#23 0x0000000000676b96 in execute_command (p=<optimized out>, p@entry=0x268e190
"", from_tty=1) at ../../gdb/gdb/top.c:476
#24 0x00000000005b42e5 in command_handler (command=0x268e190 "") at
../../gdb/gdb/event-top.c:494
#25 0x00000000005b49e7 in command_line_handler (rl=<optimized out>) at
../../gdb/gdb/event-top.c:692
#26 0x00000000006c40c3 in rl_callback_read_char () at
../../gdb/readline/callback.c:220
#27 0x00000000005b4349 in rl_callback_read_char_wrapper (client_data=<optimized
out>) at ../../gdb/gdb/event-top.c:171
#28 0x00000000005b4393 in stdin_event_handler (error=<optimized out>,
client_data=0x0) at ../../gdb/gdb/event-top.c:432
#29 0x00000000005b32ec in gdb_wait_for_event (block=block@entry=1) at
../../gdb/gdb/event-loop.c:773
#30 0x00000000005b3499 in gdb_do_one_event () at ../../gdb/gdb/event-loop.c:309
#31 0x00000000005b35ce in start_event_loop () at ../../gdb/gdb/event-loop.c:333
#32 0x00000000005ad523 in captured_command_loop (data=data@entry=0x0) at
../../gdb/gdb/main.c:318
#33 0x00000000005aa9ad in catch_errors (func=func@entry=0x5ad510
<captured_command_loop>, func_args=func_args@entry=0x0,
errstring=errstring@entry=0x7986c1 "", mask=mask@entry=RETURN_MASK_ALL) at
../../gdb/gdb/exceptions.c:240
#34 0x00000000005ae5d6 in captured_main (data=data@entry=0x7ffecbf5dcf0) at
../../gdb/gdb/main.c:1158
#35 0x00000000005aa9ad in catch_errors (func=func@entry=0x5ad980
<captured_main>, func_args=func_args@entry=0x7ffecbf5dcf0,
errstring=errstring@entry=0x7986c1 "", mask=mask@entry=RETURN_MASK_ALL) at
../../gdb/gdb/exceptions.c:240
#36 0x00000000005ae8ab in gdb_main (args=args@entry=0x7ffecbf5dcf0) at
../../gdb/gdb/main.c:1166
#37 0x0000000000460755 in main (argc=<optimized out>, argv=<optimized out>) at
../../gdb/gdb/gdb.c:32

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


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