This is an archive of the discontinued LLVM Phabricator instance.

Revert "[OPENMP] Fixed codegen for 'omp cancel' construct."
AbandonedPublic

Authored by vitalybuka on Nov 15 2016, 1:17 PM.

Details

Reviewers
ABataev
Summary

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.

Event Timeline

vitalybuka updated this revision to Diff 78062.Nov 15 2016, 1:17 PM
vitalybuka retitled this revision from to Revert "[OPENMP] Fixed codegen for 'omp cancel' construct.".
vitalybuka updated this object.
vitalybuka added a reviewer: ABataev.
vitalybuka added a subscriber: cfe-commits.
vitalybuka updated this object.Nov 15 2016, 1:17 PM
vitalybuka abandoned this revision.Nov 15 2016, 1:19 PM