From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EF42C386C5A6; Sat, 16 Dec 2023 00:44:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EF42C386C5A6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1702687488; bh=SwoOiQurfZUL5uvIqVQuQoUU9j70KChIOBQ2lBvwV40=; h=From:To:Subject:Date:From; b=EQi27N9KKQGcEAHmyyQrEwb1zAgK+iJzeTvY7TyCjepAC9jQ7AggcZPTfR0A05iuW oFPUaZPA3wW9YVt5k+AheQRoK+XJ18Z6Q0fA29+iEC2US+e7LXMI+yUpz7U3mdu7kA Yvgx32SlO4CRkNbhHffieJ44+rKCv2MQj/b7BU+8= From: "mitch at runsafesecurity dot com" To: gdb-prs@sourceware.org Subject: [Bug python/31172] New: gdb.post_event SIGSEGV in batch mode Date: Sat, 16 Dec 2023 00:44:48 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: python X-Bugzilla-Version: 13.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mitch at runsafesecurity dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31172 Bug ID: 31172 Summary: gdb.post_event SIGSEGV in batch mode Product: gdb Version: 13.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: python Assignee: unassigned at sourceware dot org Reporter: mitch at runsafesecurity dot com Target Milestone: --- OS: Debian GNU/Linux 10 (buster) Version: gdb-13.2 built from source against Python 3.7. $ gdb --batch -ex 'pi gdb.post_event(lambda : print("test"))'=20 Fatal signal: Segmentation fault ----- Backtrace ----- 0x563e4c327527 gdb_internal_backtrace_1 ../../gdb/bt-utils.c:122 0x563e4c327527 _Z22gdb_internal_backtracev ../../gdb/bt-utils.c:168 0x563e4c44573a handle_fatal_signal ../../gdb/event-top.c:956 0x563e4c4457df handle_sigsegv ../../gdb/event-top.c:1029 0x7fb16addc72f ??? 0x7fb16af9bec9 ??? 0x7fb16af9c01b ??? Segmentation fault (core dumped) Stack trace as reported by gdb --args (with above cmd): ... #0 0x00007f47ac003ec9 in PyThreadState_New () from /usr/lib/x86_64-linux-gnu/libpython3.7m.so.1.0 #1 0x00007f47ac00401c in PyGILState_Ensure () from /usr/lib/x86_64-linux-gnu/libpython3.7m.so.1.0 #2 0x00005568cdefebff in gdbpy_gil::gdbpy_gil (this=3D)= at ../../gdb/python/python.c:265 #3 gdbpy_event::~gdbpy_event (this=3D0x5568cfa1c6d0, __in_chrg=3D) at ../../gdb/python/python.c:1022 #4 std::_Function_base::_Base_manager::_M_destroy (__victim= =3D...) at /usr/include/c++/8/bits/std_function.h:188 #5 std::_Function_base::_Base_manager::_M_manager (__dest=3D.= .., __source=3D..., __op=3D) at /usr/include/c++/8/bits/std_function.h:212 #6 0x00005568cdf73fce in std::_Function_base::~_Function_base (this=3D0x5568cf8552f0, __in_chrg=3D) at /usr/include/c++/8/bits/std_function.h:257 #7 std::function::~function() (this=3D0x5568cf8552f0, __in_chrg=3D) at /usr/include/c++/8/bits/std_function.h:370 #8 std::_Destroy >(std::function*) (__pointer=3D0x5568cf8552f0) at /usr/include/c++/8/bits/stl_construct.h:98 #9 std::_Destroy_aux::__destroy*>(std::function*, std::function*) (__last=3D,=20 __first=3D0x5568cf8552f0) at /usr/include/c++/8/bits/stl_construct.h:108 #10 std::_Destroy*>(std::function*, std::function*) (__last=3D, __first=3D) at /usr/include/c++/8/bits/stl_construct.h:137 #11 std::_Destroy*, std::function >(std::function*, std::function*, std::allocator >&) (__last=3D0x5568cf855310, __first=3D) at /usr/include/c++/8/bits/stl_construct.h:206 #12 std::vector, std::allocator > >::~vector() (this=3D0x5568cf626c50 , __in_chrg=3D) at /usr/include/c++/8/bits/stl_vector.h:567 #13 0x00007f47ab8bcebc in ?? () from /lib/x86_64-linux-gnu/libc.so.6 #14 0x00007f47ab8bcfea in exit () from /lib/x86_64-linux-gnu/libc.so.6 #15 0x00005568ce0533e2 in quit_force (exit_arg=3D, from_tty=3Dfrom_tty@entry=3D0) at ../../gdb/top.c:1896 #16 0x00005568cdddc3f3 in captured_main_1 (context=3Dcontext@entry=3D0x7fffb9066670) at ../../gdb/main.c:1311 #17 0x00005568cdddcf7b in captured_main (data=3Ddata@entry=3D0x7fffb9066670= ) at ../../gdb/main.c:1320 #18 gdb_main (args=3Dargs@entry=3D0x7fffb9066690) at ../../gdb/main.c:1345 #19 0x00005568cda7ca8b in main (argc=3D, argv=3D) at ../../gdb/gdb.c:32 Note: it does not crash when run without '--batch' in interactive mode, whi= ch is the expected behavior. --=20 You are receiving this mail because: You are on the CC list for the bug.=