Skip to content

Assertion failure when calling reflect with Proxy target #3077

@natashenka

Description

@natashenka

The following code causes an assert:

function shouldBe(actual, expected) {

}

{
    let target = {};
    let handlers = {
        get: function(theTarget, propName, receiver) {

            shouldBe(receiver, 1);
            return 42;
        }
    };
    let proxy = new Proxy(target, handlers);
    shouldBe(Reflect.get(proxy, 0, 0x777777), 42);
}

The incorrectly casted value is never used, so this doesn't cause a crash in release.

ASSERTION 22521: (/home/user/test_everywhere/ChakraCore/lib/Jsrt/../Runtime/Types/RecyclableObject.inl, line 29) Ensure instance is a RecyclableObject
Failure: (Is(aValue))
Illegal instruction (core dumped)

proxy.txt

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions