d8.exe crashed when running a script

11 views
Skip to first unread message

qinghai xiao

unread,
Aug 22, 2019, 4:44:58 AM8/22/19
to v8-u...@googlegroups.com
Version: 7.6.303.22
OS: Windows
Architecture: x86

What steps will reproduce the problem?
1.type this script in v8_shell.exe and d8.exe:

String.prototype.split.call('aaaaaaaaaa', new RegExp(Array(4096).join(String.fromCharCode(36, 94)) + Array(1025).join(String.fromCharCode(126, 29)) + Array(257).join(String.fromCharCode(101, 10, 43)), 'i'))

What is the expected output?
When I use Chrome 76.0.3809.80 (v8 version 7.6.303.24), this script output is as follows:
["aaaaaaaaaa"]

What do you see instead?
Then I run these codes to tracking in vs2017:

v8::Local<v8::String> source = v8::String::NewFromUtf8(isolate, "String.prototype.split.call('aaaaaaaaaa', new RegExp(Array(4096).join(String.fromCharCode(36, 94)) + Array(1025).join(String.fromCharCode(126, 29)) + Array(257).join(String.fromCharCode(101, 10, 43)), 'i'))",v8::NewStringType::kNormal).ToLocalChecked();

v8::Local<v8::Script> script =v8::Script::Compile(context, source).ToLocalChecked();

v8::Local<v8::Value> result = script->Run(context).ToLocalChecked();

v8::String::Utf8Value utf8(isolate, result);

printf("%s\n", *utf8);

then I got a stark overflow error.I want to know if this represents a problem in my compilation process.  

Jakob Gruber

unread,
Aug 22, 2019, 4:49:26 AM8/22/19
to v8-u...@googlegroups.com
Sounds like a stack overflow in the regexp compiler while compiling a huge pattern. Feel free to file a bug (please include a backtrace). Also see https://crbug.com/v8/9378.

--
--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups "v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/CAJvF0Q25DHnO7ABOM477nj8WkiACemHfvX%3DpsHqqM0bOiBGbCA%40mail.gmail.com.

Jakob Kummerow

unread,
Aug 22, 2019, 4:55:00 AM8/22/19
to v8-users
Bug has already been filed: https://bugs.chromium.org/p/v8/issues/detail?id=9570 (not sure why it was closed and redirected to v8-users?)

Reply all
Reply to author
Forward
0 new messages