[Webkit-unassigned] [Bug 161534] New: Regression(r197648): JSObject::setPrototypeWithCycleCheck() allows for cycles but the rest of the code base does not
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Sep 2 09:46:04 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=161534
Bug ID: 161534
Summary: Regression(r197648):
JSObject::setPrototypeWithCycleCheck() allows for
cycles but the rest of the code base does not
Classification: Unclassified
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: cdumez at apple.com
CC: ggaren at apple.com, mark.lam at apple.com,
sbarati at apple.com
Blocks: 155002
JSObject::setPrototypeWithCycleCheck() allows for cycles but the rest of the code base does not deal properly with cycles.
This is because of the following check that was added:
if (UNLIKELY(asObject(nextPrototype)->methodTable(vm)->getPrototype != defaultGetPrototype))
break;
This was added to match the EcmaScript spec:
- https://tc39.github.io/ecma262/#sec-ordinarysetprototypeof (step 8)
However, if you create a cycles, we end up with an infinite loop later on under:
Structure::anyObjectInChainMayInterceptIndexedAccesses()
This is likely not the only place we traverse the prototype chain and except there is no cycle.
I noticed this when running html/browsers/history/the-location-interface/allow_prototype_cycle_through_location.sub.html with the patch for Bug 161455 applied.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160902/c7c6a51d/attachment-0001.html>
More information about the webkit-unassigned
mailing list