diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2022-01-22 08:47:04 +0100 |
|---|---|---|
| committer | Jakub Konka <kubkon@jakubkonka.com> | 2022-01-22 08:50:01 +0100 |
| commit | 406c85f9ba056e10899feed18dae91e20942dc55 (patch) | |
| tree | fbc6b204723691dfad10851137c7df67858d679b /lib | |
| parent | 062ddb693f3b060a59bc3881cbc6cea2cc8e2855 (diff) | |
| download | zig-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
