jerryscript
jerryscript copied to clipboard
Segmentation fault on String.Replace
Version: 17a5dd27bbbadc036d83be0448f9edfa90800147
System:
Linux eg 4.2.0-18-generic #22-Ubuntu SMP Fri Nov 6 18:25:50 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Test case:
''.replace(/$/g,"a");
Output:
../jerry-bugs/run-test.sh: line 8: 11269 Segmentation fault ./build/bin/debug.linux/jerry $file
''.replace(/^/g, "a");
it is not dead code but this code's output is not correct.
it is expected 'a' but it returned '' I think this is same issue with this.