Skip to content

Commit c55fa12

Browse files
authored
test: wait for FFI background optimization
The pointer range test creates multiple closures from the same function literals and explicitly requests synchronous optimization. V8 can also schedule concurrent recompilation for those closures. Wait for background optimization before closing the dynamic library so compiler jobs cannot outlive the fast FFI metadata they reference. Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> Assisted-by: codex:gpt-5.6-sol PR-URL: #65300 Refs: https://github.com/nodejs/reliability/issues?q=sort%3Aupdated-desc%20%22test-ffi-fast-integer-validation%22 Reviewed-By: Aviv Keller <me@aviv.sh> Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
1 parent 91aaf05 commit c55fa12

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

test/ffi/test-ffi-fast-integer-validation.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ test('fast FFI validates integer argument ranges', () => {
6565
assert.throws(() => callI64(2n ** 63n), expect);
6666
assert.throws(() => callU64(2n ** 64n), expect);
6767
} finally {
68+
eval('%WaitForBackgroundOptimization()');
6869
lib.close();
6970
}
7071
});
@@ -96,6 +97,7 @@ test('fast FFI validates pointer BigInt ranges', () => {
9697
}
9798
}
9899
} finally {
100+
eval('%WaitForBackgroundOptimization()');
99101
lib.close();
100102
}
101103
});

0 commit comments

Comments
 (0)