From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7459E3858C55; Wed, 27 Mar 2024 13:15:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7459E3858C55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1711545331; bh=bM5tBZNtf7sCc+WuVcvyexcYyZanlm4OQLCiR2QQFPc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=KWGRJE/TZUcszlY98YXstN+FUOmSzsnGW3qxtjF2+QLCkgt+AifwEjLacMzjvd2cM IAUaultEl3tbuAtNFGrwsVhMK6mNWulGUk9kO8jGuckqZzd6tiT/6Yu/I/YFboe9mB WLmkPjJPDapE6+uOo0Tlk3QF0B7Kr2sPIcqPAtqE= From: "wingo at igalia dot com" To: gdb-prs@sourceware.org Subject: [Bug backtrace/31560] Segfault when computing backtrace Date: Wed, 27 Mar 2024 13:15:30 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: backtrace X-Bugzilla-Version: 14.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: wingo at igalia 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: Message-ID: In-Reply-To: References: 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=3D31560 --- Comment #3 from Andy Wingo --- (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=3D-O0 -g. The bug went away :(. Seriously, same s= ource, different compilation option... Tried with -O1 -g, and the bug is there ag= ain, with a more useful backtrace: (gdb) bt full #0 block::scope (this=3D) at ../../gdb-14.1/gdb/block.c:293 block =3D 0x0 #1 0x0000000000516c27 in cp_lookup_transparent_type (name=3D0x74539c0 "v8::internal::ExternalPointerTable::Space") at ../../gdb-14.1/gdb/cp-namespace.c:1029 t =3D 0x0 scope =3D #2 0x00000000004ced68 in cplus_language::lookup_transparent_type (this=3D, name=3D) at ../../gdb-14.1/gdb/c-la= ng.c:940 No locals. #3 0x00000000007b6253 in lookup_transparent_type (name=3D) = at ../../gdb-14.1/gdb/symtab.c:2673 No locals. #4 0x00000000005dfbca in check_typedef (type=3Dtype@entry=3D0x9fffec0) at ../../gdb-14.1/gdb/gdbtypes.c:3052 name =3D newtype =3D orig_type =3D 0x9fffec0 __func__ =3D "check_typedef" instance_flags =3D {m_enum_value =3D 0} #5 0x00000000004d41fb in c_value_print_ptr (options=3D0x7fffffffd860, recu= rse=3D2, stream=3D0x7fffffffd990, val=3D) at ../../gdb-14.1/gdb/c-valprint.c:352 unresolved_elttype =3D 0x9fffec0 elttype =3D addr =3D type =3D 0x9ffff60 valaddr =3D 0x1653b450 "\b`\370\222BV" #6 c_value_print_inner (val=3D, stream=3D0x7fffffffd990, re= curse=3D2, options=3D0x7fffffffd860) at ../../gdb-14.1/gdb/c-valprint.c:435 type =3D #7 0x00000000006590c2 in language_defn::value_print_inner (this=3D, val=3D, stream=3D, recurse=3D, options=3D) at ../../gdb-14.1/gdb/language.c:608 No locals. #8 0x000000000082e302 in common_val_print (value=3Dvalue@entry=3D0x11537be= 0, stream=3Dstream@entry=3D0x7fffffffd990, recurse=3Drecurse@entry=3D2, options=3Doptions@entry=3D0x7fffffffd940, language=3Dlanguage@entry=3D0xcdd= 170 ) at ../../gdb-14.1/gdb/valprint.c:1092 local_opts =3D {prettyformat =3D Val_no_prettyformat, prettyformat_= arrays =3D false, prettyformat_structs =3D false, vtblprint =3D false, unionprint =3D = true, addressprint =3D true, nibblesprint =3D false, objectprint =3D false, print= _max =3D 200, print_max_chars =3D 0,=20 repeat_count_threshold =3D 10, output_format =3D 0, format =3D 0, memory_tag_violations =3D true, stop_print_at_null =3D false, print_array_i= ndexes =3D false, deref_ref =3D true, static_field_print =3D true, pascal_static_field= _print =3D true, raw =3D false, summary =3D true,=20 symbol_print =3D true, max_depth =3D 20} type =3D 0x9ffff60 real_type =3D 0x9ffff60 #9 0x000000000082e445 in common_val_print_checked (val=3D0x11537be0, stream=3Dstream@entry=3D0x7fffffffd990, recurse=3Drecurse@entry=3D2, options=3Doptions@entry=3D0x7fffffffd940, language=3Dlanguage@entry=3D0xcdd= 170 ) at ../../gdb-14.1/gdb/valprint.c:1184 No locals. #10 0x0000000000791cae in print_frame_arg (fp_opts=3D..., arg=3Darg@entry=3D0x7fffffffdaa0) at ../../gdb-14.1/gdb/stack.c:487 language =3D 0xcdd170 vp_opts =3D {prettyformat =3D Val_no_prettyformat, prettyformat_arr= ays =3D false, prettyformat_structs =3D false, vtblprint =3D false, unionprint =3D = true, addressprint =3D true, nibblesprint =3D false, objectprint =3D false, print= _max =3D 200, print_max_chars =3D 0,=20 repeat_count_threshold =3D 10, output_format =3D 0, format =3D 0, memory_tag_violations =3D true, stop_print_at_null =3D false, print_array_i= ndexes =3D false, deref_ref =3D true, static_field_print =3D true, pascal_static_field= _print =3D true, raw =3D false, summary =3D true,=20 symbol_print =3D true, max_depth =3D 20} uiout =3D 0xe8bb10 stb =3D { =3D {_vptr.ui_file =3D 0xa93310 , m_applied_style =3D {m_foreground =3D {m_simple =3D true, = {m_value =3D -1, {m_red =3D 255 '\377', m_green =3D 255 '\377', m_blue =3D 255 '\377'}}}, m_background =3D {m_simple =3D true, {m_value =3D -1, { m_red =3D 255 '\377', m_green =3D 255 '\377', m_blue = =3D 255 '\377'}}}, m_intensity =3D ui_file_style::NORMAL, m_reverse =3D false}}, m_= string =3D "", m_term_out =3D false} __func__ =3D "print_frame_arg" arg_emitter =3D tuple_emitter =3D {m_uiout =3D 0xe8bb10} style =3D {m_foreground =3D {m_simple =3D true, {m_value =3D -1, {m= _red =3D 255 '\377', m_green =3D 255 '\377', m_blue =3D 255 '\377'}}}, m_background =3D = {m_simple =3D true, {m_value =3D -1, {m_red =3D 255 '\377', m_green =3D 255 '\377', m= _blue =3D 255 '\377'}}},=20 m_intensity =3D ui_file_style::NORMAL, m_reverse =3D false} #11 0x000000000079741f in print_frame_args (fp_opts=3D..., func=3D, frame=3D..., num=3Dnum@entry=3D-1, stream=3D0xd22d20) at ../../gdb-14.1/gdb= /stack.c:883 arg =3D {sym =3D 0x16b19810, val =3D 0x11537be0, error =3D std::unique_ptr =3D {get() =3D 0x0}, entry_kind =3D 0xa77477 "no"} entryarg =3D {sym =3D 0x16b19810, val =3D 0x0, error =3D std::uniqu= e_ptr =3D {get() =3D 0x0}, entry_kind =3D 0xa77477 "no"} sym =3D 0x16b19810 __for_range =3D @0x7fffffffdb70: {m_begin =3D {m_sym =3D 0x16b19790= , m_iter =3D {d =3D {compunit_symtab =3D 0x16b19a10, block =3D 0x16b19a10}, name =3D 0x0= , idx =3D -1, which =3D FIRST_LOCAL_BLOCK, mdict_iter =3D {mdict =3D 0x16b19a50, iterator= =3D {dict =3D 0x16b19a70, index =3D 0,=20 current =3D 0xf47190}, current_idx =3D 0}}}, m_end =3D {m= _sym =3D 0x0, m_iter =3D {d =3D {compunit_symtab =3D 0x9ad0d0, block =3D 0x9ad0d0}, = name =3D 0x9632b0 , idx =3D 15252240, which =3D GLOBAL_BLOCK, mdict_iter =3D { mdict =3D 0x8177c3 , it= erator =3D {dict =3D 0x7fffffffe010, index =3D 207115152, current =3D 0x1}, curren= t_idx =3D 47888}}}} __for_begin =3D {m_sym =3D 0x16b19810, m_iter =3D {d =3D {compunit_= symtab =3D 0x16b19a10, block =3D 0x16b19a10}, name =3D 0x0, idx =3D -1, which =3D FIRST_LOCAL_BLOCK, mdict_iter =3D {mdict =3D 0x16b19a50, iterator =3D {dict= =3D 0x16b19a70, index =3D 1, current =3D 0xf47190}, current_idx =3D 0}}} __for_end =3D b =3D 0x16b19a10 uiout =3D 0xe8bb10 first =3D 0 highest_offset =3D -1 args_printed =3D 0 print_names =3D true print_args =3D true __func__ =3D "print_frame_args" #12 0x000000000079accc in print_frame (sal=3D..., print_args=3D1, print_what=3DLOCATION, print_level=3D1, frame=3D..., fp_opts=3D...) at ../../gdb-14.1/gdb/stack.c:1382 list_emitter =3D numargs =3D -1 tuple_emitter =3D stb =3D { =3D {_vptr.ui_file =3D 0xa93310 , m_applied_style =3D {m_foreground =3D {m_simple =3D true, = {m_value =3D -1, {m_red =3D 255 '\377', m_green =3D 255 '\377', m_blue =3D 255 '\377'}}}, m_background =3D {m_simple =3D true, {m_value =3D -1, { m_red =3D 255 '\377', m_green =3D 255 '\377', m_blue = =3D 255 '\377'}}}, m_intensity =3D ui_file_style::NORMAL, m_reverse =3D false}}, m_= string =3D "", m_term_out =3D false} gdbarch =3D 0x27ac0e0 funlang =3D language_cplus opts =3D {prettyformat =3D Val_prettyformat_default, prettyformat_a= rrays =3D false, prettyformat_structs =3D false, vtblprint =3D false, unionprint =3D = true, addressprint =3D true, nibblesprint =3D false, objectprint =3D false, print= _max =3D 200, print_max_chars =3D 0,=20 --Type for more, q to quit, c to continue without paging--c repeat_count_threshold =3D 10, output_format =3D 0, format =3D 0, memory_tag_violations =3D true, stop_print_at_null =3D false, print_array_i= ndexes =3D false, deref_ref =3D false, static_field_print =3D true, pascal_static_fiel= d_print =3D true, raw =3D false, summary =3D false,=20 symbol_print =3D true, max_depth =3D 20} func =3D 0x16b19710 pc_p =3D 1 uiout =3D 0xe8bb10 pc =3D 140352872250355 funname =3D std::unique_ptr =3D {get() =3D 0x10b260d0 "v8::internal::ExternalPointerTable::Mark"} gdbarch =3D uiout =3D funlang =3D opts =3D func =3D pc =3D pc_p =3D funname =3D __func__ =3D tuple_emitter =3D stb =3D numargs =3D list_emitter =3D e =3D filename_display =3D fullname =3D lib =3D #13 print_frame_info (fp_opts=3D..., frame=3D..., print_level=3Dprint_level= @entry=3D1, print_what=3Dprint_what@entry=3DLOCATION, print_args=3Dprint_args@entry=3D1, set_current_sal=3Dset_current_sal@entry=3D0) at ../../gdb-14.1/gdb/stack.c:= 1108 gdbarch =3D 0x27ac0e0 source_print =3D location_print =3D 1 uiout =3D 0xe8bb10 sal =3D {pspace =3D 0xd2a820, symtab =3D 0x8923e80, symbol =3D , section =3D , msymbol =3D , line =3D , pc =3D , end =3D , explicit_pc =3D , explicit_line =3D ,=20 is_stmt =3D , prob =3D , objfile =3D } #14 0x000000000079c265 in backtrace_command_1 (from_tty=3D1, count_exp=3D, bt_opts=3D..., fp_opts=3D...) at ../../gdb-14.1/gdb/stack.c:2062 trailing =3D {> =3D {next =3D 0x7fffffffe130, prev =3D 0x7fffffffe030}, static invalid_level =3D -2, m_pt= r =3D 0x70521f0, m_cached_id =3D {stack_addr =3D 140352631310304, code_addr =3D 140352949243184, special_addr =3D 0,=20 stack_status =3D FID_STACK_VALID, code_addr_p =3D 1, special_ad= dr_p =3D 0, user_created_p =3D 0, artificial_depth =3D 0}, m_cached_level =3D 4, sta= tic frame_list =3D {m_front =3D 0xcecd60 , m_back =3D 0x7ffffff= fdd70}} count =3D -7 py_start =3D 0 flags =3D {m_enum_value =3D (PRINT_LEVEL | PRINT_FRAME_INFO | PRINT= _ARGS | PRINT_MORE_FRAMES)} fi =3D {> =3D {next =3D 0x7ffff= fffe070, prev =3D 0xcecd60 }, static invalid_level =3D -2, m_ptr =3D 0x1649de40, m_cached_id =3D {stack_addr =3D 140352631310368, code_addr =3D 140352872250160, special_addr =3D 0,=20 stack_status =3D FID_STACK_VALID, code_addr_p =3D 1, special_ad= dr_p =3D 0, user_created_p =3D 0, artificial_depth =3D 0}, m_cached_level =3D 5, sta= tic frame_list =3D {m_front =3D 0xcecd60 , m_back =3D 0x7ffffff= fdd70}} py_end =3D -1 result =3D fi =3D count =3D py_start =3D py_end =3D result =3D flags =3D __func__ =3D arg_type =3D trailing =3D reason =3D #15 backtrace_command (arg=3D, from_tty=3D1) at ../../gdb-14.1/gdb/stack.c:2168 fp_opts =3D {print_frame_arguments =3D 0xa77578 "scalars", print_frame_info =3D 0xa77524 "auto", print_entry_values =3D 0xa77440 "default", print_raw_frame_arguments =3D false} bt_cmd_opts =3D {full =3D false, no_filters =3D false, hide =3D fal= se} set_bt_opts =3D {backtrace_past_main =3D false, backtrace_past_entr= y =3D false, backtrace_limit =3D 4294967295} grp =3D {_M_elems =3D {{options =3D {m_array =3D 0xcf3e80 , m_size =3D 4}, ctx =3D 0x7fffffffe1d0}, {options= =3D {m_array =3D 0xcecc80 , m_size =3D 2}, ctx =3D 0x7fffffffe1c4}, {options =3D { m_array =3D 0xcf3d60 , m_siz= e =3D 3}, ctx =3D 0x7fffffffe1cd}}} restore_set_backtrace_options =3D @0x7fffffffe1f0: {m_saved_var =3D= 0x0} #16 0x00000000004dfa5d in do_simple_func (args=3D, from_tty=3D, c=3D) at ../../gdb-14.1/gdb/cli/cli-decode.c:95 No locals. #17 0x00000000004e021a in cmd_func (cmd=3Dcmd@entry=3D0xdca890, args=3Dargs@entry=3D0x0, from_tty=3Dfrom_tty@entry=3D1) at ../../gdb-14.1/gdb/cli/cli-decode.c:2735 restore_suppress =3D {{m_dummy =3D {}, m_item =3D { =3D {m_saved_var =3D 0x0}, m_saved_value =3D false},= dont_use =3D 0 '\000'}, m_instantiated =3D false} #18 0x00000000007ebed9 in execute_command (p=3D, p@entry=3D0= xd22f10 "bt", from_tty=3D1) at ../../gdb-14.1/gdb/top.c:575 default_args_and_arg =3D "" without_whitespace =3D "" cmd2 =3D 0x1 cmd =3D 0xd22f12 "" arg =3D 0x0 default_args =3D "" was_sync =3D 0 save_repeat_args =3D args_pointer =3D 0xd22f12 "" c =3D 0xdca890 line =3D 0xd22f10 "bt" cmd_start =3D 0xd22f10 "bt" cleanup_if_error =3D { >> =3D {m_released =3D false}, m_exit_function =3D } cleanup =3D {m_value =3D 0x0, m_freed =3D false} cmd_copy =3D "bt" __func__ =3D "execute_command" #19 0x00000000005abaf5 in command_handler (command=3D0xd22f10 "bt") at ../../gdb-14.1/gdb/event-top.c:552 ui =3D 0xd22c00 c =3D stat_reporter =3D {m_msg_type =3D true, m_time_enabled =3D false, m_space_enabled =3D false, m_symtab_enabled =3D false, m_start_cpu_time =3D= {__d =3D {__r =3D 0}}, m_start_wall_time =3D {__d =3D {__r =3D 0}}, m_start_space = =3D 13773824, m_start_nr_symtabs =3D 22444048,=20 m_start_nr_compunit_symtabs =3D 0, m_start_nr_blocks =3D 13773824} #20 0x00000000005ac95a in command_line_handler (rl=3D...) at ../../gdb-14.1/gdb/event-top.c:788 scope_exit_786 =3D {&&):: > >> =3D {m_released =3D }, m_exit_function =3D {__line_buff= er =3D "bt"}} line_buffer =3D "bt" ui =3D 0xd22c00 cmd =3D #21 0x0000000000803808 in tui_command_line_handler (rl=3D...) at ../../gdb-14.1/gdb/tui/tui-interp.c:104 No locals. #22 0x00000000005ab3ec in gdb_rl_callback_handler (rl=3D0x1567810 "bt") at ../../gdb-14.1/gdb/event-top.c:259 gdb_rl_expt =3D {reason =3D 0, error =3D GDB_NO_ERROR, message =3D std::shared_ptr, std::allocator >> (empty) =3D {get() =3D 0x0}} ui =3D 0xd22c00 #23 0x0000000000861be8 in rl_callback_read_char () at ../../../gdb-14.1/readline/readline/callback.c:290 line =3D 0x1567810 "bt" eof =3D jcode =3D olevel =3D {{__jmpbuf =3D {13773824, -8388384960170843644, 1, 42817= 02, 13359096, 140737354125376, 8388383527645323780, -8388384590556716540}, __mask_was_saved =3D 0, __saved_mask =3D {__val =3D {0 }}= }} #24 0x00000000005ab658 in gdb_rl_callback_read_char_wrapper_noexcept () at ../../gdb-14.1/gdb/event-top.c:195 gdb_expt =3D {reason =3D 0, error =3D GDB_NO_ERROR, message =3D std::shared_ptr, std::allocator >> (empty) =3D {get() =3D 0x0}} #25 0x00000000005ab76b in gdb_rl_callback_read_char_wrapper (client_data=3D) at ../../gdb-14.1/gdb/event-top.c:234 gdb_expt =3D {reason =3D 0, error =3D GDB_NO_ERROR, message =3D std::shared_ptr, std::allocator >> (empty) =3D {get() =3D 0x0}} #26 0x0000000000819898 in stdin_event_handler (error=3D, client_data=3D0xd22c00) at ../../gdb-14.1/gdb/ui.c:155 ui =3D 0xd22c00 #27 0x000000000095fda3 in handle_file_event (file_ptr=3D0xf95e50, ready_mask=3D) at ../../gdb-14.1/gdbsupport/event-loop.cc:573 mask =3D __func__ =3D "handle_file_event" #28 0x00000000009604f9 in gdb_wait_for_event (block=3Dblock@entry=3D1) at ../../gdb-14.1/gdbsupport/event-loop.cc:694 i =3D mask =3D file_ptr =3D num_found =3D 1 __func__ =3D "gdb_wait_for_event" #29 0x0000000000960ab4 in gdb_do_one_event (mstimeout=3Dmstimeout@entry=3D-= 1) at ../../gdb-14.1/gdbsupport/event-loop.cc:264 event_source_head =3D 0 number_of_sources =3D 3 current =3D timer_id =3D {{m_dummy =3D {}, m_item =3D 0, dont_u= se =3D 0 '\000'}, m_instantiated =3D false} scope_exit_251 =3D { > >> =3D {m_released =3D }, m_exit_function =3D {__timer_id =3D @0x7fffffffe558}} #30 0x000000000068d1cb in start_event_loop () at ../../gdb-14.1/gdb/main.c:= 407 result =3D 0 #31 captured_command_loop () at ../../gdb-14.1/gdb/main.c:471 ui =3D 0xd22c00 #32 0x000000000068eeef in captured_main (data=3D0x7fffffffe590) at ../../gdb-14.1/gdb/main.c:1324 context =3D 0x7fffffffe590 context =3D ex =3D ex =3D #33 gdb_main (args=3Dargs@entry=3D0x7fffffffe5d0) at ../../gdb-14.1/gdb/mai= n.c:1343 No locals. #34 0x000000000041559b in main (argc=3D3, argv=3D0x7fffffffe718) at ../../gdb-14.1/gdb/gdb.c:39 __func__ =3D "main" args =3D {argc =3D 3, argv =3D 0x7fffffffe718, interpreter_p =3D 0x= 98704a "console"} --=20 You are receiving this mail because: You are on the CC list for the bug.=