Skip to content

Commit

Permalink
test: add known issue test for nodejs#8539
Browse files Browse the repository at this point in the history
child_process.spawnSync segfaults when given an array/object
for the file argument with a throwing toString definition.

Refs: nodejs#8539

Signed-off-by: Ilkka Myller <[email protected]>
  • Loading branch information
imyller committed Sep 15, 2016
1 parent 3c23db4 commit 62ea6a0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/known_issues/known_issues.status
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ prefix known_issues
# sample-test : SKIP

[true] # This section applies to all platforms
test-child-process-spawnsync: crash

[$system==win32]
test-stdout-buffer-flush-on-exit: SKIP
Expand Down
8 changes: 8 additions & 0 deletions test/known_issues/test-child-process-spawnsync.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
'use strict';
// Refs: https://github.com/nodejs/node/issues/8539
require('../common');

const file = {};
file.toString = () => { throw 'foo'; };
const child_process = require('child_process');
child_process.spawnSync(file);

0 comments on commit 62ea6a0

Please sign in to comment.