[ASan] Disable JSStack::sanitizeStack() to avoid false-positive stack-buffer-overflow...
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Feb 2014 17:11:23 +0000 (17:11 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Feb 2014 17:11:23 +0000 (17:11 +0000)
<http://webkit.org/b/128819>

Reviewed by Filip Pizlo.

* interpreter/JSStack.cpp:
(JSC::JSStack::sanitizeStack): When building with the clang
address sanitizer, don't sanitize the stack since it will
trigger false-positive stack-buffer-overflow errors.  Disabling
this only results in a performance penalty, not a correctness
penalty.

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

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/interpreter/JSStack.cpp

index 910de98..9d06004 100644 (file)
@@ -1,3 +1,17 @@
+2014-02-14  David Kilzer  <ddkilzer@apple.com>
+
+        [ASan] Disable JSStack::sanitizeStack() to avoid false-positive stack-buffer-overflow errors
+        <http://webkit.org/b/128819>
+
+        Reviewed by Filip Pizlo.
+
+        * interpreter/JSStack.cpp:
+        (JSC::JSStack::sanitizeStack): When building with the clang
+        address sanitizer, don't sanitize the stack since it will
+        trigger false-positive stack-buffer-overflow errors.  Disabling
+        this only results in a performance penalty, not a correctness
+        penalty.
+
 2014-02-14  Andres Gomez  <agomez@igalia.com>
 
         Cleaning the JSStaticScopeObject files left behind after renaming their objects to JSNameScope
index caf34aa..9e6bee9 100644 (file)
@@ -118,6 +118,7 @@ void JSStack::gatherConservativeRoots(ConservativeRoots& conservativeRoots, JITS
 
 void JSStack::sanitizeStack()
 {
+#if !defined(ADDRESS_SANITIZER)
     ASSERT(topOfStack() <= baseOfStack());
     
     if (m_lastStackTop < topOfStack()) {
@@ -127,6 +128,7 @@ void JSStack::sanitizeStack()
     }
     
     m_lastStackTop = topOfStack();
+#endif
 }
 
 void JSStack::releaseExcessCapacity()