aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJakub Konka <kubkon@jakubkonka.com>2022-01-22 08:47:04 +0100
committerJakub Konka <kubkon@jakubkonka.com>2022-01-22 08:50:01 +0100
commit406c85f9ba056e10899feed18dae91e20942dc55 (patch)
treefbc6b204723691dfad10851137c7df67858d679b /lib
parent062ddb693f3b060a59bc3881cbc6cea2cc8e2855 (diff)
downloadzig-406c85f9ba056e10899feed18dae91e20942dc55.tar.gz
zig-406c85f9ba056e10899feed18dae91e20942dc55.zip
macho+elf: fix integer overflow in allocateAtom
If there is a big atom available for re-use in the free list, and it's the last atom in section, it's ideal capacity might span the entire section in which case we do not want to calculate the actual end VM addr of the symbol since it may overflow. Instead, we just take the max capacity available as end VM addr estimate. In this case, the max capacity equals `std.math.maxInt(u64)`.
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions