Skip to content

Commit

Permalink
test: move test-shadow-realm-gc.js to known_issues
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
joyeecheung authored and danielleadams committed Jul 6, 2023
1 parent f013ff1 commit 0da5c65
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/known_issues/known_issues.status
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ prefix known_issues
# foreseeable future. The test itself is flaky and skipped. It
# serves as a demonstration of the issue only.
test-vm-timeout-escape-queuemicrotask: SKIP
# Skipping it because it crashes out of OOM instead of exiting.
# https://github.com/nodejs/node/issues/47353
test-shadow-realm-gc: SKIP

[$system==win32]

Expand Down
13 changes: 13 additions & 0 deletions test/known_issues/test-shadow-realm-gc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Flags: --experimental-shadow-realm --max-old-space-size=20
'use strict';

/**
* Verifying ShadowRealm instances can be correctly garbage collected.
*/

require('../common');

for (let i = 0; i < 1000; i++) {
const realm = new ShadowRealm();
realm.evaluate('new TextEncoder(); 1;');
}

0 comments on commit 0da5c65

Please sign in to comment.