[llvm] 'Soft Stop' solution on offset overflow issue: By Produceing a truncated but valid DWP file, discarding any DWO files that would not fit within the 32 bit/4GB limits of the format. (PR #71902)
Alexander Yermolovich via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 29 17:24:15 PST 2023
================
@@ -232,9 +238,12 @@ static Error addAllTypesFromDWP(
static_assert(sizeof(OldOffset) == sizeof(TypesOffset));
TypesOffset += C.getLength();
if (OldOffset > TypesOffset) {
- if (Error Err = sectionOverflowErrorOrWarning(
- OldOffset, TypesOffset, "Types", ContinueOnCuIndexOverflow))
+ if (Error Err = sectionOverflowErrorOrWarning(OldOffset, TypesOffset,
+ "Types", OverflowOptValue,
+ AnySectionOverflow))
return Err;
+ if (AnySectionOverflow)
----------------
ayermolo wrote:
Doesn't seem like this check is necessary. Either error will be returned that needs to be handled or return is success in which case it will go to return on line 249.
https://github.com/llvm/llvm-project/pull/71902
More information about the llvm-commits
mailing list