[quickjs-devel] Re: Proxy Test Not All References Freed

  • From: Connor Nolan <connor24nolan@xxxxxxxx>
  • To: "quickjs-devel@xxxxxxxxxxxxx" <quickjs-devel@xxxxxxxxxxxxx>
  • Date: Sun, 11 Aug 2019 03:21:45 +0000

You can test this with:

function test() {
    var passed = false;
    new Proxy(function(){}, {
        apply: function () { passed = true; }
    })();
    // A Proxy exotic object only has a [[Call]] internal method if the
    // initial value of its [[ProxyTarget]] internal slot is an object
    // that has a [[Call]] internal method.
    try {
        new Proxy({}, {
            apply: function () {}
        })();
        return false;
    } catch(e) {}
    return passed;
}
console.log("Result: " + test());

________________________________
From: quickjs-devel-bounce@xxxxxxxxxxxxx <quickjs-devel-bounce@xxxxxxxxxxxxx> 
on behalf of Connor Nolan <connor24nolan@xxxxxxxx>
Sent: Saturday, August 10, 2019 8:12 PM
To: quickjs-devel@xxxxxxxxxxxxx <quickjs-devel@xxxxxxxxxxxxx>
Subject: [quickjs-devel] Proxy Test Not All References Freed

Hen running https://github.com/kangax/compat-table.git ES6 test suite, the test ;
"data-es6 -> Proxy -> "apply" handler invariant" crashed QuickJS with the 
error: "qjsbn: quickjs.c:1631: JS_FreeRuntime: Assertion 
`list_empty(&rt->obj_list)' failed.".

Other related posts: