[Bug testsuite/34340] ptid_t selftest segfaults

sam at gentoo dot org via Gdb-prs <[email protected]>
Newsgroups gmane.comp.gdb.bugs.discuss
Message-ID <[email protected]/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=34340

--- Comment #1 from Sam James <sam at gentoo dot org> ---
```
Core was generated by `./gdb
--data-directory=/var/tmp/portage/dev-debug/gdb-9999/work/gdb-9999/gdb/data-directory
-batch -ex maintenance\ selftest'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  std::__uniq_ptr_impl<ui_file, std::default_delete<ui_file> >::_M_ptr
(this=0xafef2d0c9c2c9a20, this=<optimized out>) at
/usr/lib/gcc/x86_64-pc-linux-gnu/17/include/g++-v17/bits/unique_ptr.h:192
192           pointer    _M_ptr() const noexcept { return std::get<0>(_M_t); }
[Current thread is 1 (Thread 0x7fbdbdb78280 (LWP 1806793))]
[...]
(gdb) bt
#0  std::__uniq_ptr_impl<ui_file, std::default_delete<ui_file> >::_M_ptr
(this=0xafef2d0c9c2c9a20, this=<optimized out>) at
/usr/lib/gcc/x86_64-pc-linux-gnu/17/include/g++-v17/bits/unique_ptr.h:192
#1  std::unique_ptr<ui_file, std::default_delete<ui_file> >::get
(this=0xafef2d0c9c2c9a20, this=<optimized out>) at
/usr/lib/gcc/x86_64-pc-linux-gnu/17/include/g++-v17/bits/unique_ptr.h:491
#2  interp::get_stderr (this=0xafef2d0c9c2c9a00) at
/var/tmp/portage/dev-debug/gdb-9999/work/gdb-9999/gdb/interps.h:213
#3  current_gdb_stderr () at
/var/tmp/portage/dev-debug/gdb-9999/work/gdb-9999/gdb/top.c:126
#4  sig_write (msg=0x55d51385d250 "0x55d4f10c7582 ") at
/var/tmp/portage/dev-debug/gdb-9999/work/gdb-9999/gdb/bt-utils.c:48
#5  0x000055d4f10c7413 in libbacktrace_print (data=<optimized out>,
pc=<optimized out>, filename=0x7fbd852b7600
"/var/tmp/portage/dev-debug/gdb-9999/work/gdb-9999/gdb/bt-utils.c", lineno=122,
    function=0x7fbd250ce6dc "gdb_internal_backtrace_1") at
/var/tmp/portage/dev-debug/gdb-9999/work/gdb-9999/gdb/bt-utils.c:94
#6  0x000055d4f1801c45 in report_inlined_functions (pc=pc@entry=94373065553282,
callback=callback@entry=0x55d4f10c73c0 <libbacktrace_print(void*, uintptr_t,
char const*, int, char const*)>,
    data=data@entry=0x0, filename=filename@entry=0x55d51385d4b0,
lineno=0x55d51385d470, function=0x7fbd84d0f6b0) at ../libbacktrace/dwarf.c:3624
#7  0x000055d4f1801c20 in report_inlined_functions (pc=pc@entry=94373065553282,
callback=callback@entry=0x55d4f10c73c0 <libbacktrace_print(void*, uintptr_t,
char const*, int, char const*)>,
    data=data@entry=0x0, filename=filename@entry=0x55d51385d4b0,
lineno=0x55d51385d470, function=0x7fbd84d0f688) at ../libbacktrace/dwarf.c:3618
#8  0x000055d4f1807de4 in dwarf_lookup_pc (state=<optimized out>,
ddata=<optimized out>, pc=<optimized out>, callback=<optimized out>,
error_callback=<optimized out>, data=<optimized out>,
    found=<optimized out>) at ../libbacktrace/dwarf.c:3891
#9  0x000055d4f18097a8 in dwarf_fileline (state=0x7fbdbec17000,
pc=94373065553282, callback=0x55d4f10c73c0 <libbacktrace_print(void*,
uintptr_t, char const*, int, char const*)>,
    error_callback=0x55d4f10c72f0 <libbacktrace_error(void*, char const*,
int)>, data=<optimized out>) at ../libbacktrace/dwarf.c:3918
#10 0x000055d4f17f287a in backtrace_pcinfo (state=0x7fbdbec17000,
pc=94373065553282, callback=<optimized out>, error_callback=0x55d4f10c72f0
<libbacktrace_error(void*, char const*, int)>, data=<optimized out>)
    at ../libbacktrace/fileline.c:362
#11 backtrace_pcinfo (state=0x7fbdbec17000, pc=<optimized out>,
callback=<optimized out>, error_callback=<optimized out>, data=<optimized out>)
at ../libbacktrace/fileline.c:352
#12 unwind (context=<optimized out>, vdata=0x55d51385d9c0) at
../libbacktrace/backtrace.c:91
#13 0x00007fbdbe7e0e3d in _Unwind_Backtrace (trace=0x55d4f17f2740
<unwind(_Unwind_Context*, void*)>, trace_argument=0x55d51385d9c0) at
/usr/src/debug/sys-devel/gcc-17.0.9999/gcc-17.0.9999/libgcc/unwind.inc:309
#14 0x000055d4f17f6780 in backtrace_full (state=0x7fbdbec17000, data=0x0,
error_callback=<optimized out>, callback=<optimized out>, skip=0) at
../libbacktrace/backtrace.c:127
#15 0x000055d4f10c7583 in gdb_internal_backtrace_1 () at
/var/tmp/portage/dev-debug/gdb-9999/work/gdb-9999/gdb/bt-utils.c:122
#16 gdb_internal_backtrace () at
/var/tmp/portage/dev-debug/gdb-9999/work/gdb-9999/gdb/bt-utils.c:173
#17 gdb_internal_backtrace () at
/var/tmp/portage/dev-debug/gdb-9999/work/gdb-9999/gdb/bt-utils.c:165
#18 0x000055d4f127ed7b in handle_fatal_signal (sig=sig@entry=11) at
/var/tmp/portage/dev-debug/gdb-9999/work/gdb-9999/gdb/event-top.c:1008
#19 0x000055d4f127efe5 in handle_sigsegv (sig=11) at
/var/tmp/portage/dev-debug/gdb-9999/work/gdb-9999/gdb/event-top.c:1085
#20 <signal handler called>
#21 0x000055d4f1690929 in selftests::ptid::parse_one
(str=str@entry=0x55d4f1886861 "-1", for_remote=for_remote@entry=true) at
unittests/ptid-selftests.c:163
#22 0x000055d4f16955ae in selftests::ptid::test () at
unittests/ptid-selftests.c:188
#23 0x000055d4f13b316d in std::function<void()>::operator()
(this=0x55d513898a00, this=<optimized out>) at
/usr/lib/gcc/x86_64-pc-linux-gnu/17/include/g++-v17/bits/std_function.h:581
#24 selftests::run_tests (filters=..., verbose=<optimized out>) at
../gdbsupport/selftest.cc:100
#25 maintenance_selftest (args=<optimized out>, from_tty=<optimized out>) at
/var/tmp/portage/dev-debug/gdb-9999/work/gdb-9999/gdb/maint.c:1261
#26 0x000055d4f160521c in cmd_func (cmd=0x55d5138dc320, args=<optimized out>,
from_tty=0) at cli/cli-decode.c:2810
#27 execute_command (p=<optimized out>, from_tty=<optimized out>) at
/var/tmp/portage/dev-debug/gdb-9999/work/gdb-9999/gdb/top.c:632
#28 0x000055d4f13a8e0d in catch_command_errors (command=<optimized out>,
arg=<optimized out>, from_tty=<optimized out>, do_bp_actions=true) at
/var/tmp/portage/dev-debug/gdb-9999/work/gdb-9999/gdb/main.c:507
#29 execute_cmdargs (cmdarg_vec=cmdarg_vec@entry=0x7ffdd93788b0,
file_type=file_type@entry=CMDARG_FILE, cmd_type=cmd_type@entry=CMDARG_COMMAND,
ret=ret@entry=0x7ffdd93788a0)
    at /var/tmp/portage/dev-debug/gdb-9999/work/gdb-9999/gdb/main.c:606
#30 0x000055d4f13b06c5 in captured_main_1(captured_main_args*) [clone
.constprop.0] (context=context@entry=0x7ffdd9378c90) at
/var/tmp/portage/dev-debug/gdb-9999/work/gdb-9999/gdb/main.c:1340
#31 0x000055d4f0fdb0e8 in captured_main (context=0x7ffdd9378c90) at
/var/tmp/portage/dev-debug/gdb-9999/work/gdb-9999/gdb/main.c:1363
#32 gdb_main (args=0x7ffdd9378c90) at
/var/tmp/portage/dev-debug/gdb-9999/work/gdb-9999/gdb/main.c:1392
#33 main (argc=5, argv=0x7ffdd9378de8) at
/var/tmp/portage/dev-debug/gdb-9999/work/gdb-9999/gdb/gdb.c:38
```

-- 
You are receiving this mail because:
You are on the CC list for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.