public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/28740] New: Internal error: internal_type_vptr_fieldno() crashes
@ 2022-01-03 10:02 smurf at smurf dot noris.de
  2022-01-03 10:06 ` [Bug c++/28740] " smurf at smurf dot noris.de
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: smurf at smurf dot noris.de @ 2022-01-03 10:02 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 28740
           Summary: Internal error: internal_type_vptr_fieldno() crashes
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
          Assignee: unassigned at sourceware dot org
          Reporter: smurf at smurf dot noris.de
  Target Milestone: ---

I managed to build a shared library (C++) which aborts GDB in function
internal_type_vptr_fieldno().

Debian Bullseye:

/build/gdb-Nav6Es/gdb-10.1/gdb/gdbtypes.c:1926: internal-error: int
internal_type_vptr_fieldno(type*): Assertion `type->code () == TYPE_CODE_STRUCT
|| type->code () == TYPE_CODE_UNION' failed.

To reproduce:

Fetch, build and install https://github.com/smurfix/clew.git

Fetch https://github.com/smurfix/kf2.git
check out commit ed25cacee

apt install $(grep -v '#' REQUIREMENTS)
make embed -j20  # more CPUs are better …
gdb libkf2-embed.so
b CFr<Tab>St<Tab>

which should find method CFraktalSFT::Stop() but instead emits the above error.

I have verified that the bug exists in current HEAD. Replacing the gdb_abort in
internal_type_vptr_fieldno (with a test that returns -1 instead of crashing)
"fixes" the problem and at first glance does not show any adverse effects.

I have not been able to create a smaller standalone example. (Admittedly I
didn't try very hard.)

I cannot attach the shared library in question because it's 155 MBytes large,
but if anybody needs it I can supply a download link.

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

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

end of thread, other threads:[~2022-01-05  6:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-03 10:02 [Bug c++/28740] New: Internal error: internal_type_vptr_fieldno() crashes smurf at smurf dot noris.de
2022-01-03 10:06 ` [Bug c++/28740] " smurf at smurf dot noris.de
2022-01-03 11:05 ` aburgess at redhat dot com
2022-01-04 18:28 ` tromey at sourceware dot org
2022-01-05  6:38 ` smurf at smurf dot noris.de

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