1 When compiling continue statements nested in switches, the compiler only 2 emitted pop statements for the local variables in the switch body scope, 3 but not for the locals in the scope(s) leading up to the containing loop 4 body. 5 6 Depending on the context, this either led to infinite loops, wrong local 7 variable values or segmentation faults. 8 9 -- Testcase -- 10 {% 11 let n = 0; 12 13 while (true) { 14 let x = 1; 15 16 switch (n++) { 17 case 0: 18 case 1: 19 continue; 20 } 21 22 break; 23 } 24 25 print(n, '\n'); 26 %} 27 -- End -- 28 29 -- Expect stdout -- 30 3 31 -- End --
This page was automatically generated by LXR 0.3.1. • OpenWrt