[PATCH] D26695: Revert "[OPENMP] Fixed codegen for 'omp cancel' construct."
Vitaly Buka via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 15 13:17:05 PST 2016
vitalybuka created this revision.
vitalybuka added a reviewer: ABataev.
vitalybuka added a subscriber: cfe-commits.
It introduced stack-use-after-return detected by ASAN.
Here:
'''
auto &&CodeGen = [ELoc](CodeGenFunction &CGF) {
CGF.CGM.getOpenMPRuntime().emitForStaticFinish(CGF, ELoc);
};
CodeGen(CGF);
CGF.OMPCancelStack.back().CodeGen = CodeGen;
'''
CodeGen is function on the stack and CGF.OMPCancelStack.back().CodeGen is a
reference which will be used after return from the function with CodeGen.
This reverts commit r286944.
https://reviews.llvm.org/D26695
Files:
lib/CodeGen/CGStmtOpenMP.cpp
lib/CodeGen/CodeGenFunction.h
test/OpenMP/cancel_codegen.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26695.78062.patch
Type: text/x-patch
Size: 6758 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161115/efd4aab4/attachment.bin>
More information about the cfe-commits
mailing list