[LLVMbugs] [Bug 4398] New: passManager should always call releaseMemory to avoid use-after-free bugs
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Tue Jun 16 00:18:16 PDT 2009
http://llvm.org/bugs/show_bug.cgi?id=4398
Summary: passManager should always call releaseMemory to avoid
use-after-free bugs
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: edwintorok at gmail.com
CC: gohman at apple.com, llvmbugs at cs.uiuc.edu
Currently some passes call releaseMemory (or their equivalent) in their run
function, some don't (for example ScalarEvolution).
According to the documentation "This method is called after the run* method for
the class, before the next call of run* in your pass."
However the PassManager doesn't do this for on-the-fly passes, which can cause
use-after-free bugs if you are using ScalarEvolution from a ModulePass
(LoopInfo is rerun, but ScalarEvolution still has stale data from the previous
LoopInfo run).
As discusses on llvm-commits the following should happen:
- PassManager should call releaseMemory for on-the-fly passes too
- PassManager should assert if it forgot to call releaseMemory
- passes that have a releaseMemory equivalent should have the method renamed
to releaseMemory
- passes should no longer call releaseMemory in their run function
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list