[llvm] r234059 - Fixing a memory leak in WinEHPrepare
andrew.kaylor at intel.com
Fri Apr 3 15:51:55 PDT 2015
After looking into this a little more closely, I see that the other location that calls the function producing the vector involved with this use of DeleteContainerPointers has a much more complicated relationship with the pointers in the vector. It passes the vector to another function that takes an ArrayRef argument and that function internally moves the pointers into a different container and eventually deletes them.
Obviously this can still be refactored in some way to make it more robust. It just isn’t obvious to me what the best way to handle it is. I’m CC’ing David Majnemer who implemented the other code in question (WinEHNumbering::calculateStateNumbers, WinEHNumbering::processCallSite) to see if he has some ideas.
From: Kaylor, Andrew
Sent: Friday, April 03, 2015 3:06 PM
To: 'David Blaikie'
Cc: llvm-commits at cs.uiuc.edu
Subject: RE: [llvm] r234059 - Fixing a memory leak in WinEHPrepare
Sure, I can do that.
From: David Blaikie [mailto:dblaikie at gmail.com]
Sent: Friday, April 03, 2015 3:04 PM
To: Kaylor, Andrew
Cc: llvm-commits at cs.uiuc.edu<mailto:llvm-commits at cs.uiuc.edu>
Subject: Re: [llvm] r234059 - Fixing a memory leak in WinEHPrepare
On Fri, Apr 3, 2015 at 2:44 PM, Andrew Kaylor <andrew.kaylor at intel.com<mailto:andrew.kaylor at intel.com>> wrote:
Date: Fri Apr 3 16:44:17 2015
New Revision: 234059
Fixing a memory leak in WinEHPrepare
--- llvm/trunk/lib/CodeGen/WinEHPrepare.cpp (original)
+++ llvm/trunk/lib/CodeGen/WinEHPrepare.cpp Fri Apr 3 16:44:17 2015
@@ -733,6 +733,8 @@ void WinEHPrepare::completeNestedLanding
I've been (vaguely) trying to remove uses of DeleteContainer* functions in favor of unique_ptr - could we change ActionList to be a SmallVector<unique_ptr<ActiovHandler>> instead of raw pointers?
// Insert an indirect branch into the outlined landing pad BB.
llvm-commits mailing list
llvm-commits at cs.uiuc.edu<mailto:llvm-commits at cs.uiuc.edu>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits