[llvm-commits] [llvm] r136319 - /llvm/trunk/lib/Transforms/Scalar/LowerAtomic.cpp
Eli Friedman
eli.friedman at gmail.com
Wed Jul 27 18:31:24 PDT 2011
On Wed, Jul 27, 2011 at 6:20 PM, Benjamin Kramer
<benny.kra at googlemail.com> wrote:
> Author: d0k
> Date: Wed Jul 27 20:20:19 2011
> New Revision: 136319
>
> URL: http://llvm.org/viewvc/llvm-project?rev=136319&view=rev
> Log:
> Fix a use after free. An instruction can't be both an intrinsic call and a fence.
>
> Modified:
> llvm/trunk/lib/Transforms/Scalar/LowerAtomic.cpp
>
> Modified: llvm/trunk/lib/Transforms/Scalar/LowerAtomic.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LowerAtomic.cpp?rev=136319&r1=136318&r2=136319&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/Scalar/LowerAtomic.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/LowerAtomic.cpp Wed Jul 27 20:20:19 2011
> @@ -132,7 +132,7 @@
> Instruction *Inst = DI++;
> if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(Inst))
> Changed |= LowerAtomicIntrinsic(II);
> - if (FenceInst *FI = dyn_cast<FenceInst>(Inst))
> + else if (FenceInst *FI = dyn_cast<FenceInst>(Inst))
> Changed |= LowerFenceInst(FI);
> }
> return Changed;
Thanks for spotting that.
-Eli
More information about the llvm-commits
mailing list