Summary: | Internal error: internal_type_vptr_fieldno() crashes | ||
---|---|---|---|
Product: | gdb | Reporter: | smurf |
Component: | c++ | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | NEW --- | ||
Severity: | normal | CC: | aburgess, tromey |
Priority: | P2 | ||
Version: | HEAD | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: | 2022-01-03 00:00:00 |
Description
smurf
2022-01-03 10:02:38 UTC
The library is here: https://storgrid.noris.net/share.xhtml?token=L44e42cf1a7d347d296beb6f062ea6d8c I compressed it with lz4, now "only" 55 MByte. Using the pre-compiled library, I can reproduce the original error. I also observed this weird behaviour: (gdb) set max-value-size 200000 (gdb) ptype CFraktalSFT type = struct CFraktalSFT { <snip lots of fields> gdb/gdbtypes.c:932: internal-error: type* create_range_type(type*, type*, const dynamic_prop*, const dynamic_prop*, LONGEST): Assertion `TYPE_LENGTH (index_type) > 0' failed. Clearly a different error, but there's something odd about CFraktalSFT... I think the problem is just that this is compiled with stabs and not DWARF: murgatroyd. readelf -WS ./libkf2-embed.so | grep debug murgatroyd. readelf -WS ./libkf2-embed.so | grep stab [26] .stab PROGBITS 0000000000000000 617c300 2ed14ec 0c 27 0 4 [27] .stabstr STRTAB 0000000000000000 904d7ec 9382c3 00 0 0 1 The Makefile specifies -gstabs: https://github.com/smurfix/kf2/blame/main/Makefile#L30 To the OP: stabs is an old, deprecated debug format. It never supported C++ very well, and is only kept around because there are a couple of legacy C programs that use it. Eventually we hope to remove it entirely. You should basically never use -gstabs. Use plain -g instead. Ah. Thanks. Ancient Makefiles building Windows binaries with mingw … among its myriad of flags I missed that one, cleaning it up for transplanting to Linux. Still, it'd be nice not to crash gdb when it encounters something like that. |