Header64.offset/Header64.size are uint64_t, thus we should not truncate them to unit32_t.
Moreover, there are a number of places where we sum the offset and the size (e.g. in various checks in MachOUniversal.cpp),
the truncation causes issues since the offset/size can perfectly fit into uint32_t, while the sum overflows.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I wish that we had a better type. For the time being, the 64-bit with is sufficient for current needs.
Comment Actions
This makes sense, but I'm wondering if we need to adjust any call sites to assert that a result they compute that needs to be 32 bits actually fits in 32 bits. Those locations would have just been silently overflowing before though, so this at least gives them the ability to detect that overflow.