public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/28908] New: Assertion `strstr (name, "::") == NULL' failed. listing member function names of a namespace class
@ 2022-02-18 21:53 msebor at gmail dot com
2022-02-18 21:54 ` [Bug c++/28908] " msebor at gmail dot com
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: msebor at gmail dot com @ 2022-02-18 21:53 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28908
Bug ID: 28908
Summary: Assertion `strstr (name, "::") == NULL' failed.
listing member function names of a namespace class
Product: gdb
Version: 11.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
Assignee: unassigned at sourceware dot org
Reporter: msebor at gmail dot com
Target Milestone: ---
I encountered the following internal error while testing the fix for pr28901.
The error is with GNU gdb (GDB) Fedora 11.1-5.fc35 but it's reproducible with
trunk.
$ cat t.C && g++ -g3 t.C && gdb -batch -nx -ex "break main" -ex run -ex "print
(N::A*)&b" -ex "list $1->N::A::f" a.out
namespace N {
struct A { void f () { } };
struct B: A { };
}
N::B b;
int main ()
{
b.f ();
}
Breakpoint 1 at 0x40110a: file t.C, line 10.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Breakpoint 1, main () at t.C:10
10 b.f ();
$1 = (N::A *) 0x40401d <b>
../../gdb/cp-namespace.c:178: internal-error: block_symbol
cp_lookup_bare_symbol(const language_defn*, const char*, const block*,
domain_enum, int): Assertion `strstr (name, "::") == NULL' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) [answered Y; input not from terminal]
This is a bug, please report it. For instructions, see:
<https://www.gnu.org/software/gdb/bugs/>.
../../gdb/cp-namespace.c:178: internal-error: block_symbol
cp_lookup_bare_symbol(const language_defn*, const char*, const block*,
domain_enum, int): Assertion `strstr (name, "::") == NULL' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) [answered Y; input not from terminal]
Aborted (core dumped)
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/28908] Assertion `strstr (name, "::") == NULL' failed. listing member function names of a namespace class
2022-02-18 21:53 [Bug c++/28908] New: Assertion `strstr (name, "::") == NULL' failed. listing member function names of a namespace class msebor at gmail dot com
@ 2022-02-18 21:54 ` msebor at gmail dot com
2022-02-24 15:06 ` tromey at sourceware dot org
2023-12-30 15:45 ` ssbssa at sourceware dot org
2 siblings, 0 replies; 4+ messages in thread
From: msebor at gmail dot com @ 2022-02-18 21:54 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28908
--- Comment #1 from Martin Sebor <msebor at gmail dot com> ---
The full stack trace with trunk is below:
/src/binutils-gdb/gdb/cp-namespace.c:178: internal-error:
cp_lookup_bare_symbol: Assertion `strstr (name, "::") == NULL' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
----- Backtrace -----
0x4cbb63 gdb_internal_backtrace_1
/src/binutils-gdb/gdb/bt-utils.c:122
0x4cbb63 _Z22gdb_internal_backtracev
/src/binutils-gdb/gdb/bt-utils.c:168
0x80ba44 internal_vproblem
/src/binutils-gdb/gdb/utils.c:394
0x80bc58 _Z15internal_verrorPKciS0_P13__va_list_tag
/src/binutils-gdb/gdb/utils.c:471
0x9206f1 _Z14internal_errorPKciS0_z
/src/binutils-gdb/gdbsupport/errors.cc:55
0x53990c cp_lookup_bare_symbol
/src/binutils-gdb/gdb/cp-namespace.c:178
0x539ab7 cp_lookup_symbol_in_namespace
/src/binutils-gdb/gdb/cp-namespace.c:325
0x53a3b7 lookup_namespace_scope
/src/binutils-gdb/gdb/cp-namespace.c:724
0x53a46b
_Z25cp_lookup_symbol_nonlocalPK13language_defnPKcPK5block15domain_enum_tag
/src/binutils-gdb/gdb/cp-namespace.c:754
0x792d1e lookup_symbol_aux
/src/binutils-gdb/gdb/symtab.c:2161
0x792e62
_Z25lookup_symbol_in_languagePKcPK5block15domain_enum_tag8languageP20field_of_this_result
/src/binutils-gdb/gdb/symtab.c:1953
0x646b91 find_label_symbols_in_block
/src/binutils-gdb/gdb/linespec.c:4009
0x646d8b find_label_symbols
/src/binutils-gdb/gdb/linespec.c:4053
0x64a6db linespec_parse_basic
/src/binutils-gdb/gdb/linespec.c:1909
0x64a6db parse_linespec
/src/binutils-gdb/gdb/linespec.c:2677
0x64aedb event_location_to_sals
/src/binutils-gdb/gdb/linespec.c:3159
0x64c33d _Z13decode_line_1PK14event_locationiP13program_spaceP6symtabi
/src/binutils-gdb/gdb/linespec.c:3293
0x4f8261 list_command
/src/binutils-gdb/gdb/cli/cli-cmds.c:1256
0x4fbf74 _Z8cmd_funcP16cmd_list_elementPKci
/src/binutils-gdb/gdb/cli/cli-decode.c:2514
0x7ceac1 _Z15execute_commandPKci
/src/binutils-gdb/gdb/top.c:670
0x5c4e6c _Z15command_handlerPKc
/src/binutils-gdb/gdb/event-top.c:597
0x5c518a _Z20command_line_handlerOSt10unique_ptrIcN3gdb13xfree_deleterIcEEE
/src/binutils-gdb/gdb/event-top.c:782
0x5c57ab gdb_rl_callback_handler
/src/binutils-gdb/gdb/event-top.c:229
0x84b897 rl_callback_read_char
/src/binutils-gdb/readline/readline/callback.c:281
0x5c40bd gdb_rl_callback_read_char_wrapper_noexcept
/src/binutils-gdb/gdb/event-top.c:187
0x5c569c gdb_rl_callback_read_char_wrapper
/src/binutils-gdb/gdb/event-top.c:204
0x5c3d6f _Z19stdin_event_handleriPv
/src/binutils-gdb/gdb/event-top.c:524
0x920fad gdb_wait_for_event
/src/binutils-gdb/gdbsupport/event-loop.cc:700
0x92121c gdb_wait_for_event
/src/binutils-gdb/gdbsupport/event-loop.cc:596
0x92121c _Z16gdb_do_one_eventv
/src/binutils-gdb/gdbsupport/event-loop.cc:237
0x675e24 start_event_loop
/src/binutils-gdb/gdb/main.c:421
0x675e24 captured_command_loop
/src/binutils-gdb/gdb/main.c:481
0x677774 captured_main
/src/binutils-gdb/gdb/main.c:1348
0x677774 _Z8gdb_mainP18captured_main_args
/src/binutils-gdb/gdb/main.c:1363
0x431b34 main
/src/binutils-gdb/gdb/gdb.c:32
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/28908] Assertion `strstr (name, "::") == NULL' failed. listing member function names of a namespace class
2022-02-18 21:53 [Bug c++/28908] New: Assertion `strstr (name, "::") == NULL' failed. listing member function names of a namespace class msebor at gmail dot com
2022-02-18 21:54 ` [Bug c++/28908] " msebor at gmail dot com
@ 2022-02-24 15:06 ` tromey at sourceware dot org
2023-12-30 15:45 ` ssbssa at sourceware dot org
2 siblings, 0 replies; 4+ messages in thread
From: tromey at sourceware dot org @ 2022-02-24 15:06 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28908
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> ---
> list $1->N::A::f
Seems like another "weird linespec" bug.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/28908] Assertion `strstr (name, "::") == NULL' failed. listing member function names of a namespace class
2022-02-18 21:53 [Bug c++/28908] New: Assertion `strstr (name, "::") == NULL' failed. listing member function names of a namespace class msebor at gmail dot com
2022-02-18 21:54 ` [Bug c++/28908] " msebor at gmail dot com
2022-02-24 15:06 ` tromey at sourceware dot org
@ 2023-12-30 15:45 ` ssbssa at sourceware dot org
2 siblings, 0 replies; 4+ messages in thread
From: ssbssa at sourceware dot org @ 2023-12-30 15:45 UTC (permalink / raw)
To: gdb-prs
https://sourceware.org/bugzilla/show_bug.cgi?id=28908
Hannes Domani <ssbssa at sourceware dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ssbssa at sourceware dot org
Target Milestone|--- |14.1
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #3 from Hannes Domani <ssbssa at sourceware dot org> ---
Dup.
*** This bug has been marked as a duplicate of bug 25894 ***
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-12-30 15:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-18 21:53 [Bug c++/28908] New: Assertion `strstr (name, "::") == NULL' failed. listing member function names of a namespace class msebor at gmail dot com
2022-02-18 21:54 ` [Bug c++/28908] " msebor at gmail dot com
2022-02-24 15:06 ` tromey at sourceware dot org
2023-12-30 15:45 ` ssbssa at sourceware dot org
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).