Skip to content

Commit 775af7a

Browse files
addaleaxMylesBorins
authored andcommitted
test: add regression test for v8.getHeapSnapshot() crash
Fixes: #35559 PR-URL: #35612 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]>
1 parent b8529a7 commit 775af7a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'use strict';
2+
require('../common');
3+
const v8 = require('v8');
4+
5+
// Regression test for https://github.com/nodejs/node/issues/35559
6+
// It is important that the return value of the first call is not used, i.e.
7+
// that the first snapshot is GC-able while the second one is being created.
8+
v8.getHeapSnapshot();
9+
v8.getHeapSnapshot();

0 commit comments

Comments
 (0)