[llvm-commits] [PATCH] Avoid use after free in ScalarEvolution
edwintorok at gmail.com
Fri May 22 03:41:48 PDT 2009
When running ScalarEvolution on-the-fly (from a ModulePass), and using
getSCEVAtScope I get use-after-free errors.
This is because nobody calls releaseMemory() for ScalarEvolution before
running it again, and LoopInfo has already been run for the new function
, hence freeing the loopinfo of the previous function. But
ScalarEvolution still has Loop* in ValuesAtScopes (and other maps),
which cause use-after-free errors.
The attached patch simply adds a call to releaseMemory().
OK to commit?
Or should the on-the-fly passmanager call releaseMemory before rerunning
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 420 bytes
Desc: not available
More information about the llvm-commits