[RFA v2 3/4] Convert Rust to use discriminated unions

Pedro Alves palves@redhat.com
Tue Feb 27 23:23:00 GMT 2018


Hi Tom,

I was comparing test results from 20180207 and today, I
noticed that gdb.rust/simple.exp regressed:

~~~~~~
Running src/gdb/testsuite/gdb.rust/simple.exp ...
-PASS: gdb.rust/simple.exp: print a 
-PASS: gdb.rust/simple.exp: ptype a 
-PASS: gdb.rust/simple.exp: print sizeof(a) 
-PASS: gdb.rust/simple.exp: print b 
(...)
+UNTESTED: gdb.rust/simple.exp: could not run to breakpoint
~~~~~~

Looking at gdb.log I see:

~~~~~~~~~~~~~~~~~~~~~~
gdb) break simple.rs:152
src/gdb/dwarf2read.c:10367: internal-error: discriminant_info* alloc_discriminant_info(type*, int, int): Assertion `default_index == -1 || (default_index > 0 && default_index < TYPE_NFIELDS (type))' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) Resyncing due to internal error.
n

This is a bug, please report it.  For instructions, see:
<http://www.gnu.org/software/gdb/bugs/>.

src/gdb/dwarf2read.c:10367: internal-error: discriminant_info* alloc_discriminant_info(type*, int, int): Assertion `default_index == -1 || (default_index > 0 && default_index < TYPE_NFIELDS (type))' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) n
Command aborted.
(gdb) UNTESTED: gdb.rust/simple.exp: could not run to breakpointt
~~~~~~~~~~~~~~~~~~~~~~

I haven't bisected, but the references to discriminant info make me suspect
this patch I'm replying to.

This is Fedora 27 with:

 $ rustc --version
 rustc 1.13.0 (2c6933acc 2016-11-07)

Thanks,
Pedro Alves



More information about the Gdb-patches mailing list