[LLVMdev] Stale SCEV pointer to deleted AssumptionCache (original) (raw)
Steve King steve at metrokings.com
Tue Jul 14 16:19:31 PDT 2015
- Previous message: [LLVMdev] New linker ownership
- Next message: [LLVMdev] Stale SCEV pointer to deleted AssumptionCache
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello LLVM, I have a small-ish custom pass that runs after LoopStrengthReduce. After a recent upstream merge, this custom pass caused an impossible assert(), the root cause of which is that the SCEV pass has a stale pointer to a deleted AssumptionCache. Specifically:
bool ScalarEvolution::runOnFunction(Function &F) { ... AC = &getAnalysis().getAssumptionCache(F); ...
AC is long lived raw pointer to memory owned by a unique_ptr. Sounds bad.
The sequence of events is quite hairy, but what seems to be happening is that PMDataManager::removeDeadPasses() blows away the AssumptionCache data, while the SCEV object and its dangling pointer live on. As far as I can tell, all the passes have correctly registered their dependencies.
My previous upstream merge was June 29, and everything worked fine then.
I'm a little stumped as to what the real problem might be. Pointers for chasing this own would be much appreciated.
Thanks, -steve
- Previous message: [LLVMdev] New linker ownership
- Next message: [LLVMdev] Stale SCEV pointer to deleted AssumptionCache
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]