summaryrefslogtreecommitdiffstats
path: root/vm/mterp
diff options
context:
space:
mode:
authorJohnnie Birch <jlbirch>2011-03-25 13:24:03 -0700
committerJohnnie Birch <johnnie.l.birch.jr@intel.com>2011-03-25 13:27:14 -0700
commit636d67b098baf14ae8b505b638181a80a356e0ab (patch)
tree60a2e7e5d12c9d5ac3d4386d959507db9351e25e /vm/mterp
parentd063e255ed3f3363f5edc3c9a480dcea465bcab2 (diff)
downloadandroid_dalvik-636d67b098baf14ae8b505b638181a80a356e0ab.tar.gz
android_dalvik-636d67b098baf14ae8b505b638181a80a356e0ab.tar.bz2
android_dalvik-636d67b098baf14ae8b505b638181a80a356e0ab.zip
Fixed bug in x86-atom fast interpreter. Adds guard for potential null pointer.
Adds guard for potential null pointer when checking for debugger active on return from method. Change-Id: Iaef2b6815fe6c64450cc0cc36f8920e4c38f40e6
Diffstat (limited to 'vm/mterp')
-rw-r--r--vm/mterp/out/InterpAsm-x86-atom.S3
-rw-r--r--vm/mterp/x86-atom/footer.S3
2 files changed, 6 insertions, 0 deletions
diff --git a/vm/mterp/out/InterpAsm-x86-atom.S b/vm/mterp/out/InterpAsm-x86-atom.S
index 9d384dd22..5db130ed3 100644
--- a/vm/mterp/out/InterpAsm-x86-atom.S
+++ b/vm/mterp/out/InterpAsm-x86-atom.S
@@ -18237,7 +18237,10 @@ common_returnFromMethod:
movl rGLUE, rINST # %ecx<- pMterpGlue
movl offGlue_pSelfSuspendCount(rINST), %edx # %ebx<- pSuspendCount (int)
movl offGlue_pDebuggerActive(rINST), %eax # %eax<- pDebuggerActive
+ testl %eax, %eax
+ je 5f
movl (%eax), %eax # %eax<- get debuggerActive (boolean)
+5:
and $7, %eax # %eax<- mask for boolean (just how many bits does it take?)
cmp $0, (%edx) # check if suspend is pending
jne 2f # handle suspend
diff --git a/vm/mterp/x86-atom/footer.S b/vm/mterp/x86-atom/footer.S
index cb9970d7a..20acfb94e 100644
--- a/vm/mterp/x86-atom/footer.S
+++ b/vm/mterp/x86-atom/footer.S
@@ -353,7 +353,10 @@ common_returnFromMethod:
movl rGLUE, rINST # %ecx<- pMterpGlue
movl offGlue_pSelfSuspendCount(rINST), %edx # %ebx<- pSuspendCount (int)
movl offGlue_pDebuggerActive(rINST), %eax # %eax<- pDebuggerActive
+ testl %eax, %eax
+ je 5f
movl (%eax), %eax # %eax<- get debuggerActive (boolean)
+5:
and $$7, %eax # %eax<- mask for boolean (just how many bits does it take?)
cmp $$0, (%edx) # check if suspend is pending
jne 2f # handle suspend