summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/JIT
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@google.com>2009-12-22 23:18:18 +0000
committerJeffrey Yasskin <jyasskin@google.com>2009-12-22 23:18:18 +0000
commitad46e4416baffeb57f9bdba88375b8b98cb76aa4 (patch)
tree386e2aed3bc5e8ce6d58acda63a526de84da7e8f /llvm/lib/ExecutionEngine/JIT
parent801fda871bac67a014e352b915e4f38eeac6184b (diff)
downloadbcm5719-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.cpp6
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) {
OpenPOWER on IntegriCloud