about summary refs log tree commit diff
path: root/instrumentation/SanitizerCoveragePCGUARD.so.cc
diff options
context:
space:
mode:
authorDavid Carlier <devnexen@gmail.com>2023-01-20 22:12:35 +0000
committerDavid Carlier <devnexen@gmail.com>2023-01-20 22:12:35 +0000
commitafd2ea90dfdb9aa7668c482e7c427f95c4847843 (patch)
treee0ba7b95daf44f319bbbf0a6aa58f7d0048d3b32 /instrumentation/SanitizerCoveragePCGUARD.so.cc
parent5163a49350ed17149cb3c52bc79bd87e86402510 (diff)
downloadafl++-afd2ea90dfdb9aa7668c482e7c427f95c4847843.tar.gz
LLVM plugin 16+ support proposal.
- Lifting the standard to C++17.
- Beyond the cosmetic changes, it boils down to BasicBlock::getInstList being
  no longer available (and reading the header it is no accident).
Diffstat (limited to 'instrumentation/SanitizerCoveragePCGUARD.so.cc')
-rw-r--r--instrumentation/SanitizerCoveragePCGUARD.so.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/instrumentation/SanitizerCoveragePCGUARD.so.cc b/instrumentation/SanitizerCoveragePCGUARD.so.cc
index ef2d3b9c..c4a564f7 100644
--- a/instrumentation/SanitizerCoveragePCGUARD.so.cc
+++ b/instrumentation/SanitizerCoveragePCGUARD.so.cc
@@ -728,7 +728,11 @@ GlobalVariable *ModuleSanitizerCoverageAFL::CreateFunctionLocalArrayInSection(
   Array->setSection(getSectionName(Section));
 #if (LLVM_VERSION_MAJOR >= 11) || \
     (LLVM_VERSION_MAJOR == 10 && LLVM_VERSION_MINOR >= 1)
+  #if LLVM_VERSION_MAJOR >= 16
+  Array->setAlignment(Align(DL->getTypeStoreSize(Ty).getFixedValue()));
+  #else
   Array->setAlignment(Align(DL->getTypeStoreSize(Ty).getFixedSize()));
+  #endif
 #else
   Array->setAlignment(Align(4));  // cheating
 #endif