Revision: 3270
Author: [email protected]
Date: Wed Nov 11 01:17:04 2009
Log: Merge bleeding_edge revision 3263 to trunk.  This fixes a stack
corruption issue.

[email protected]
Review URL: http://codereview.chromium.org/384041
http://code.google.com/p/v8/source/detail?r=3270

Modified:
  /trunk/src/ia32/virtual-frame-ia32.cc
  /trunk/src/version.cc
  /trunk/src/x64/virtual-frame-x64.cc

=======================================
--- /trunk/src/ia32/virtual-frame-ia32.cc       Fri Oct 16 04:48:38 2009
+++ /trunk/src/ia32/virtual-frame-ia32.cc       Wed Nov 11 01:17:04 2009
@@ -161,16 +161,15 @@
    // on the stack.
    int start = Min(begin, stack_pointer_ + 1);

-  // Emit normal 'push' instructions for elements above stack pointer
-  // and use mov instructions if we are below stack pointer.
+  // If positive we have to adjust the stack pointer.
+  int delta = end - stack_pointer_;
+  if (delta > 0) {
+    stack_pointer_ = end;
+    __ sub(Operand(esp), Immediate(delta * kPointerSize));
+  }
+
    for (int i = start; i <= end; i++) {
-    if (!elements_[i].is_synced()) {
-      if (i <= stack_pointer_) {
-        SyncElementBelowStackPointer(i);
-      } else {
-        SyncElementByPushing(i);
-      }
-    }
+    if (!elements_[i].is_synced()) SyncElementBelowStackPointer(i);
    }
  }

=======================================
--- /trunk/src/version.cc       Wed Nov 11 01:11:58 2009
+++ /trunk/src/version.cc       Wed Nov 11 01:17:04 2009
@@ -35,7 +35,7 @@
  #define MAJOR_VERSION     1
  #define MINOR_VERSION     3
  #define BUILD_NUMBER      18
-#define PATCH_LEVEL       3
+#define PATCH_LEVEL       4
  #define CANDIDATE_VERSION false

  // Define SONAME to have the SCons build the put a specific SONAME into the
=======================================
--- /trunk/src/x64/virtual-frame-x64.cc Fri Oct 16 04:48:38 2009
+++ /trunk/src/x64/virtual-frame-x64.cc Wed Nov 11 01:17:04 2009
@@ -893,16 +893,15 @@
    // on the stack.
    int start = Min(begin, stack_pointer_ + 1);

-  // Emit normal 'push' instructions for elements above stack pointer
-  // and use mov instructions if we are below stack pointer.
+  // If positive we have to adjust the stack pointer.
+  int delta = end - stack_pointer_;
+  if (delta > 0) {
+    stack_pointer_ = end;
+    __ subq(rsp, Immediate(delta * kPointerSize));
+  }
+
    for (int i = start; i <= end; i++) {
-    if (!elements_[i].is_synced()) {
-      if (i <= stack_pointer_) {
-        SyncElementBelowStackPointer(i);
-      } else {
-        SyncElementByPushing(i);
-      }
-    }
+    if (!elements_[i].is_synced()) SyncElementBelowStackPointer(i);
    }
  }


--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to