diff -r 000000000000 -r 6474c204b198 js/src/jit-test/tests/ion/bug732847.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/jit-test/tests/ion/bug732847.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,20 @@ +try{} catch (x) {} + +var callStack = []; +function currentFunc() { + return callStack[0]; +} +function reportFailure () { + var funcName = currentFunc(); + // play with the result to cause a SEGV. + var prefix = (funcName) ? funcName : ""; + // Use OSR to compile the function at the end of the first run. + for (var i=0; i < 50; i++) ; +} + +callStack[0] = 'test'; +// Run and compile with a string as result of currentFunc. +reportFailure(); +callStack[0] = undefined; +// Use previously compiled code with the string assumption. +reportFailure();