This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -readnow crash Rust regression [Re: [RFA v2 3/4] Convert Rust to use discriminated unions]


>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> On Wed, 11 Apr 2018 04:52:09 +0200, Tom Tromey wrote:
>> >>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
Jan> ./gdb/gdb -batch -readnow /tmp/rustgdbbug/a/b/rustdoc-1.24.0-2.fc27.x86_64.debug 
Jan> Segmentation fault
>> 
>> Try this:
>> 
>> https://sourceware.org/ml/gdb-patches/2018-03/msg00600.html

Jan> Still crashing:

Jan> #0  __strrchr_avx2 () at ../sysdeps/x86_64/multiarch/strrchr-avx2.S:54
Jan> #1  0x0000000000aaff44 in rust_last_path_segment (path=0x0) at rust-lang.c:44
Jan> #2  0x00000000008ca07d in quirk_rust_enum (type=0x4c53b80, objfile=0x3089a00) at dwarf2read.c:10076
Jan> #3  0x00000000008ca3cd in rust_union_quirks (cu=0x30fc820) at dwarf2read.c:10101
Jan> #4 0x00000000008cab85 in process_full_comp_unit (per_cu=0x3149f10,

I think this another variant of
https://sourceware.org/bugzilla/show_bug.cgi?id=23010

The immediate bug here is that the (rust) enum member is being read from
a partial unit, but it is being read as language_minimal, not language_rust.
This causes it to have a TYPE_NAME==NULL, whereas language_rust would
have set it to follow TYPE_TAG_NAME.

I have a hack to fix that but it reveals another problem, which is that
some of the type rewriting can be done multiple times, causing other bugs.
I hadn't considered this possibility.  I'm looking into a good way to
fix it.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]