-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V8 crashing on toLocaleString() #306
Comments
just as I suspected -
EDIT. Nope, |
Decided to reopen... V8 itself handles toLocaleString() correctly: Running:
After compiling V8JS running the following: $v8 = new V8Js;
$expr = 'new Date("10/11/2009").toLocaleString("en-us", { month: "long" });';
echo $v8->executeString($expr, null, V8Js::FLAG_FORCE_ARRAY); results in:
V8 compiles Could this be helpful? https://groups.google.com/forum/embed/#!topic/v8-users/4DOD6z57xfU
https://github.com/phpv8/v8js/blob/php7/v8js_v8.cc#L80 Any idea? Thanks! |
@temuri416 Same issue with the newest build of my Docker image:
|
There was an icudtl.dll in the V8 versions 4.9, 5.1 and 5.4 and probably the versions in between as well. But it was not there anymore in 5.5.372.19 and more recent. https://travis-ci.org/phpv8/v8js/builds/222213690 tells me you are using old versions of V8. You may have a task ahead; make it work in V8 5.5+ on Linux and MacOS |
@Jan-E well yes, on Travis (Linux) I'm still using pretty old versions of V8. #307 actually fixes the bug there, yet Travis doesn't show it (but locally). For V8 5.3+ you need to point V8 to a I'm asking regarding the windows build (https://ci.appveyor.com/project/stesie/v8js/build/1.0.180/job/pnyny5416tqnc9ko in particular), ... there I'm using the 5.8.301.0 build you've once provided. That one has V8 + icu ... yet the zip archive is missing a |
Aha, confused the dat and the dll. Did you try adding the Linux or macOS dat file to my zip? The dat file might be OS-independent... Anyway, I did not save the build tree, so I am recompiling 5.8-lkgr at the moment. V8 5.8.283.31 that is. |
Found it:
It will take quite some time before I've got new builds. It is a lengthy process. However, it is the same as in
which seems to confirm that it is OS-independent. |
https://phpdev.toolsforresearch.com/V8-5.8.283.31-x64.zip x86 is on its way. |
I did the test myself: |
Hi @Jan-E This seems to be the same issue with your build for php7.1.14 |
Oh I got it now... We have to specify the file on the php.ini v8js.icudtl_dat_path = "path/to/icudtl.dat" |
I've got this exact same issue, but specifying the path did not help at all. |
I followed this instruction to build v8: https://github.com/phpv8/v8js/blob/master/README.Linux.md Also had same issue with I copied |
The following expression crashes V8JS:
Results in:
The problem is
toLocaleString()
call.I realize it's not the fault of V8JS... But maybe @stesie has an idea of what's happening? It was fine with 5.5.x versions of V8.
Thanks!
The text was updated successfully, but these errors were encountered: