Index: lib/Transforms/Instrumentation/AddressSanitizer.cpp =================================================================== --- lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ lib/Transforms/Instrumentation/AddressSanitizer.cpp @@ -2286,6 +2286,12 @@ return nullptr; Res = IncValueAI; } + } else if (GetElementPtrInst *EP = dyn_cast(V)) { + Res = findAllocaForValue(EP->getPointerOperand()); + } else { + // If we get here we need to handle other types of instructions which can + // be inserted between alloca and intrinsic. + assert(false); } if (Res) AllocaForValue[V] = Res; return Res;