public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/29985] New: gdbtypes.h:985: internal-error: field: Assertion `idx >= 0 && idx < num_fields ()' failed.
@ 2023-01-10 21:41 pawel_sikora at zoho dot com
  2023-01-10 21:42 ` [Bug c++/29985] " pawel_sikora at zoho dot com
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: pawel_sikora at zoho dot com @ 2023-01-10 21:41 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 29985
           Summary: gdbtypes.h:985: internal-error: field: Assertion `idx
                    >= 0 && idx < num_fields ()' failed.
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
          Assignee: unassigned at sourceware dot org
          Reporter: pawel_sikora at zoho dot com
  Target Milestone: ---

hi,
a large c++ enum-class crashes gdb during variable printing.

(gdb) r
Starting program: /home/pawels/src/bugs/gdb-big-enum/test 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Breakpoint 1, main () at test.cpp:5
5           enumVal = ENUM_ID::ENUM_VAL_14;
(gdb) n
6           return 0;
(gdb) p enumVal
$1 = 
gdbtypes.h:985: internal-error: field: Assertion `idx >= 0 && idx < num_fields
()' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
----- Backtrace -----
0x56522c4cabf0 gdb_internal_backtrace_1
        /home/pawels/src/binutils-gdb/gdb/bt-utils.c:122
0x56522c4cabf0 _Z22gdb_internal_backtracev
        /home/pawels/src/binutils-gdb/gdb/bt-utils.c:168
0x56522c88a564 internal_vproblem
        /home/pawels/src/binutils-gdb/gdb/utils.c:396
0x56522c88a820 _Z15internal_verrorPKciS0_P13__va_list_tag
        /home/pawels/src/binutils-gdb/gdb/utils.c:476
0x56522c9d6d34 _Z18internal_error_locPKciS0_z
        /home/pawels/src/binutils-gdb/gdbsupport/errors.cc:58
0x56522c89a6d2 _ZNK4type5fieldEi
        /home/pawels/src/binutils-gdb/gdb/gdbtypes.h:985
0x56522c89a6d2 _ZNK4type5fieldEi
        /home/pawels/src/binutils-gdb/gdb/gdbtypes.h:983
0x56522c89a6d2 generic_val_print_enum_1
        /home/pawels/src/binutils-gdb/gdb/valprint.c:657
0x56522c89b3ca
_Z16common_val_printP5valueP7ui_fileiPK19value_print_optionsPK13language_defn
        /home/pawels/src/binutils-gdb/gdb/valprint.c:1073
0x56522c4ef9d0 _Z13c_value_printP5valueP7ui_filePK19value_print_options
        /home/pawels/src/binutils-gdb/gdb/c-valprint.c:588
0x56522c89b572 _Z11value_printP5valueP7ui_filePK19value_print_options
        /home/pawels/src/binutils-gdb/gdb/valprint.c:1190
0x56522c72e334 _Z11print_valueP5valueRK19value_print_options
        /home/pawels/src/binutils-gdb/gdb/printcmd.c:1252
0x56522c72e5c2 print_command_1
        /home/pawels/src/binutils-gdb/gdb/printcmd.c:1361
0x56522c4ff1e4 _Z8cmd_funcP16cmd_list_elementPKci
        cli/cli-decode.c:2543
0x56522c820ad1 _Z15execute_commandPKci
        /home/pawels/src/binutils-gdb/gdb/top.c:688
0x56522c5ef524 _Z15command_handlerPKc
        /home/pawels/src/binutils-gdb/gdb/event-top.c:616
0x56522c5f0833
_Z20command_line_handlerOSt10unique_ptrIcN3gdb13xfree_deleterIcEEE
        /home/pawels/src/binutils-gdb/gdb/event-top.c:852
0x56522c5eff7c gdb_rl_callback_handler
        /home/pawels/src/binutils-gdb/gdb/event-top.c:246
0x56522c8ccdd7 rl_callback_read_char
        /home/pawels/src/binutils-gdb/readline/readline/callback.c:290
0x56522c5eefbd gdb_rl_callback_read_char_wrapper_noexcept
        /home/pawels/src/binutils-gdb/gdb/event-top.c:188
0x56522c5efe33 gdb_rl_callback_read_char_wrapper
        /home/pawels/src/binutils-gdb/gdb/event-top.c:221
0x56522c5ee9af stdin_event_handler
        /home/pawels/src/binutils-gdb/gdb/event-top.c:541
0x56522c9d7495 gdb_wait_for_event
        /home/pawels/src/binutils-gdb/gdbsupport/event-loop.cc:694
0x56522c9d7eb5 gdb_wait_for_event
        /home/pawels/src/binutils-gdb/gdbsupport/event-loop.cc:593
0x56522c9d7eb5 _Z16gdb_do_one_eventi
        /home/pawels/src/binutils-gdb/gdbsupport/event-loop.cc:264
0x56522c6cb8e9 start_event_loop
        /home/pawels/src/binutils-gdb/gdb/main.c:411
0x56522c6cb8e9 captured_command_loop
        /home/pawels/src/binutils-gdb/gdb/main.c:471
0x56522c6cd484 captured_main
        /home/pawels/src/binutils-gdb/gdb/main.c:1310
0x56522c6cd484 _Z8gdb_mainP18captured_main_args
        /home/pawels/src/binutils-gdb/gdb/main.c:1325
0x56522c41bb7f main
        /home/pawels/src/binutils-gdb/gdb/gdb.c:32
---------------------
gdbtypes.h:985: internal-error: field: Assertion `idx >= 0 && idx < num_fields
()' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.

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

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

end of thread, other threads:[~2023-03-15 18:23 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-10 21:41 [Bug c++/29985] New: gdbtypes.h:985: internal-error: field: Assertion `idx >= 0 && idx < num_fields ()' failed pawel_sikora at zoho dot com
2023-01-10 21:42 ` [Bug c++/29985] " pawel_sikora at zoho dot com
2023-01-10 21:46 ` pawel_sikora at zoho dot com
2023-01-11 18:42 ` tromey at sourceware dot org
2023-01-11 19:33 ` pedro at palves dot net
2023-01-11 19:48 ` pawel_sikora at zoho dot com
2023-01-11 20:44 ` tromey at sourceware dot org
2023-01-11 20:45 ` tromey at sourceware dot org
2023-01-27 15:16 ` tromey at sourceware dot org
2023-01-27 17:06 ` pedro at palves dot net
2023-01-30 20:09 ` tromey at sourceware dot org
2023-02-04 16:52 ` pawel_sikora at zoho dot com
2023-02-09 15:02 ` cvs-commit at gcc dot gnu.org
2023-02-09 15:02 ` tromey at sourceware dot org
2023-03-15 18:23 ` simon.marchi at polymtl dot ca

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