On 21/10/2017 13:24, BALATON Zoltan wrote:
diff --git a/exec.c b/exec.c
index db5ae23..a915817 100644
--- a/exec.c
+++ b/exec.c
@@ -370,7 +370,8 @@ static inline bool section_covers_addr(const
MemoryRegionSection *section,
* the section must cover the entire address space.
*/
return int128_gethi(section->size) ||
- range_covers_byte(section->offset_within_address_space,
+ range_covers_byte(section->offset_within_address_space +
+ section->offset_within_region,
int128_getlo(section->size), addr);
}
Sorry, this is incorrect. addr is an address in the address space, and
range_covers_byte checks if it is between
section->offset_within_address_space and
section->offset_within_address_space + section->size. I am not sure how
things don't explode completely by adding section->offset_within_region
(probably it's just because section->offset_within_region is usually 0).