2006-07-23 Geoffrey Garen <ggaren@apple.com>
authorggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 23 Jul 2006 21:59:00 +0000 (21:59 +0000)
committerggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 23 Jul 2006 21:59:00 +0000 (21:59 +0000)
        Patch by Eric Albert, reviewed by Darin and me.

        - Fixed <rdar://problem/4645931> JavaScriptCore stack-scanning code
        crashes (Collector::markStackObjectsConservatively)

        * bindings/jni/jni_jsobject.cpp: On 64bit systems, jint is a long, not an
        int.
        (JavaJSObject::getSlot):
        (JavaJSObject::setSlot):
        * kjs/collector.cpp:
        (KJS::Collector::markCurrentThreadConservatively): Use a pointer instead of
        an int as 'dummy,' because on LP64 systems, an int is not pointer-aligned,
        and we want to scan the stack for pointers.
        * JavaScriptCore.xcodeproj/project.pbxproj: After a tense cease-fire, the
        XCode war has started up again!

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15583 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/ChangeLog
JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
JavaScriptCore/bindings/jni/jni_jsobject.cpp
JavaScriptCore/kjs/collector.cpp

index df18d133e44ccd0e99ab40243ddc3b1b5b70d0dd..ead967594dc0d0d6d5281811c1f62004559c09fb 100644 (file)
@@ -1,3 +1,21 @@
+    2006-07-23  Geoffrey Garen  <ggaren@apple.com>
+
+        Patch by Eric Albert, reviewed by Darin and me.
+        
+        - Fixed <rdar://problem/4645931> JavaScriptCore stack-scanning code 
+        crashes (Collector::markStackObjectsConservatively)
+        
+        * bindings/jni/jni_jsobject.cpp: On 64bit systems, jint is a long, not an
+        int.
+        (JavaJSObject::getSlot):
+        (JavaJSObject::setSlot):
+        * kjs/collector.cpp:
+        (KJS::Collector::markCurrentThreadConservatively): Use a pointer instead of
+        an int as 'dummy,' because on LP64 systems, an int is not pointer-aligned,
+        and we want to scan the stack for pointers.
+        * JavaScriptCore.xcodeproj/project.pbxproj: After a tense cease-fire, the 
+        XCode war has started up again!
+
 === Safari-521.20 ===
 
 2006-07-21  Geoffrey Garen  <ggaren@apple.com>
index 5c17cd44bd5f1784f01b48c3c881197fceaa35f0..79fe00f7d468cf5efa95c23086a5fb33f96a418b 100644 (file)
                0867D690FE84028FC02AAC07 /* Project object */ = {
                        isa = PBXProject;
                        buildConfigurationList = 149C277108902AFE008A9EFC /* Build configuration list for PBXProject "JavaScriptCore" */;
+                       compatibilityVersion = "Xcode 2.4";
                        hasScannedForEncodings = 1;
                        mainGroup = 0867D691FE84028FC02AAC07 /* JavaScriptCore */;
                        productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
                        projectDirPath = "";
+                       projectRoot = "";
+                       shouldCheckCompatibility = 1;
                        targets = (
                                932F5B3E0822A1C700736975 /* JavaScriptCore */,
                                935F69F508244FEA003D1A45 /* dftables */,
index d49e360900ab154f994281ad2d4e552c998e1dca..37d4a2d2b2ffcfd19b123ce8054219e5eec05a6b 100644 (file)
@@ -244,7 +244,11 @@ void JavaJSObject::removeMember(jstring memberName) const
 
 jobject JavaJSObject::getSlot(jint index) const
 {
+#if __LP64__
+    JS_LOG ("index = %d\n", index);
+#else
     JS_LOG ("index = %ld\n", index);
+#endif
 
     ExecState *exec = _root->interpreter()->globalExec();
 
@@ -257,7 +261,11 @@ jobject JavaJSObject::getSlot(jint index) const
 
 void JavaJSObject::setSlot(jint index, jobject value) const
 {
+#if __LP64__
+    JS_LOG ("index = %d, value = %p\n", index, value);
+#else
     JS_LOG ("index = %ld, value = %p\n", index, value);
+#endif
 
     ExecState *exec = _root->interpreter()->globalExec();
     JSLock lock;
index d21cb3152c6ac752d8f713d21c3825a56a5496e8..5d9d89b38dca41f5695a77f18cd3601d9bafdfaa 100644 (file)
@@ -333,7 +333,7 @@ void Collector::markCurrentThreadConservatively()
 #error Need a way to get the stack base on this platform
 #endif
 
-    int dummy;
+    void *dummy;
     void *stackPointer = &dummy;
 
     markStackObjectsConservatively(stackPointer, stackBase);