Skip to content

Commit 1c9d0d3

Browse files
committed
---
yaml --- r: 334 b: refs/heads/master c: bf35283 h: refs/heads/master v: v3
1 parent 2246c30 commit 1c9d0d3

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 34016d323c4268de5f34301021627f4a23ddd20e
2+
refs/heads/master: bf3528342a932dd0d523d259ca71b94431703ba9

trunk/src/rt/rust_crate.cpp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,22 @@ rust_crate::mem_area::mem_area(rust_dom *dom, uintptr_t pos, size_t sz)
4747

4848
rust_crate::mem_area
4949
rust_crate::get_debug_info(rust_dom *dom) const {
50-
return mem_area(dom, ((uintptr_t)this + debug_info_off),
51-
debug_info_sz);
50+
if (debug_info_off)
51+
return mem_area(dom,
52+
((uintptr_t)this + debug_info_off),
53+
debug_info_sz);
54+
else
55+
return mem_area(dom, 0, 0);
5256
}
5357

5458
rust_crate::mem_area
5559
rust_crate::get_debug_abbrev(rust_dom *dom) const {
56-
return mem_area(dom, ((uintptr_t)this + debug_abbrev_off),
57-
debug_abbrev_sz);
60+
if (debug_abbrev_off)
61+
return mem_area(dom,
62+
((uintptr_t)this + debug_abbrev_off),
63+
debug_abbrev_sz);
64+
else
65+
return mem_area(dom, 0, 0);
5866
}
5967

6068
//

trunk/src/rt/rust_crate_reader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ rust_crate_reader::abbrev_reader::abbrev_reader
118118
abbrevs(abbrev_mem.dom)
119119
{
120120
rust_dom *dom = mem.dom;
121-
while (is_ok()) {
121+
while (is_ok() && !at_end()) {
122122

123123
// dom->log(rust_log::DWARF, "reading new abbrev at 0x%" PRIxPTR,
124124
// tell_off());

0 commit comments

Comments
 (0)