-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iterator proxy vs. SetterThatIgnoresPrototypeProperties – infinite recursion #3529
Comments
My initial reading suggests that this is indeed an infinite loop for a misconfigured Proxy, and that jsc and v8 aren't matching the spec, but hopefully more folks will weigh in. |
I was actually about to report a similar issue, without proxy Object.create(null, {constructor: Object.getOwnPropertyDescriptor(Iterator.prototype, 'constructor')}).constructor = 'bar'
VM423:1 Uncaught RangeError: Maximum call stack size exceeded |
I think an infinite loop is the expected behavior, yup. Having a Proxy which reports having a property which the underlying object lacks will often have strange behavior. @mhofman I don't think that one's an issue; the setter is not designed to be re-homed. |
Yeah it was just very surprising we have an infinite recursion purely in spec code. |
Fuzzilli found a bug in the XS implementation of SetterThatIgnoresPrototypeProperties. After fixing the bug, the result is infinite recursion.
Here is the code (simplified from Fuzzilli):
Here are the results with eshost:
We believe that XS is now following the relevant spec steps faithfully.
Note that both XS and SpiderMonkey show infinite recursion, but somehow JSC and v8 do not. What is the expected behavior?
The text was updated successfully, but these errors were encountered: