changeset 4248:f38f66e78fb2

8008340: [sampling] assert(upper->pc_offset() >= pc_offset) failed: sanity Reviewed-by: kvn, sla
author rbackman
date Mon, 18 Feb 2013 10:22:56 +0100
parents 1273de7c42d4
children d323b9b05997
files src/cpu/sparc/vm/frame_sparc.cpp src/cpu/x86/vm/frame_x86.cpp
diffstat 2 files changed, 11 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/cpu/sparc/vm/frame_sparc.cpp	Mon Feb 25 14:44:52 2013 -0500
+++ b/src/cpu/sparc/vm/frame_sparc.cpp	Mon Feb 18 10:22:56 2013 +0100
@@ -216,6 +216,11 @@
       }
     }
 
+    // Could just be some random pointer within the codeBlob
+    if (!_cb->code_contains(_pc)) {
+      return false;
+    }
+
     // Entry frame checks
     if (is_entry_frame()) {
       // an entry frame must have a valid fp.
--- a/src/cpu/x86/vm/frame_x86.cpp	Mon Feb 25 14:44:52 2013 -0500
+++ b/src/cpu/x86/vm/frame_x86.cpp	Mon Feb 18 10:22:56 2013 +0100
@@ -97,7 +97,6 @@
     // check for a valid frame_size, otherwise we are unlikely to get a valid sender_pc
 
     if (!Interpreter::contains(_pc) && _cb->frame_size() <= 0) {
-      //assert(0, "Invalid frame_size");
       return false;
     }
 
@@ -106,20 +105,22 @@
         return false;
       }
     }
+
+    // Could just be some random pointer within the codeBlob
+    if (!_cb->code_contains(_pc)) {
+      return false;
+    }
+
     // Entry frame checks
     if (is_entry_frame()) {
       // an entry frame must have a valid fp.
 
       if (!fp_safe) return false;
-
       // Validate the JavaCallWrapper an entry frame must have
 
       address jcw = (address)entry_frame_call_wrapper();
-
       bool jcw_safe = (jcw < thread->stack_base()) && ( jcw > fp);
-
       return jcw_safe;
-
     }
 
     intptr_t* sender_sp = NULL;