⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 242667 in webkit


Ignore:
Timestamp:
Mar 8, 2019, 5:10:33 PM (7 years ago)
Author:
mark.lam@apple.com
Message:

Stack overflow crash in JSC::JSObject::hasInstance.
https://bugs.webkit.org/show_bug.cgi?id=195458
<rdar://problem/48710195>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/stack-overflow-in-custom-hasInstance.js: Added.

Source/JavaScriptCore:

  • runtime/JSObject.cpp:

(JSC::JSObject::hasInstance):

Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JSTests/ChangeLog

    r242649 r242667  
     12019-03-08  Mark Lam  <mark.lam@apple.com>
     2
     3        Stack overflow crash in JSC::JSObject::hasInstance.
     4        https://bugs.webkit.org/show_bug.cgi?id=195458
     5        <rdar://problem/48710195>
     6
     7        Reviewed by Yusuke Suzuki.
     8
     9        * stress/stack-overflow-in-custom-hasInstance.js: Added.
     10
    1112019-03-08  Tadeu Zagallo  <tzagallo@apple.com>
    212
  • trunk/Source/JavaScriptCore/ChangeLog

    r242663 r242667  
     12019-03-08  Mark Lam  <mark.lam@apple.com>
     2
     3        Stack overflow crash in JSC::JSObject::hasInstance.
     4        https://bugs.webkit.org/show_bug.cgi?id=195458
     5        <rdar://problem/48710195>
     6
     7        Reviewed by Yusuke Suzuki.
     8
     9        * runtime/JSObject.cpp:
     10        (JSC::JSObject::hasInstance):
     11
    1122019-03-08  Robin Morisset  <rmorisset@apple.com>
    213
  • trunk/Source/JavaScriptCore/runtime/JSObject.cpp

    r242650 r242667  
    4747#include "SlotVisitorInlines.h"
    4848#include "TypeError.h"
     49#include "VMInlines.h"
    4950#include <math.h>
    5051#include <wtf/Assertions.h>
     
    22462247        RELEASE_AND_RETURN(scope, defaultHasInstance(exec, value, prototype));
    22472248    }
    2248     if (info.implementsHasInstance())
     2249    if (info.implementsHasInstance()) {
     2250        if (UNLIKELY(!vm.isSafeToRecurseSoft())) {
     2251            throwStackOverflowError(exec, scope);
     2252            return false;
     2253        }
    22492254        RELEASE_AND_RETURN(scope, methodTable(vm)->customHasInstance(this, exec, value));
     2255    }
    22502256
    22512257    throwException(exec, scope, createInvalidInstanceofParameterErrorNotFunction(exec, this));
Note: See TracChangeset for help on using the changeset viewer.