Skip to content

iterator proxy vs. SetterThatIgnoresPrototypeProperties – infinite recursion #3529

Open
@phoddie

Description

@phoddie

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):

function trap() {
   return { configurable:true };
}
const array = new Array();
const iterator = array.keys();
const proxy = new Proxy(iterator, { getOwnPropertyDescriptor: trap });
proxy.constructor = {};

Here are the results with eshost:

#### JavaScriptCore

#### SpiderMonkey
InternalError: too much recursion

#### v8

#### XS
Error: stack overflow

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions