public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug backtrace/31560] New: Segfault when computing backtrace
@ 2024-03-26 15:49 wingo at igalia dot com
  2024-03-26 15:51 ` [Bug backtrace/31560] " wingo at igalia dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: wingo at igalia dot com @ 2024-03-26 15:49 UTC (permalink / raw)
  To: gdb-prs

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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug backtrace/31560] Segfault when computing backtrace
  2024-03-26 15:49 [Bug backtrace/31560] New: Segfault when computing backtrace wingo at igalia dot com
@ 2024-03-26 15:51 ` wingo at igalia dot com
  2024-03-26 16:57 ` tromey at sourceware dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: wingo at igalia dot com @ 2024-03-26 15:51 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #1 from Andy Wingo <wingo at igalia dot com> ---
(gdb) disassemble
Dump of assembler code for function _ZNK5block5scopeEv:
=> 0x00000000004c3350 <+0>:     mov    0x28(%rdi),%rax
   0x00000000004c3354 <+4>:     test   %rax,%rax
   0x00000000004c3357 <+7>:     je     0x4c3361 <_ZNK5block5scopeEv+17>
   0x00000000004c3359 <+9>:     mov    (%rax),%rax
   0x00000000004c335c <+12>:    test   %rax,%rax
   0x00000000004c335f <+15>:    jne    0x4c336f <_ZNK5block5scopeEv+31>
   0x00000000004c3361 <+17>:    mov    0x18(%rdi),%rdi
   0x00000000004c3365 <+21>:    test   %rdi,%rdi
   0x00000000004c3368 <+24>:    jne    0x4c3350 <_ZNK5block5scopeEv>
   0x00000000004c336a <+26>:    mov    $0xacd413,%eax
   0x00000000004c336f <+31>:    ret


And a bt full:

#0  block::scope (this=<optimized out>) at ../../gdb-14.1/gdb/block.c:293
        block = <optimized out>
#1  0x000000000055b6b7 in cp_lookup_transparent_type (name=0x85e4b00
"v8::internal::ExternalPointerTable::Space") at
../../gdb-14.1/gdb/cp-namespace.c:1029
        t = 0x0
        scope = <optimized out>
#2  0x0000000000627b1d in check_typedef (type=<optimized out>,
type@entry=0x76f7780) at ../../gdb-14.1/gdb/gdbtypes.c:3052
        name = <optimized out>
        newtype = <optimized out>
        orig_type = 0x76f7780
        __func__ = "check_typedef"
        instance_flags = {m_enum_value = 0}
#3  0x00000000005134dc in c_value_print_ptr (options=0x7fffffffda30, recurse=2,
stream=0x7fffffffdb10, val=0xf0ce9e0) at ../../gdb-14.1/gdb/c-valprint.c:352
        unresolved_elttype = 0x76f7780
        elttype = <optimized out>
        addr = <optimized out>
        type = 0x76f7820
        valaddr = 0x2a6a760 "\b`\370\222BV"
        type = <optimized out>
        valaddr = <optimized out>
        addr = <optimized out>
        unresolved_elttype = <optimized out>
        elttype = <optimized out>
        addr = <optimized out>
#4  c_value_print_inner (val=0xf0ce9e0, stream=0x7fffffffdb10, recurse=2,
options=0x7fffffffda30) at ../../gdb-14.1/gdb/c-valprint.c:435
        type = <optimized out>
#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
        local_opts = {prettyformat = Val_no_prettyformat, prettyformat_arrays =
false, prettyformat_structs = false, vtblprint = false, unionprint = true,
addressprint = true, nibblesprint = false, objectprint = false, print_max =
200, print_max_chars = 0, 
          repeat_count_threshold = 10, output_format = 0, format = 0,
memory_tag_violations = true, stop_print_at_null = false, print_array_indexes =
false, deref_ref = true, static_field_print = true, pascal_static_field_print =
true, raw = false, summary = true, 
          symbol_print = true, max_depth = 20}
        type = 0x76f7820
        real_type = 0x76f7820
#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
No locals.
#7  0x00000000007e5d8a in print_frame_arg (fp_opts=...,
arg=arg@entry=0x7fffffffdbd0) at ../../gdb-14.1/gdb/stack.c:487
        language = 0xd73150 <cplus_language_defn>
        vp_opts = {prettyformat = Val_no_prettyformat, prettyformat_arrays =
false, prettyformat_structs = false, vtblprint = false, unionprint = true,
addressprint = true, nibblesprint = false, objectprint = false, print_max =
200, print_max_chars = 0, 
          repeat_count_threshold = 10, output_format = 0, format = 0,
memory_tag_violations = true, stop_print_at_null = false, print_array_indexes =
false, deref_ref = true, static_field_print = true, pascal_static_field_print =
true, raw = false, summary = true, 
          symbol_print = true, max_depth = 20}
        uiout = 0xf21b10
        stb = {<ui_file> = {_vptr.ui_file = 0xafba90 <vtable for
string_file+16>, m_applied_style = {m_foreground = {m_simple = true, {m_value =
-1, {m_red = 255 '\377', m_green = 255 '\377', m_blue = 255 '\377'}}},
m_background = {m_simple = true, {m_value = -1, {
                    m_red = 255 '\377', m_green = 255 '\377', m_blue = 255
'\377'}}}, m_intensity = ui_file_style::NORMAL, m_reverse = false}}, m_string =
"", m_term_out = false}
        __func__ = "print_frame_arg"
        arg_emitter = <optimized out>
        tuple_emitter = {m_uiout = 0xf21b10}
        style = {m_foreground = {m_simple = true, {m_value = -1, {m_red = 255
'\377', m_green = 255 '\377', m_blue = 255 '\377'}}}, m_background = {m_simple
= true, {m_value = -1, {m_red = 255 '\377', m_green = 255 '\377', m_blue = 255
'\377'}}}, 
          m_intensity = ui_file_style::NORMAL, m_reverse = false}
#8  0x00000000007ea0c2 in print_frame_args (fp_opts=..., func=<optimized out>,
frame=..., num=-1, stream=0xdb8d20) at ../../gdb-14.1/gdb/stack.c:883
        arg = {sym = 0x16cb05f0, val = 0xf0ce9e0, error = std::unique_ptr<char>
= {get() = 0x0}, entry_kind = 0xadfe37 <print_entry_values_no> "no"}
        entryarg = {sym = 0x16cb05f0, val = 0x0, error = std::unique_ptr<char>
= {get() = 0x0}, entry_kind = 0xadfe37 <print_entry_values_no> "no"}
        sym = 0x16cb05f0
        __for_range = @0x7fffffffdca0: {m_begin = {m_sym = 0x16cb0570, m_iter =
{d = {compunit_symtab = 0x16cb07f0, block = 0x16cb07f0}, name = 0x0, idx = -1,
which = FIRST_LOCAL_BLOCK, mdict_iter = {mdict = 0x16cb0830, iterator = {dict =
0x16cb0850, index = 0, 
                  current = 0x48f6fa49db}, current_idx = 0}}}, m_end = {m_sym =
0x0, m_iter = {d = {compunit_symtab = 0x1, block = 0x1}, name = 0x9cac78
<operator new(unsigned long)+24>, idx = 1, which = GLOBAL_BLOCK, mdict_iter = {
                mdict = 0x87cb75 <ui_out::push_level(ui_out_type)+21>, iterator
= {dict = 0x7fffffffdec0, index = 208603584, current = 0x3ffffe040},
current_idx = 65535}}}}
        __for_begin = {m_sym = 0x16cb05f0, m_iter = {d = {compunit_symtab =
0x16cb07f0, block = 0x16cb07f0}, name = 0x0, idx = -1, which =
FIRST_LOCAL_BLOCK, mdict_iter = {mdict = 0x16cb0830, iterator = {dict =
0x16cb0850, index = 1, current = 0x48f6fa49db}, 
              current_idx = 0}}}
        __for_end = <optimized out>
        b = 0x16cb07f0
        uiout = 0xf21b10
        first = <optimized out>
        highest_offset = -1
        args_printed = <optimized out>
        print_names = true
        print_args = true
        __func__ = "print_frame_args"

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug backtrace/31560] Segfault when computing backtrace
  2024-03-26 15:49 [Bug backtrace/31560] New: Segfault when computing backtrace wingo at igalia dot com
  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
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: tromey at sourceware dot org @ 2024-03-26 16:57 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at sourceware dot org

--- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
The relevant info is optimized out here.
Maybe if we had an executable we could look into it.
Or you could build a debugging version of gdb.

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug backtrace/31560] Segfault when computing backtrace
  2024-03-26 15:49 [Bug backtrace/31560] New: Segfault when computing backtrace wingo at igalia dot com
  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
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: wingo at igalia dot com @ 2024-03-27 13:15 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #3 from Andy Wingo <wingo at igalia dot com> ---
(In reply to Tom Tromey from comment #2)
> The relevant info is optimized out here.
> Maybe if we had an executable we could look into it.
> Or you could build a debugging version of gdb.

I rebuilt with CXXFLAGS=-O0 -g.  The bug went away :(.  Seriously, same source,
different compilation option...  Tried with -O1 -g, and the bug is there again,
with a more useful backtrace:

(gdb) bt full
#0  block::scope (this=<optimized out>) at ../../gdb-14.1/gdb/block.c:293
        block = 0x0
#1  0x0000000000516c27 in cp_lookup_transparent_type (name=0x74539c0
"v8::internal::ExternalPointerTable::Space") at
../../gdb-14.1/gdb/cp-namespace.c:1029
        t = 0x0
        scope = <optimized out>
#2  0x00000000004ced68 in cplus_language::lookup_transparent_type
(this=<optimized out>, name=<optimized out>) at ../../gdb-14.1/gdb/c-lang.c:940
No locals.
#3  0x00000000007b6253 in lookup_transparent_type (name=<optimized out>) at
../../gdb-14.1/gdb/symtab.c:2673
No locals.
#4  0x00000000005dfbca in check_typedef (type=type@entry=0x9fffec0) at
../../gdb-14.1/gdb/gdbtypes.c:3052
        name = <optimized out>
        newtype = <optimized out>
        orig_type = 0x9fffec0
        __func__ = "check_typedef"
        instance_flags = {m_enum_value = 0}
#5  0x00000000004d41fb in c_value_print_ptr (options=0x7fffffffd860, recurse=2,
stream=0x7fffffffd990, val=<optimized out>) at
../../gdb-14.1/gdb/c-valprint.c:352
        unresolved_elttype = 0x9fffec0
        elttype = <optimized out>
        addr = <optimized out>
        type = 0x9ffff60
        valaddr = 0x1653b450 "\b`\370\222BV"
#6  c_value_print_inner (val=<optimized out>, stream=0x7fffffffd990, recurse=2,
options=0x7fffffffd860) at ../../gdb-14.1/gdb/c-valprint.c:435
        type = <optimized out>
#7  0x00000000006590c2 in language_defn::value_print_inner (this=<optimized
out>, val=<optimized out>, stream=<optimized out>, recurse=<optimized out>,
options=<optimized out>) at ../../gdb-14.1/gdb/language.c:608
No locals.
#8  0x000000000082e302 in common_val_print (value=value@entry=0x11537be0,
stream=stream@entry=0x7fffffffd990, recurse=recurse@entry=2,
options=options@entry=0x7fffffffd940, language=language@entry=0xcdd170
<cplus_language_defn>) at ../../gdb-14.1/gdb/valprint.c:1092
        local_opts = {prettyformat = Val_no_prettyformat, prettyformat_arrays =
false, prettyformat_structs = false, vtblprint = false, unionprint = true,
addressprint = true, nibblesprint = false, objectprint = false, print_max =
200, print_max_chars = 0, 
          repeat_count_threshold = 10, output_format = 0, format = 0,
memory_tag_violations = true, stop_print_at_null = false, print_array_indexes =
false, deref_ref = true, static_field_print = true, pascal_static_field_print =
true, raw = false, summary = true, 
          symbol_print = true, max_depth = 20}
        type = 0x9ffff60
        real_type = 0x9ffff60
#9  0x000000000082e445 in common_val_print_checked (val=0x11537be0,
stream=stream@entry=0x7fffffffd990, recurse=recurse@entry=2,
options=options@entry=0x7fffffffd940, language=language@entry=0xcdd170
<cplus_language_defn>) at ../../gdb-14.1/gdb/valprint.c:1184
No locals.
#10 0x0000000000791cae in print_frame_arg (fp_opts=...,
arg=arg@entry=0x7fffffffdaa0) at ../../gdb-14.1/gdb/stack.c:487
        language = 0xcdd170 <cplus_language_defn>
        vp_opts = {prettyformat = Val_no_prettyformat, prettyformat_arrays =
false, prettyformat_structs = false, vtblprint = false, unionprint = true,
addressprint = true, nibblesprint = false, objectprint = false, print_max =
200, print_max_chars = 0, 
          repeat_count_threshold = 10, output_format = 0, format = 0,
memory_tag_violations = true, stop_print_at_null = false, print_array_indexes =
false, deref_ref = true, static_field_print = true, pascal_static_field_print =
true, raw = false, summary = true, 
          symbol_print = true, max_depth = 20}
        uiout = 0xe8bb10
        stb = {<ui_file> = {_vptr.ui_file = 0xa93310 <vtable for
string_file+16>, m_applied_style = {m_foreground = {m_simple = true, {m_value =
-1, {m_red = 255 '\377', m_green = 255 '\377', m_blue = 255 '\377'}}},
m_background = {m_simple = true, {m_value = -1, {
                    m_red = 255 '\377', m_green = 255 '\377', m_blue = 255
'\377'}}}, m_intensity = ui_file_style::NORMAL, m_reverse = false}}, m_string =
"", m_term_out = false}
        __func__ = "print_frame_arg"
        arg_emitter = <optimized out>
        tuple_emitter = {m_uiout = 0xe8bb10}
        style = {m_foreground = {m_simple = true, {m_value = -1, {m_red = 255
'\377', m_green = 255 '\377', m_blue = 255 '\377'}}}, m_background = {m_simple
= true, {m_value = -1, {m_red = 255 '\377', m_green = 255 '\377', m_blue = 255
'\377'}}}, 
          m_intensity = ui_file_style::NORMAL, m_reverse = false}
#11 0x000000000079741f in print_frame_args (fp_opts=..., func=<optimized out>,
frame=..., num=num@entry=-1, stream=0xd22d20) at ../../gdb-14.1/gdb/stack.c:883
        arg = {sym = 0x16b19810, val = 0x11537be0, error =
std::unique_ptr<char> = {get() = 0x0}, entry_kind = 0xa77477
<print_entry_values_no> "no"}
        entryarg = {sym = 0x16b19810, val = 0x0, error = std::unique_ptr<char>
= {get() = 0x0}, entry_kind = 0xa77477 <print_entry_values_no> "no"}
        sym = 0x16b19810
        __for_range = @0x7fffffffdb70: {m_begin = {m_sym = 0x16b19790, m_iter =
{d = {compunit_symtab = 0x16b19a10, block = 0x16b19a10}, name = 0x0, idx = -1,
which = FIRST_LOCAL_BLOCK, mdict_iter = {mdict = 0x16b19a50, iterator = {dict =
0x16b19a70, index = 0, 
                  current = 0xf47190}, current_idx = 0}}}, m_end = {m_sym =
0x0, m_iter = {d = {compunit_symtab = 0x9ad0d0, block = 0x9ad0d0}, name =
0x9632b0 <operator new(unsigned long)+24>, idx = 15252240, which =
GLOBAL_BLOCK, mdict_iter = {
                mdict = 0x8177c3 <ui_out::push_level(ui_out_type)+21>, iterator
= {dict = 0x7fffffffe010, index = 207115152, current = 0x1}, current_idx =
47888}}}}
        __for_begin = {m_sym = 0x16b19810, m_iter = {d = {compunit_symtab =
0x16b19a10, block = 0x16b19a10}, name = 0x0, idx = -1, which =
FIRST_LOCAL_BLOCK, mdict_iter = {mdict = 0x16b19a50, iterator = {dict =
0x16b19a70, index = 1, current = 0xf47190}, current_idx = 0}}}
        __for_end = <optimized out>
        b = 0x16b19a10
        uiout = 0xe8bb10
        first = 0
        highest_offset = -1
        args_printed = 0
        print_names = true
        print_args = true
        __func__ = "print_frame_args"
#12 0x000000000079accc in print_frame (sal=..., print_args=1,
print_what=LOCATION, print_level=1, frame=..., fp_opts=...) at
../../gdb-14.1/gdb/stack.c:1382
        list_emitter = <optimized out>
        numargs = -1
        tuple_emitter = <optimized out>
        stb = {<ui_file> = {_vptr.ui_file = 0xa93310 <vtable for
string_file+16>, m_applied_style = {m_foreground = {m_simple = true, {m_value =
-1, {m_red = 255 '\377', m_green = 255 '\377', m_blue = 255 '\377'}}},
m_background = {m_simple = true, {m_value = -1, {
                    m_red = 255 '\377', m_green = 255 '\377', m_blue = 255
'\377'}}}, m_intensity = ui_file_style::NORMAL, m_reverse = false}}, m_string =
"", m_term_out = false}
        gdbarch = 0x27ac0e0
        funlang = language_cplus
        opts = {prettyformat = Val_prettyformat_default, prettyformat_arrays =
false, prettyformat_structs = false, vtblprint = false, unionprint = true,
addressprint = true, nibblesprint = false, objectprint = false, print_max =
200, print_max_chars = 0, 
--Type <RET> for more, q to quit, c to continue without paging--c
          repeat_count_threshold = 10, output_format = 0, format = 0,
memory_tag_violations = true, stop_print_at_null = false, print_array_indexes =
false, deref_ref = false, static_field_print = true, pascal_static_field_print
= true, raw = false, summary = false, 
          symbol_print = true, max_depth = 20}
        func = 0x16b19710
        pc_p = 1
        uiout = 0xe8bb10
        pc = 140352872250355
        funname = std::unique_ptr<char> = {get() = 0x10b260d0
"v8::internal::ExternalPointerTable::Mark"}
        gdbarch = <optimized out>
        uiout = <optimized out>
        funlang = <optimized out>
        opts = <optimized out>
        func = <optimized out>
        pc = <optimized out>
        pc_p = <optimized out>
        funname = <optimized out>
        __func__ = <optimized out>
        tuple_emitter = <optimized out>
        stb = <optimized out>
        numargs = <optimized out>
        list_emitter = <optimized out>
        e = <optimized out>
        filename_display = <optimized out>
        fullname = <optimized out>
        lib = <optimized out>
#13 print_frame_info (fp_opts=..., frame=..., print_level=print_level@entry=1,
print_what=print_what@entry=LOCATION, print_args=print_args@entry=1,
set_current_sal=set_current_sal@entry=0) at ../../gdb-14.1/gdb/stack.c:1108
        gdbarch = 0x27ac0e0
        source_print = <optimized out>
        location_print = 1
        uiout = 0xe8bb10
        sal = {pspace = 0xd2a820, symtab = 0x8923e80, symbol = <optimized out>,
section = <optimized out>, msymbol = <optimized out>, line = <optimized out>,
pc = <optimized out>, end = <optimized out>, explicit_pc = <optimized out>,
explicit_line = <optimized out>, 
          is_stmt = <optimized out>, prob = <optimized out>, objfile =
<optimized out>}
#14 0x000000000079c265 in backtrace_command_1 (from_tty=1, count_exp=<optimized
out>, bt_opts=..., fp_opts=...) at ../../gdb-14.1/gdb/stack.c:2062
        trailing = {<intrusive_list_node<frame_info_ptr>> = {next =
0x7fffffffe130, prev = 0x7fffffffe030}, static invalid_level = -2, m_ptr =
0x70521f0, m_cached_id = {stack_addr = 140352631310304, code_addr =
140352949243184, special_addr = 0, 
            stack_status = FID_STACK_VALID, code_addr_p = 1, special_addr_p =
0, user_created_p = 0, artificial_depth = 0}, m_cached_level = 4, static
frame_list = {m_front = 0xcecd60 <selected_frame>, m_back = 0x7fffffffdd70}}
        count = -7
        py_start = 0
        flags = {m_enum_value = (PRINT_LEVEL | PRINT_FRAME_INFO | PRINT_ARGS |
PRINT_MORE_FRAMES)}
        fi = {<intrusive_list_node<frame_info_ptr>> = {next = 0x7fffffffe070,
prev = 0xcecd60 <selected_frame>}, static invalid_level = -2, m_ptr =
0x1649de40, m_cached_id = {stack_addr = 140352631310368, code_addr =
140352872250160, special_addr = 0, 
            stack_status = FID_STACK_VALID, code_addr_p = 1, special_addr_p =
0, user_created_p = 0, artificial_depth = 0}, m_cached_level = 5, static
frame_list = {m_front = 0xcecd60 <selected_frame>, m_back = 0x7fffffffdd70}}
        py_end = -1
        result = <optimized out>
        fi = <optimized out>
        count = <optimized out>
        py_start = <optimized out>
        py_end = <optimized out>
        result = <optimized out>
        flags = <optimized out>
        __func__ = <optimized out>
        arg_type = <optimized out>
        trailing = <optimized out>
        reason = <optimized out>
#15 backtrace_command (arg=<optimized out>, from_tty=1) at
../../gdb-14.1/gdb/stack.c:2168
        fp_opts = {print_frame_arguments = 0xa77578
<print_frame_arguments_scalars> "scalars", print_frame_info = 0xa77524
<print_frame_info_auto> "auto", print_entry_values = 0xa77440
<print_entry_values_default> "default", print_raw_frame_arguments = false}
        bt_cmd_opts = {full = false, no_filters = false, hide = false}
        set_bt_opts = {backtrace_past_main = false, backtrace_past_entry =
false, backtrace_limit = 4294967295}
        grp = {_M_elems = {{options = {m_array = 0xcf3e80
<frame_print_option_defs>, m_size = 4}, ctx = 0x7fffffffe1d0}, {options =
{m_array = 0xcecc80 <set_backtrace_option_defs>, m_size = 2}, ctx =
0x7fffffffe1c4}, {options = {
                m_array = 0xcf3d60 <backtrace_command_option_defs>, m_size =
3}, ctx = 0x7fffffffe1cd}}}
        restore_set_backtrace_options = @0x7fffffffe1f0: {m_saved_var = 0x0}
#16 0x00000000004dfa5d in do_simple_func (args=<optimized out>,
from_tty=<optimized out>, c=<optimized out>) at
../../gdb-14.1/gdb/cli/cli-decode.c:95
No locals.
#17 0x00000000004e021a in cmd_func (cmd=cmd@entry=0xdca890,
args=args@entry=0x0, from_tty=from_tty@entry=1) at
../../gdb-14.1/gdb/cli/cli-decode.c:2735
        restore_suppress = {{m_dummy = {<No data fields>}, m_item =
{<scoped_restore_base> = {m_saved_var = 0x0}, m_saved_value = false}, dont_use
= 0 '\000'}, m_instantiated = false}
#18 0x00000000007ebed9 in execute_command (p=<optimized out>, p@entry=0xd22f10
"bt", from_tty=1) at ../../gdb-14.1/gdb/top.c:575
        default_args_and_arg = ""
        without_whitespace = ""
        cmd2 = 0x1 <error: Cannot access memory at address 0x1>
        cmd = 0xd22f12 ""
        arg = 0x0
        default_args = ""
        was_sync = 0
        save_repeat_args = <optimized out>
        args_pointer = 0xd22f12 ""
        c = 0xdca890
        line = 0xd22f10 "bt"
        cmd_start = 0xd22f10 "bt"
        cleanup_if_error = {<scope_exit_base<scope_exit<void (*)()> >> =
{m_released = false}, m_exit_function = <optimized out>}
        cleanup = {m_value = 0x0, m_freed = false}
        cmd_copy = "bt"
        __func__ = "execute_command"
#19 0x00000000005abaf5 in command_handler (command=0xd22f10 "bt") at
../../gdb-14.1/gdb/event-top.c:552
        ui = 0xd22c00
        c = <optimized out>
        stat_reporter = {m_msg_type = true, m_time_enabled = false,
m_space_enabled = false, m_symtab_enabled = false, m_start_cpu_time = {__d =
{__r = 0}}, m_start_wall_time = {__d = {__r = 0}}, m_start_space = 13773824,
m_start_nr_symtabs = 22444048, 
          m_start_nr_compunit_symtabs = 0, m_start_nr_blocks = 13773824}
