Skip to content

Commit 44f08ed

Browse files
joyeecheungMoLow
authored andcommitted
test: move test-shadow-realm-gc.js to known_issues
There is actually a leak. The test doesn't exercise the right path to create a substantial enough object graph (e.g. accessing something that results in the loading of a binding). This does something more complicated in the test and moves it to known_issues until we find a fix. PR-URL: #47355 Refs: #47353 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
1 parent a1aabb6 commit 44f08ed

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

test/known_issues/known_issues.status

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ prefix known_issues
1111
# foreseeable future. The test itself is flaky and skipped. It
1212
# serves as a demonstration of the issue only.
1313
test-vm-timeout-escape-queuemicrotask: SKIP
14+
# Skipping it because it crashes out of OOM instead of exiting.
15+
# https://github.com/nodejs/node/issues/47353
16+
test-shadow-realm-gc: SKIP
1417

1518
[$system==win32]
1619

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Flags: --experimental-shadow-realm --max-old-space-size=20
2+
'use strict';
3+
4+
/**
5+
* Verifying ShadowRealm instances can be correctly garbage collected.
6+
*/
7+
8+
require('../common');
9+
10+
for (let i = 0; i < 1000; i++) {
11+
const realm = new ShadowRealm();
12+
realm.evaluate('new TextEncoder(); 1;');
13+
}

0 commit comments

Comments
 (0)