-
Notifications
You must be signed in to change notification settings - Fork 30k
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 4.6.85.31 typed array bug #4191
Comments
Did you test this on most recent master branch (which has v8 4.7 now)? |
@mscdex you mean build node with v8 master version(which is 4.9 now)? |
Sorry, I was referring to the node master branch, which currently has v8 4.7. |
@mscdex I don't know how to, I can build node-master version and install but I still need node-gyp(so npm) and I can't build node module using node-gyp please let me know how to |
@mscdex sorry it seems same on 5.1.0 also I need to test more version |
I think this is exactly the ArrayBuffer problem because sometimes it shows or right in some part right result with C++ native program(with same source without v8 code) output using node v8 addon with UInt32Array buffer #1 and again, sometimes works fine |
and v8 conversion code is as below vector<unsigned int> rp = pg.getRetailPrices();
vector<unsigned int> up = pg.getUsedPrices();
Local<ArrayBuffer> rpBuffer = ArrayBuffer::New(isolate, rp.data(), (numOfMonth + 1)*sizeof(unsigned int));
Local<Uint32Array> rpArr = Uint32Array::New(rpBuffer, 0, numOfMonth + 1);
Local<ArrayBuffer> upBuffer = ArrayBuffer::New(isolate, up.data(), (numOfMonth + 1)*sizeof(unsigned int));
Local<Uint32Array> upArr = Uint32Array::New(upBuffer, 0, numOfMonth + 1);
Local<Object> obj = Object::New(isolate);
obj->Set(String::NewFromUtf8(isolate, "retailPrices"), rpArr);
obj->Set(String::NewFromUtf8(isolate, "usedPrices"), upArr);
args.GetReturnValue().Set(obj); [fixed formatting - bnoordhuis] |
How sure are you the bug isn't in your code? To me it looks like the |
Then how can the result be random only in a few elements and how can it be
|
@bnoordhuis and I provided raw reault also and it worked before |
Read up on undefined behavior; the memory backing the |
Yep I understand thx
|
New in node 5.1.1
v8 version update is required for possible fix
https://code.google.com/p/v8/issues/detail?id=4600&can=4&colspec=ID%20Type%20Status%20Priority%20Owner%20Summary%20HW%20OS%20Area%20Stars
It was fine until node 5.0.0, I'm not sure about 5.1.0
The text was updated successfully, but these errors were encountered: