mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-08 16:21:32 +00:00
restore correct CTX behaviour in llvm mode
This commit is contained in:
parent
08ef8d6b78
commit
0e736276e6
@ -354,7 +354,8 @@ bool AFLCoverage::runOnModule(Module &M) {
|
|||||||
// if yes we store a context ID for this function in the global var
|
// if yes we store a context ID for this function in the global var
|
||||||
if (has_calls) {
|
if (has_calls) {
|
||||||
|
|
||||||
ConstantInt *NewCtx = ConstantInt::get(Int32Ty, AFL_R(map_size));
|
Value *NewCtx = IRB.CreateXor(
|
||||||
|
PrevCtx, ConstantInt::get(Int32Ty, AFL_R(map_size)));
|
||||||
StoreInst * StoreCtx = IRB.CreateStore(NewCtx, AFLContext);
|
StoreInst * StoreCtx = IRB.CreateStore(NewCtx, AFLContext);
|
||||||
StoreCtx->setMetadata(M.getMDKindID("nosanitize"),
|
StoreCtx->setMetadata(M.getMDKindID("nosanitize"),
|
||||||
MDNode::get(C, None));
|
MDNode::get(C, None));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user