[PATCH] D137310: [NFC] fix wrong pointer type return from CreateSecStartEnd()

Wu Yingcong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 2 19:20:47 PDT 2022


yingcong-wu created this revision.
Herald added subscribers: Enna1, hiraditya.
Herald added a project: All.
yingcong-wu retitled this revision from "fix wrong pointer type return from CreateSecStartEnd()" to "[NFC] fix wrong pointer type return from CreateSecStartEnd()".
yingcong-wu edited the summary of this revision.
yingcong-wu edited the summary of this revision.
yingcong-wu published this revision for review.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

`CreateSecStartEnd()` will return pointer to the input type, so when called with `CreateSecStartEnd(M, SanCovCFsSectionName, IntptrPtrTy)`, `SecStartEnd.first` and `SecStartEnd.second` will have type `IntptrPtrPtrTy`, not `IntptrPtrTy`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D137310

Files:
  llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp


Index: llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
===================================================================
--- llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
+++ llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
@@ -522,7 +522,7 @@
   }
 
   if (Ctor && Options.CollectControlFlow) {
-    auto SecStartEnd = CreateSecStartEnd(M, SanCovCFsSectionName, IntptrPtrTy);
+    auto SecStartEnd = CreateSecStartEnd(M, SanCovCFsSectionName, IntptrTy);
     FunctionCallee InitFunction = declareSanitizerInitFunction(
         M, SanCovCFsInitName, {IntptrPtrTy, IntptrPtrTy});
     IRBuilder<> IRBCtor(Ctor->getEntryBlock().getTerminator());


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137310.472828.patch
Type: text/x-patch
Size: 678 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221103/3d3e5e95/attachment.bin>


More information about the llvm-commits mailing list