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] Segfault when computing backtrace Date: Wed, 27 Mar 2024 13:15:30 +0000 [thread overview] Message-ID: <bug-31560-4717-R9rswy7vgD@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-31560-4717@http.sourceware.org/bugzilla/> 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.
next prev parent reply other threads:[~2024-03-27 13:15 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-03-26 15:49 [Bug backtrace/31560] New: " 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 [this message] 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-R9rswy7vgD@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: linkBe 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).