[PATCH] D144565: dwp check overflow

Alexander Yermolovich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 2 07:56:10 PDT 2023


ayermolo added a comment.

For. your assembly tests. Can you add comment(s) for parts that you have modified to make the overflow happen.
Also maybe add what c/c++ was used to generate it.
For. your tests please add description of what they are doing.



================
Comment at: llvm/lib/DWP/DWP.cpp:237
+    uint32_t OldOffset = TypesOffset;
+    static_assert(sizeof(OldOffset == TypesOffset));
     TypesOffset += C.getLength();
----------------
I don't think this is the same as sizeof(OldOffset) == sizeof(TypesOffset)


================
Comment at: llvm/lib/DWP/DWP.cpp:861
+      if (Error Err = 
+          addAllTypesFromDWP(Out, TypeIndexEntries, TUIndex, OutSection,
+                            TypeInputSection, CurEntry,
----------------
Is this because of tabs?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144565/new/

https://reviews.llvm.org/D144565



More information about the llvm-commits mailing list