[PATCH] D121752: [Symbolize] Fix overflow warning on 32-bit hosts.

Daniel Thornburgh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 16 09:44:51 PDT 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG9990395859d3: [Symbolize] Fix overflow warning on 32-bit hosts. (authored by mysterymath).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121752

Files:
  llvm/include/llvm/DebugInfo/Symbolize/Symbolize.h


Index: llvm/include/llvm/DebugInfo/Symbolize/Symbolize.h
===================================================================
--- llvm/include/llvm/DebugInfo/Symbolize/Symbolize.h
+++ llvm/include/llvm/DebugInfo/Symbolize/Symbolize.h
@@ -62,9 +62,10 @@
     std::string FallbackDebugPath;
     std::string DWPName;
     std::vector<std::string> DebugFileDirectory;
-    size_t MaxCacheSize = sizeof(size_t) == 4
-                              ? 512 * 1024 * 1024 /* 512 MiB */
-                              : 4ULL * 1024 * 1024 * 1024 /* 4 GiB */;
+    size_t MaxCacheSize =
+        sizeof(size_t) == 4
+            ? 512 * 1024 * 1024 /* 512 MiB */
+            : static_cast<size_t>(4ULL * 1024 * 1024 * 1024) /* 4 GiB */;
   };
 
   LLVMSymbolizer();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121752.415877.patch
Type: text/x-patch
Size: 755 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220316/346185a2/attachment.bin>


More information about the llvm-commits mailing list