Closed
Description
The RuntimeDyldELF implementation tries to make a stub, it uses an expression like
reinterpret_cast<uint64_t>(Section.getAddressWithOffset(Section.getStubOffset()))
to get the address of the stub it's generating as a uint64_t
.
Sadly, on 32-bit platforms where addresses are regarded as signed, because getAddressWithOffset()
returns a uint8_t *
pointer, this can cause unwanted sign-extension, so if (for instance) the code has been loaded at 0xf1a10000
, and the stub is at offset 4
, the resulting uint64_t
will be 0xfffffffff1a10004
instead of the expected 0xf1a10004
.