-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Description
When trying to run test262 tests in CI noticed this test was failing on macOS (Intel, Sonoma) but passing on Linux and Cosmopolitan.
On macOS
% make test2
time ./run-test262 -t -m -c test262.conf -a
test262/test/staging/sm/Proxy/getPrototypeOf.js:255: unexpected error: TypeError: proxy: inconsistent prototype
64/79180/6856
A smaller example:
tmp.js
rval = Object.prototype;
p = new Proxy({}, {getPrototypeOf() {return rval;} });
act1 = () => print("called: act1");
act2 = () => print("called: act2");
var targetProto;
var targetWithProto = new Proxy(Object.preventExtensions(Object.create(null)), {getPrototypeOf() {act2(); return targetProto;}});
p = new Proxy(targetWithProto, { getPrototypeOf() { act1(); return rval; } });
rval = null;
targetProto = null;
p_proto = Object.getPrototypeOf(p);
print("Object.getPrototypeOf(p): ", p_proto);
On macOS
% ./qjs tmp.js
called: act1
called: act2
TypeError: proxy: inconsistent prototype
at getPrototypeOf (native)
at <eval> (.../tmp.js:14:32)
On Linux
$ ./qjs tmp.js
called: act1
called: act2
Object.getPrototypeOf(p): null
andy0130tw
Metadata
Metadata
Assignees
Labels
No labels