1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/jit-test/tests/ion/bug732847.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,20 @@ 1.4 +try{} catch (x) {} 1.5 + 1.6 +var callStack = []; 1.7 +function currentFunc() { 1.8 + return callStack[0]; 1.9 +} 1.10 +function reportFailure () { 1.11 + var funcName = currentFunc(); 1.12 + // play with the result to cause a SEGV. 1.13 + var prefix = (funcName) ? funcName : ""; 1.14 + // Use OSR to compile the function at the end of the first run. 1.15 + for (var i=0; i < 50; i++) ; 1.16 +} 1.17 + 1.18 +callStack[0] = 'test'; 1.19 +// Run and compile with a string as result of currentFunc. 1.20 +reportFailure(); 1.21 +callStack[0] = undefined; 1.22 +// Use previously compiled code with the string assumption. 1.23 +reportFailure();