public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "georgepee at gmail dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug backtrace/29395] New: blockframe.c:79: internal-error: get_frame_block: Assertion `bl != NULL' failed. Date: Fri, 22 Jul 2022 13:02:43 +0000 [thread overview] Message-ID: <bug-29395-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=29395 Bug ID: 29395 Summary: blockframe.c:79: internal-error: get_frame_block: Assertion `bl != NULL' failed. Product: gdb Version: 11.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: backtrace Assignee: unassigned at sourceware dot org Reporter: georgepee at gmail dot com Target Milestone: --- Starting with gdb 11.x, I encounter this assertion failure on certain backtraces ../../gdb/blockframe.c:79: internal-error: get_frame_block: Assertion `bl != NULL' failed. Not really knowing much about the GDB and DWARF structures, I did this as an experiment and then GDB 11.x shows the same backtrace that GDB 10.x did. ``` diff --git a/gdb/blockframe.c b/gdb/blockframe.c index 50c464f44a2..0ee8313abea 100644 --- a/gdb/blockframe.c +++ b/gdb/blockframe.c @@ -70,13 +70,12 @@ get_frame_block (struct frame_info *frame, CORE_ADDR *addr_in_block) inline_count = frame_inlined_callees (frame); - while (inline_count > 0) + while (bl && (inline_count > 0)) { if (block_inlined_p (bl)) - inline_count--; + inline_count--; bl = BLOCK_SUPERBLOCK (bl); - gdb_assert (bl != NULL); } return bl; ``` Comparing the values of frame_inlined_callees() from GDB 10.x and 11.x, I see that they differ. I also tried GDB 12.1, and it outputs this: ``` ../../gdb/blockframe.c:79: internal-error: get_frame_block: Assertion `bl != NULL' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. ----- Backtrace ----- 0x55a42dc123b7 gdb_internal_backtrace_1 ../../gdb/bt-utils.c:122 0x55a42dc123b7 _Z22gdb_internal_backtracev ../../gdb/bt-utils.c:168 0x55a42defaeec internal_vproblem ../../gdb/utils.c:394 0x55a42defb10a _Z15internal_verrorPKciS0_P13__va_list_tag ../../gdb/utils.c:471 0x55a42e034a71 _Z14internal_errorPKciS0_z ../../gdbsupport/errors.cc:55 0x55a42dbe9968 _Z15get_frame_blockP10frame_infoPm ../../gdb/blockframe.c:79 0x55a42dbe9968 _Z15get_frame_blockP10frame_infoPm ../../gdb/blockframe.c:55 0x55a42dc9e622 _ZN18dwarf_expr_context14get_frame_baseEPPKhPm ../../gdb/dwarf2/expr.c:782 0x55a42dca0346 _ZN18dwarf_expr_context16execute_stack_opEPKhS1_ ../../gdb/dwarf2/expr.c:1821 0x55a42dca1c53 _ZN18dwarf_expr_context4evalEPKhm ../../gdb/dwarf2/expr.c:1250 0x55a42dca1dee _ZN18dwarf_expr_context26push_dwarf_reg_entry_valueE24call_site_parameter_kind21call_site_parameter_ui ../../gdb/dwarf2/expr.c:914 0x55a42dca12bb _ZN18dwarf_expr_context16execute_stack_opEPKhS1_ ../../gdb/dwarf2/expr.c:2259 0x55a42dca1c53 _ZN18dwarf_expr_context4evalEPKhm ../../gdb/dwarf2/expr.c:1250 0x55a42dca1ea2 _ZN18dwarf_expr_context8evaluateEPKhmbP18dwarf2_per_cu_dataP10frame_infoPK18property_addr_infoP4typeSA_l ../../gdb/dwarf2/expr.c:1089 0x55a42dcb43a0 dwarf2_evaluate_loc_desc_full ../../gdb/dwarf2/loc.c:1485 0x55a42dcb4e37 _Z24dwarf2_evaluate_loc_descP4typeP10frame_infoPKhmP18dwarf2_per_cu_dataP18dwarf2_per_objfileb ../../gdb/dwarf2/loc.c:1529 0x55a42dcb4e37 loclist_read_variable ../../gdb/dwarf2/loc.c:3859 0x55a42dd14279 _ZNK13language_defn14read_var_valueEP6symbolPK5blockP10frame_info ../../gdb/findvar.c:617 0x55a42de8bbd0 _Z14read_frame_argRK19frame_print_optionsP6symbolP10frame_infoP9frame_argS7_ ../../gdb/stack.c:540 0x55a42de8c5c4 print_frame_args ../../gdb/stack.c:888 0x55a42de8ddb3 print_frame ../../gdb/stack.c:1391 0x55a42de8ddb3 _Z16print_frame_infoRK19frame_print_optionsP10frame_infoi10print_whatii ../../gdb/stack.c:1117 0x55a42de8f55a backtrace_command_1 ../../gdb/stack.c:2069 0x55a42de8f55a backtrace_command ../../gdb/stack.c:2188 0x55a42dc3e8a7 _Z8cmd_funcP16cmd_list_elementPKci ../../gdb/cli/cli-decode.c:2514 0x55a42dee0766 _Z15execute_commandPKci ../../gdb/top.c:702 0x55a42dcfce9b _Z15command_handlerPKc ../../gdb/event-top.c:597 0x55a42dcfd1cc _Z20command_line_handlerOSt10unique_ptrIcN3gdb13xfree_deleterIcEEE ../../gdb/event-top.c:800 0x55a42dcfd82c gdb_rl_callback_handler ../../gdb/event-top.c:229 0x7f9293ac8d4d ??? 0x55a42dcfc2dd gdb_rl_callback_read_char_wrapper_noexcept ../../gdb/event-top.c:187 0x55a42dcfd720 gdb_rl_callback_read_char_wrapper ../../gdb/event-top.c:204 0x55a42dcfc06f _Z19stdin_event_handleriPv ../../gdb/event-top.c:524 0x55a42e035554 gdb_wait_for_event ../../gdbsupport/event-loop.cc:700 0x55a42e03563a gdb_wait_for_event ../../gdbsupport/event-loop.cc:596 0x55a42e03563a _Z16gdb_do_one_eventv ../../gdbsupport/event-loop.cc:237 0x55a42ddb0b54 start_event_loop ../../gdb/main.c:421 0x55a42ddb0b54 captured_command_loop ../../gdb/main.c:481 0x55a42ddb2564 captured_main ../../gdb/main.c:1351 0x55a42ddb2564 _Z8gdb_mainP18captured_main_args ../../gdb/main.c:1366 0x55a42db5970a main ../../gdb/gdb.c:32 ``` -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2022-07-22 13:02 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-07-22 13:02 georgepee at gmail dot com [this message] 2022-07-25 15:27 ` [Bug backtrace/29395] " georgepee at gmail dot com 2022-08-24 13:20 ` georgepee at gmail dot com 2022-12-15 18:08 ` seth.pellegrino at gmail dot com 2022-12-15 18:11 ` simon.marchi at polymtl dot ca 2022-12-15 18:43 ` seth.pellegrino at gmail dot com 2022-12-15 19:14 ` simon.marchi at polymtl dot ca 2022-12-15 20:09 ` simon.marchi at polymtl dot ca 2022-12-15 20:27 ` simon.marchi at polymtl dot ca 2022-12-15 21:02 ` seth.pellegrino at gmail dot com 2022-12-15 21:12 ` simon.marchi at polymtl dot ca 2022-12-16 16:27 ` tromey at sourceware dot org 2022-12-20 23:03 ` simark at simark dot ca 2022-12-21 4:49 ` simark at simark dot ca
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-29395-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: 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).