mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-19 11:12:43 +00:00
Trap missing attr forms during dwarf-scan and shut down dwarf reader, don't crash.
This commit is contained in:
parent
99be02a28d
commit
113c31a26d
@ -258,10 +258,16 @@ rust_crate_reader::die::die(die_reader *rdr, uintptr_t off)
|
||||
dom->get_log().outdent();
|
||||
} else {
|
||||
ab = rdr->abbrevs.get_abbrev(ab_idx);
|
||||
dom->log(rust_log::DWARF, "DIE <0x%" PRIxPTR "> abbrev 0x%"
|
||||
PRIxPTR, off, ab_idx);
|
||||
dom->log(rust_log::DWARF, " tag 0x%x, has children: %d",
|
||||
ab->tag, ab->has_children);
|
||||
if (!ab) {
|
||||
dom->log(rust_log::DWARF, " bad abbrev number: 0x%"
|
||||
PRIxPTR, ab_idx);
|
||||
rdr->fail();
|
||||
} else {
|
||||
dom->log(rust_log::DWARF, "DIE <0x%" PRIxPTR "> abbrev 0x%"
|
||||
PRIxPTR, off, ab_idx);
|
||||
dom->log(rust_log::DWARF, " tag 0x%x, has children: %d",
|
||||
ab->tag, ab->has_children);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user