jerryscript-project / jerryscript

Ultra-lightweight JavaScript engine for the Internet of Things.
https://jerryscript.net
Apache License 2.0
6.87k stars 666 forks source link

RegExp.rightContext differs between Jerryscript and V8 #5123

Open Qbtly opened 6 months ago

Qbtly commented 6 months ago
JerryScript revision

ff9ff8f36c967890b5ebb240d9fa90d6e351aa01

Build platform

Ubuntu 22.04.3

Build steps
python ./tools/build.py --builddir=xxx --clean --debug --compile-flag=-fsanitize=address --compile-flag=-g --strip=off --lto=off --logging=on --line-info=on --error-message=on --stack-limit=20
Test case
var str = "ab";
var pattern = /a/;
str.split(pattern);
print(RegExp.rightContext);
Execution steps
./xxx/bin/jerry poc.js
Output
Jerryscript: undefined
V8: b