[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


================
@@ -720,8 +736,14 @@ Error write(MCStreamer &Out, ArrayRef<std::string> Inputs,
               C.getLength32()) {
             if (Error Err = sectionOverflowErrorOrWarning(
                     InfoSectionOffset, InfoSectionOffset + C.getLength32(),
-                    "debug_info", ContinueOnCuIndexOverflow))
+                    "debug_info", OverflowOptValue, AnySectionOverflow))
               return Err;
+            if (AnySectionOverflow) {
+              if (Header.Version < 5 ||
+                  Header.UnitType == dwarf::DW_UT_split_compile)
----------------
ayermolo wrote:

Doesn't this mean we will count the last CU that overflowed and wont't be included?

https://github.com/llvm/llvm-project/pull/71902


More information about the llvm-commits mailing list