diff options
| author | Jeffrey Yasskin <jyasskin@google.com> | 2009-12-22 23:18:18 +0000 |
|---|---|---|
| committer | Jeffrey Yasskin <jyasskin@google.com> | 2009-12-22 23:18:18 +0000 |
| commit | ad46e4416baffeb57f9bdba88375b8b98cb76aa4 (patch) | |
| tree | 386e2aed3bc5e8ce6d58acda63a526de84da7e8f /llvm/lib/ExecutionEngine/JIT | |
| parent | 801fda871bac67a014e352b915e4f38eeac6184b (diff) | |
| download | bcm5719-llvm-ad46e4416baffeb57f9bdba88375b8b98cb76aa4.tar.gz bcm5719-llvm-ad46e4416baffeb57f9bdba88375b8b98cb76aa4.zip | |
Fix a crash in JIT::recompileAndRelinkFunction(). It doesn't pass the MCI
argument to runJITOnFunction(), which caused a null pointer dereference at
every call.
Patch by Gianluca Guida!
llvm-svn: 91939
Diffstat (limited to 'llvm/lib/ExecutionEngine/JIT')
| -rw-r--r-- | llvm/lib/ExecutionEngine/JIT/JIT.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/JIT.cpp b/llvm/lib/ExecutionEngine/JIT/JIT.cpp index 9b5a176ff58..ebc25677438 100644 --- a/llvm/lib/ExecutionEngine/JIT/JIT.cpp +++ b/llvm/lib/ExecutionEngine/JIT/JIT.cpp @@ -611,11 +611,13 @@ void JIT::runJITOnFunction(Function *F, MachineCodeInfo *MCI) { } }; MCIListener MCIL(MCI); - RegisterJITEventListener(&MCIL); + if (MCI) + RegisterJITEventListener(&MCIL); runJITOnFunctionUnlocked(F, locked); - UnregisterJITEventListener(&MCIL); + if (MCI) + UnregisterJITEventListener(&MCIL); } void JIT::runJITOnFunctionUnlocked(Function *F, const MutexGuard &locked) { |