#20 0x00000000005ac95a in command_line_handler (rl=...) at
../../gdb-14.1/gdb/event-top.c:788
        scope_exit_786 =
{<scope_exit_base<scope_exit<command_line_handler(gdb::unique_xmalloc_ptr<char>&&)::<lambda()>
> >> = {m_released = <optimized out>}, m_exit_function = {__line_buffer =
"bt"}}
        line_buffer = "bt"
        ui = 0xd22c00
        cmd = <optimized out>
#21 0x0000000000803808 in tui_command_line_handler (rl=...) at
../../gdb-14.1/gdb/tui/tui-interp.c:104
No locals.
#22 0x00000000005ab3ec in gdb_rl_callback_handler (rl=0x1567810 "bt") at
../../gdb-14.1/gdb/event-top.c:259
        gdb_rl_expt = {reason = 0, error = GDB_NO_ERROR, message =
std::shared_ptr<std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >> (empty) = {get() = 0x0}}
        ui = 0xd22c00
#23 0x0000000000861be8 in rl_callback_read_char () at
../../../gdb-14.1/readline/readline/callback.c:290
        line = 0x1567810 "bt"
        eof = <optimized out>
        jcode = <optimized out>
        olevel = {{__jmpbuf = {13773824, -8388384960170843644, 1, 4281702,
13359096, 140737354125376, 8388383527645323780, -8388384590556716540},
__mask_was_saved = 0, __saved_mask = {__val = {0 <repeats 16 times>}}}}
#24 0x00000000005ab658 in gdb_rl_callback_read_char_wrapper_noexcept () at
../../gdb-14.1/gdb/event-top.c:195
        gdb_expt = {reason = 0, error = GDB_NO_ERROR, message =
std::shared_ptr<std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >> (empty) = {get() = 0x0}}
#25 0x00000000005ab76b in gdb_rl_callback_read_char_wrapper
(client_data=<optimized out>) at ../../gdb-14.1/gdb/event-top.c:234
        gdb_expt = {reason = 0, error = GDB_NO_ERROR, message =
std::shared_ptr<std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >> (empty) = {get() = 0x0}}
#26 0x0000000000819898 in stdin_event_handler (error=<optimized out>,
client_data=0xd22c00) at ../../gdb-14.1/gdb/ui.c:155
        ui = 0xd22c00
#27 0x000000000095fda3 in handle_file_event (file_ptr=0xf95e50,
ready_mask=<optimized out>) at ../../gdb-14.1/gdbsupport/event-loop.cc:573
        mask = <optimized out>
        __func__ = "handle_file_event"
#28 0x00000000009604f9 in gdb_wait_for_event (block=block@entry=1) at
../../gdb-14.1/gdbsupport/event-loop.cc:694
        i = <optimized out>
        mask = <optimized out>
        file_ptr = <optimized out>
        num_found = 1
        __func__ = "gdb_wait_for_event"
#29 0x0000000000960ab4 in gdb_do_one_event (mstimeout=mstimeout@entry=-1) at
../../gdb-14.1/gdbsupport/event-loop.cc:264
        event_source_head = 0
        number_of_sources = 3
        current = <optimized out>
        timer_id = {{m_dummy = {<No data fields>}, m_item = 0, dont_use = 0
'\000'}, m_instantiated = false}
        scope_exit_251 =
{<scope_exit_base<scope_exit<gdb_do_one_event(int)::<lambda()> > >> =
{m_released = <optimized out>}, m_exit_function = {__timer_id =
@0x7fffffffe558}}
#30 0x000000000068d1cb in start_event_loop () at ../../gdb-14.1/gdb/main.c:407
        result = 0
#31 captured_command_loop () at ../../gdb-14.1/gdb/main.c:471
        ui = 0xd22c00
#32 0x000000000068eeef in captured_main (data=0x7fffffffe590) at
../../gdb-14.1/gdb/main.c:1324
        context = 0x7fffffffe590
        context = <optimized out>
        ex = <optimized out>
        ex = <optimized out>
#33 gdb_main (args=args@entry=0x7fffffffe5d0) at ../../gdb-14.1/gdb/main.c:1343
No locals.
#34 0x000000000041559b in main (argc=3, argv=0x7fffffffe718) at
../../gdb-14.1/gdb/gdb.c:39
        __func__ = "main"
        args = {argc = 3, argv = 0x7fffffffe718, interpreter_p = 0x98704a
"console"}

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug backtrace/31560] Segfault when computing backtrace
  2024-03-26 15:49 [Bug backtrace/31560] New: Segfault when computing backtrace wingo at igalia dot com
                   ` (2 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: wingo at igalia dot com @ 2024-03-27 13:16 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #4 from Andy Wingo <wingo at igalia dot com> ---
(Happy to provide the executable but really you need the core file too, which
is 600MB or something.  Let me know if you want it, I am sure it compresses
well...)

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug backtrace/31560] Segfault when computing backtrace
  2024-03-26 15:49 [Bug backtrace/31560] New: Segfault when computing backtrace wingo at igalia dot com
                   ` (3 preceding siblings ...)
  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
  6 siblings, 0 replies; 8+ messages in thread
From: simon.marchi at polymtl dot ca @ 2024-03-27 15:12 UTC (permalink / raw)
  To: gdb-prs

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

Simon Marchi <simon.marchi at polymtl dot ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |simon.marchi at polymtl dot ca

--- Comment #5 from Simon Marchi <simon.marchi at polymtl dot ca> ---
(In reply to Andy Wingo from comment #4)
> (Happy to provide the executable but really you need the core file too,
> which is 600MB or something.  Let me know if you want it, I am sure it
> compresses well...)

Looking at the first two frames:

#0  block::scope (this=<optimized out>) at ../../gdb-14.1/gdb/block.c:293
        block = 0x0
#1  0x0000000000516c27 in cp_lookup_transparent_type (name=0x74539c0
"v8::internal::ExternalPointerTable::Space") at
../../gdb-14.1/gdb/cp-namespace.c:1029
        t = 0x0
        scope = <optimized out>

block::scope is called with a nullptr "this" from cp_lookup_transparent_type. 
So that would probably be fixed by this commit in master:

https://gitlab.com/gnutools/binutils-gdb/-/commit/576745e26c0ec76a53ba45b20af464628a50b3e4

It has been cherry-picked to the 14 branch, and is in 14.2:

https://gitlab.com/gnutools/binutils-gdb/-/commit/bc23ea51f8a83e9524dfb553baa8baacb29e68a9

Can you check if that fixes your problem?

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug backtrace/31560] Segfault when computing backtrace
  2024-03-26 15:49 [Bug backtrace/31560] New: Segfault when computing backtrace wingo at igalia dot com
                   ` (4 preceding siblings ...)
  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
  6 siblings, 0 replies; 8+ messages in thread
From: wingo at igalia dot com @ 2024-03-29  7:41 UTC (permalink / raw)
  To: gdb-prs

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

--- Comment #6 from Andy Wingo <wingo at igalia dot com> ---
(In reply to Simon Marchi from comment #5)
> block::scope is called with a nullptr "this" from
> cp_lookup_transparent_type.  So that would probably be fixed by this commit
> in master:
> 
> https://gitlab.com/gnutools/binutils-gdb/-/commit/
> 576745e26c0ec76a53ba45b20af464628a50b3e4
> 
> It has been cherry-picked to the 14 branch, and is in 14.2:
> 
> https://gitlab.com/gnutools/binutils-gdb/-/commit/
> bc23ea51f8a83e9524dfb553baa8baacb29e68a9
> 
> Can you check if that fixes your problem?

Just checked and yes it does fix the problem!  Thank you!!

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug backtrace/31560] Segfault when computing backtrace
  2024-03-26 15:49 [Bug backtrace/31560] New: Segfault when computing backtrace wingo at igalia dot com
                   ` (5 preceding siblings ...)
  2024-03-29  7:41 ` wingo at igalia dot com
@ 2024-03-29  8:00 ` wingo at igalia dot com
  6 siblings, 0 replies; 8+ messages in thread
From: wingo at igalia dot com @ 2024-03-29  8:00 UTC (permalink / raw)
  To: gdb-prs

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

Andy Wingo <wingo at igalia dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #7 from Andy Wingo <wingo at igalia dot com> ---
.

*** This bug has been marked as a duplicate of bug 31128 ***

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-03-29  8:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-26 15:49 [Bug backtrace/31560] New: Segfault when computing backtrace wingo at igalia dot com
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

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).