Stack overflow by the operator of `=~` or `!~`.
Kray-G opened this issue · 1 comments
Kray-G commented
When using the operator of =~
or !~
, the stack is not used cleanly.
It causes a stack overflow after a lot of operations by those operator like in a loop.
This should be also applied to v1.0.2 as a back port.
Kray-G commented
Here is the code to be reproduced. Stack has been overflowed when unmatched after resetting a string in Regex.
var l = "aaaaaaa";
for (var i = 0; i < 1000; ++i) {
if (g = (l =~ /([b-z]+)/)) {
System.println(g[1].string);
} else if (g = (l =~ /([0-9]+)/)) {
System.println(g[1].string);
}
}
System.println("Successful");