Skip to content

Assertion `!opFlags.getMustExist() && "MustExist cannot be used with Proxy objects"' failed. #1811

@7331akasokoan

Description

@7331akasokoan

Commit 2af96b3 in static_h branch

PoC:


Object.setPrototypeOf(this, new Proxy({}, {
    has() {},
    getOwnPropertyDescriptor() {},
    get(target, prop, receiver) {
        'use strict';
        x = 30n;
    }
}));

a;

Command:

./hermes poc.js

Crash:


hermes: /home/test/hermes_workingdir/hermes/lib/VM/JSObject.cpp:1493: static CallResult<bool> hermes::vm::JSObject::putNamedWithReceiver_RJS(Handle<JSObject>, Runtime &, SymbolID, Handle<>, Handle<>, PropOpFlags, RuntimeModule *, SHUnit *, WritePropertyCacheEntry *): Assertion `!opFlags.getMustExist() && "MustExist cannot be used with Proxy objects"' failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions