Skip to content

Commit 414f602

Browse files
committed
test: skip FFI reentrant callback test on SmartOS
1 parent ca7a27b commit 414f602

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

lib/internal/ffi/fast-api.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ function wrapWithRawPointerConversions(rawFn, argumentTypes, _owner) {
297297
try {
298298
return rawFn(c0 ?
299299
convertFastArg(t0, a0, rawFn, stringState, 0) : a0,
300-
c1 ? convertFastArg(t1, a1, rawFn, stringState, 1) : a1);
300+
c1 ? convertFastArg(t1, a1, rawFn, stringState, 1) : a1);
301301
} finally {
302302
if (stringCall) exitStringConversion(stringState);
303303
}
@@ -320,8 +320,8 @@ function wrapWithRawPointerConversions(rawFn, argumentTypes, _owner) {
320320
try {
321321
return rawFn(c0 ?
322322
convertFastArg(t0, a0, rawFn, stringState, 0) : a0,
323-
c1 ? convertFastArg(t1, a1, rawFn, stringState, 1) : a1,
324-
c2 ? convertFastArg(t2, a2, rawFn, stringState, 2) : a2);
323+
c1 ? convertFastArg(t1, a1, rawFn, stringState, 1) : a1,
324+
c2 ? convertFastArg(t2, a2, rawFn, stringState, 2) : a2);
325325
} finally {
326326
if (stringCall) exitStringConversion(stringState);
327327
}

test/ffi/test-ffi-fast-buffer.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@ test('fast FFI buffer arguments reject invalid values', () => {
7070
}
7171
});
7272

73-
test('fast FFI string buffers survive reentrant callbacks', () => {
73+
test('fast FFI string buffers survive reentrant callbacks', {
74+
// Bundled libffi callbacks crash on SmartOS.
75+
skip: common.isSunOS,
76+
}, () => {
7477
const { lib, functions } = ffi.dlopen(libraryPath, {
7578
safe_strlen: { arguments: ['string'], return: 'i32' },
7679
string_survives_callback: {

0 commit comments

Comments
 (0)