public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "wingo at igalia dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug backtrace/31560] New: Segfault when computing backtrace
Date: Tue, 26 Mar 2024 15:49:21 +0000	[thread overview]
Message-ID: <bug-31560-4717@http.sourceware.org/bugzilla/> (raw)

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

            Bug ID: 31560
           Summary: Segfault when computing backtrace
           Product: gdb
           Version: 14.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: backtrace
          Assignee: unassigned at sourceware dot org
          Reporter: wingo at igalia dot com
  Target Milestone: ---

Hi,

Using gdb 14.1 from Guix, I get a segfault in GDB while printing a backtrace,
either when traversing a core file or attached to a live process.  The specific
process is part of the V8 test suite (with some patches from me).  gdb 12.1
successfully prints the backtrace.

The backtrace of GDB:

```
(gdb) bt
#0  block::scope (this=<optimized out>) at ../../gdb-14.1/gdb/block.c:293
#1  0x000000000055b6b7 in cp_lookup_transparent_type (name=0x85e4b00
"v8::internal::ExternalPointerTable::Space") at
../../gdb-14.1/gdb/cp-namespace.c:1029
#2  0x0000000000627b1d in check_typedef (type=<optimized out>,
type@entry=0x76f7780) at ../../gdb-14.1/gdb/gdbtypes.c:3052
#3  0x00000000005134dc in c_value_print_ptr (options=0x7fffffffda30, recurse=2,
stream=0x7fffffffdb10, val=0xf0ce9e0) at ../../gdb-14.1/gdb/c-valprint.c:352
#4  c_value_print_inner (val=0xf0ce9e0, stream=0x7fffffffdb10, recurse=2,
options=0x7fffffffda30) at ../../gdb-14.1/gdb/c-valprint.c:435
#5  0x00000000008941bb in common_val_print (value=0xf0ce9e0,
stream=0x7fffffffdb10, recurse=2, options=0x7fffffffdae0, language=0xd73150
<cplus_language_defn>) at ../../gdb-14.1/gdb/valprint.c:1092
#6  0x00000000008942ec in common_val_print_checked (val=<optimized out>,
stream=<optimized out>, recurse=<optimized out>, options=<optimized out>,
language=<optimized out>) at ../../gdb-14.1/gdb/valprint.c:1184
#7  0x00000000007e5d8a in print_frame_arg (fp_opts=...,
arg=arg@entry=0x7fffffffdbd0) at ../../gdb-14.1/gdb/stack.c:487
#8  0x00000000007ea0c2 in print_frame_args (fp_opts=..., func=<optimized out>,
frame=..., num=-1, stream=0xdb8d20) at ../../gdb-14.1/gdb/stack.c:883
#9  0x00000000007ed950 in print_frame (sal=..., print_args=1,
print_what=LOCATION, print_level=<optimized out>, frame=..., fp_opts=...) at
../../gdb-14.1/gdb/stack.c:1382
#10 print_frame_info (fp_opts=..., frame=..., print_level=<optimized out>,
print_what=LOCATION, print_args=1, set_current_sal=0) at
../../gdb-14.1/gdb/stack.c:1108
#11 0x00000000007eec00 in backtrace_command_1 (from_tty=1, count_exp=<optimized
out>, bt_opts=..., fp_opts=...) at ../../gdb-14.1/gdb/stack.c:2062
#12 backtrace_command (arg=<optimized out>, from_tty=1) at
../../gdb-14.1/gdb/stack.c:2168
#13 0x00000000005220e5 in cmd_func (cmd=<optimized out>, args=<optimized out>,
from_tty=<optimized out>) at ../../gdb-14.1/gdb/cli/cli-decode.c:2735
#14 0x000000000084e1c7 in execute_command (p=<optimized out>, p@entry=0xdb8f10
"bt", from_tty=1) at ../../gdb-14.1/gdb/top.c:575
#15 0x00000000005f5140 in command_handler (command=0xdb8f10 "bt") at
../../gdb-14.1/gdb/event-top.c:552
#16 0x00000000005f62ee in command_line_handler (rl=...) at
../../gdb-14.1/gdb/event-top.c:788
#17 0x00000000005f5a3c in gdb_rl_callback_handler (rl=0x162d090 "bt") at
../../gdb-14.1/gdb/event-top.c:259
#18 0x00000000008c8a98 in rl_callback_read_char () at
../../../gdb-14.1/readline/readline/callback.c:290
#19 0x00000000005f4cee in gdb_rl_callback_read_char_wrapper_noexcept () at
../../gdb-14.1/gdb/event-top.c:195
#20 0x00000000005f592d in gdb_rl_callback_read_char_wrapper
(client_data=<optimized out>) at ../../gdb-14.1/gdb/event-top.c:234
#21 0x000000000087e7a0 in stdin_event_handler (error=<optimized out>,
client_data=0xdb8c00) at ../../gdb-14.1/gdb/ui.c:155
#22 0x00000000009c783e in gdb_wait_for_event (block=block@entry=1) at
../../gdb-14.1/gdbsupport/event-loop.cc:694
#23 0x00000000009c81de in gdb_wait_for_event (block=1) at
../../gdb-14.1/gdbsupport/event-loop.cc:593
#24 gdb_do_one_event (mstimeout=mstimeout@entry=-1) at
../../gdb-14.1/gdbsupport/event-loop.cc:264
#25 0x00000000006dae5a in start_event_loop () at ../../gdb-14.1/gdb/main.c:407
#26 captured_command_loop () at ../../gdb-14.1/gdb/main.c:471
#27 0x00000000006dcd85 in captured_main (data=data@entry=0x7fffffffe590) at
../../gdb-14.1/gdb/main.c:1324
#28 gdb_main (args=args@entry=0x7fffffffe5d0) at ../../gdb-14.1/gdb/main.c:1343
#29 0x0000000000442e65 in main (argc=3, argv=0x7fffffffe718) at
../../gdb-14.1/gdb/gdb.c:39
```

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

             reply	other threads:[~2024-03-26 15:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-26 15:49 wingo at igalia dot com [this message]
2024-03-26 15:51 ` [Bug backtrace/31560] " wingo at igalia dot com
2024-03-26 16:57 ` tromey at sourceware dot org
2024-03-27 13:15 ` wingo at igalia dot com
2024-03-27 13:16 ` wingo at igalia dot com
2024-03-27 15:12 ` simon.marchi at polymtl dot ca
2024-03-29  7:41 ` wingo at igalia dot com
2024-03-29  8:00 ` wingo at igalia dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-31560-4717@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).