@@ -22,23 +22,37 @@ const sourceData = (function () {
2222
2323test ( 'setUp common' , testCommon . setUp )
2424
25- test ( 'try to create an iterator with a blown stack' , function ( t ) {
26- // Reducing the stack size down from the default 984 for the child node
27- // process makes it easier to trigger the bug condition. But making it too low
28- // causes the child process to die for other reasons.
29- var opts = { execArgv : [ '--stack-size=128' ] }
30- var child = fork ( path . join ( __dirname , 'stack-blower.js' ) , [ 'run' ] , opts )
25+ // TODO: fix this test. It asserted that we didn't segfault if user code had an
26+ // infinite loop leading to stack exhaustion, which caused a node::FatalException()
27+ // call in our Iterator to segfault. This was fixed in 2014 (commit 85e6a38).
28+ //
29+ // Today (2020), we see occasional failures in CI again. We no longer call
30+ // node::FatalException() so there's a new reason. Possibly related to
31+ // https://github.com/Level/leveldown/issues/667.
32+ test . skip ( 'try to create an iterator with a blown stack' , function ( t ) {
33+ for ( let i = 0 ; i < 100 ; i ++ ) {
34+ t . test ( `try to create an iterator with a blown stack (${ i } )` , function ( t ) {
35+ t . plan ( 3 )
3136
32- t . plan ( 2 )
37+ // Reducing the stack size down from the default 984 for the child node
38+ // process makes it easier to trigger the bug condition. But making it too low
39+ // causes the child process to die for other reasons.
40+ var opts = { execArgv : [ '--stack-size=128' ] }
41+ var child = fork ( path . join ( __dirname , 'stack-blower.js' ) , [ 'run' ] , opts )
3342
34- child . on ( 'message' , function ( m ) {
35- t . ok ( true , m )
36- child . disconnect ( )
37- } )
43+ child . on ( 'message' , function ( m ) {
44+ t . ok ( true , m )
45+ child . disconnect ( )
46+ } )
3847
39- child . on ( 'exit' , function ( code , sig ) {
40- t . equal ( code , 0 , 'child exited normally' )
41- } )
48+ child . on ( 'exit' , function ( code , sig ) {
49+ t . is ( code , 0 , 'child exited normally' )
50+ t . is ( sig , null , 'not terminated due to signal' )
51+ } )
52+ } )
53+ }
54+
55+ t . end ( )
4256} )
4357
4458test ( 'setUp db' , function ( t ) {
0 commit comments