[vmkit-commits] [vmkit] r56839 - /vmkit/branches/isolate/lib/Mvm/Runtime/JIT.cpp

Nicolas Geoffray nicolas.geoffray at lip6.fr
Tue Sep 30 07:21:30 PDT 2008


Author: geoffray
Date: Tue Sep 30 09:21:29 2008
New Revision: 56839

URL: http://llvm.org/viewvc/llvm-project?rev=56839&view=rev
Log:
Also verify that the next value in the call stack is below
the current address.


Modified:
    vmkit/branches/isolate/lib/Mvm/Runtime/JIT.cpp

Modified: vmkit/branches/isolate/lib/Mvm/Runtime/JIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/branches/isolate/lib/Mvm/Runtime/JIT.cpp?rev=56839&r1=56838&r2=56839&view=diff

==============================================================================
--- vmkit/branches/isolate/lib/Mvm/Runtime/JIT.cpp (original)
+++ vmkit/branches/isolate/lib/Mvm/Runtime/JIT.cpp Tue Sep 30 09:21:29 2008
@@ -315,12 +315,12 @@
 #endif
 
 int mvm::jit::getBacktrace(void** stack, int size) {
-  void** blah = (void**)__builtin_frame_address(1);
+  void** addr = (void**)__builtin_frame_address(1);
   int cpt = 0;
   void* baseSP = mvm::Thread::get()->baseSP;
-  while (blah && cpt < size && blah < baseSP) {
-    stack[cpt++] = (void**)FRAME_IP(blah);
-    blah = (void**)blah[0];
+  while (addr && cpt < size && addr < baseSP && addr < addr[0]) {
+    stack[cpt++] = (void**)FRAME_IP(addr);
+    addr = (void**)addr[0];
   }
   return cpt;
 }





More information about the vmkit-commits mailing list