This fixes a bug where if a unviversal mach-o file exceeded 4GB, dsymutil would return an error even if each slice was under 4GB in size, but the total universal file size exceeded 4GB.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
Lgtm
llvm/tools/dsymutil/dsymutil.cpp | ||
---|---|---|
747 | You can merge this if and the next one to reduce the indentation |
We are not sure if this is the way we want to fix this, the alternate fix is in https://reviews.llvm.org/D121398
Jonas, let me know if you want to me check this in by accepting it or not vs the other patch. If we want this code then great, else we could remove this code as part of https://reviews.llvm.org/D121398
I prefer the way the other patch deals with non-fat Mach-O files. For fat binaries, we should iterate over the temp files and calculate the sum of the size and error out unless the final slice has an offset < UINT32_MAX. For example, having 3 architectures that are 1.5GB each is fine because the last slice starts at 3GB even though the final binary will be 4.5GB, but having 4 slices won't work.
You can merge this if and the next one to reduce the indentation