Skip to content
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

deps: update V8 to 6.7 #19989

Closed
wants to merge 15 commits into from
Closed

deps: update V8 to 6.7 #19989

wants to merge 15 commits into from

Conversation

targos
Copy link
Member

@targos targos commented Apr 12, 2018

ETA: May 29th.

There are still 2 known issues to fix (help would be appreciated):

/cc @nodejs/v8-update

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@targos targos added semver-major PRs that contain breaking changes and should be released in the next major version. v8 engine Issues and PRs related to the V8 dependency. labels Apr 12, 2018
@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. v8 engine Issues and PRs related to the V8 dependency. labels Apr 12, 2018
@targos targos removed the build Issues and PRs related to build files or the CI. label Apr 12, 2018
@devsnek
Copy link
Member

devsnek commented Apr 17, 2018

@nodejs/v8 do you guys know if there are any plans to expose the value of a bigint assuming it fits in an int64 or similar?

@jakobkummerow
Copy link
Contributor

@devsnek : No plans currently, but we're open to suggestions if there is demand for such an API :-)

@devsnek
Copy link
Member

devsnek commented Apr 17, 2018

@jakobkummerow i was just looking at integrating bigint into our napi after we bump to 6.7 (https://gist.github.com/devsnek/34c3243a650ef5f4419a16961bca5cd8) and it seems like a bit of an inconsistency to not have some sort of method to see what the value of a bigint is. (https://gist.github.com/devsnek/34c3243a650ef5f4419a16961bca5cd8#file-napi_bigint-diff-L145) i'm probably not the best person to come up with a solution to that problem as i'm no c++ guru, but i personally do have a use case for passing 64bit integers between c++ and js.

@jakobkummerow
Copy link
Contributor

@devsnek : it's an intentional omission/postponing -- we didn't want to introduce some random API that we didn't have a use case for. I absolutely agree that for working with BigInts via the C++ API, more methods are needed, and I'd be happy to collaborate on a reasonable design for V8 6.8. We should probably take that discussion elsewhere though.

@targos
Copy link
Member Author

targos commented Apr 19, 2018

@ofrobots
Copy link
Contributor

What's going on with 731b4adf42fb65c53c1964037fb6f227b269b9b4 ? It seems bigger than the commit it is reverting anyway.

@targos
Copy link
Member Author

targos commented Apr 23, 2018

@ofrobots 731b4ad is an exact revert of f02b74d.
0e99791 replaces it.

@targos
Copy link
Member Author

targos commented May 1, 2018

@jakobkummerow
Copy link
Contributor

Re earlier discussion: anyone who has opinions on what V8's BigInt API should look like, please chime in at crbug.com/v8/7712.

@targos
Copy link
Member Author

targos commented May 3, 2018

/cc @nodejs/platform-freebsd @nodejs/platform-macos

We have a compiler issue with clang. Can someone please have a look?

FreeBSD error:

64/out/Release/obj.target/v8_base/deps/v8/src/inspector/wasm-translation.o ../deps/v8/src/inspector/wasm-translation.cc
08:08:42 ../deps/v8/src/inspector/wasm-translation.cc:91:40: error: default initialization of an object of const type 'const v8_inspector::WasmSourceInformation' requires a user-provided default constructor
08:08:42     static const WasmSourceInformation singleEmptySourceInformation;
08:08:42                                        ^
08:08:42 1 error generated.
08:08:42 deps/v8/gypfiles/v8_base.target.mk:625: recipe for target '/usr/home/iojs/build/workspace/node-test-commit-freebsd/nodes/freebsd10-64/out/Release/obj.target/v8_base/deps/v8/src/inspector/wasm-translation.o' failed
08:08:42 gmake[2]: *** [/usr/home/iojs/build/workspace/node-test-commit-freebsd/nodes/freebsd10-64/out/Release/obj.target/v8_base/deps/v8/src/inspector/wasm-translation.o] Error 1

macOS error:

../deps/v8/src/inspector/wasm-translation.cc:91:40: error: default initialization of an object of const type 'const v8_inspector::WasmSourceInformation' without a user-provided default constructor
    static const WasmSourceInformation singleEmptySourceInformation;
                                       ^
../deps/v8/src/inspector/wasm-translation.cc:91:68: note: add an explicit initializer to initialize 'singleEmptySourceInformation'
    static const WasmSourceInformation singleEmptySourceInformation;
                                                                   ^
                                                                   {}
1 error generated.
make[2]: *** [/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx1010/out/Release/obj.target/v8_base/deps/v8/src/inspector/wasm-translation.o] Error 1

@targos
Copy link
Member Author

targos commented May 8, 2018

ping

@mmarchini
Copy link
Contributor

@targos those errors are likely related to an older version of clang being used in our OSX/FreeBSD servers. I was able to build without problem on my machine (Mac OS 10.13.4). Therefore we need to either:

  • Update our clang to a version which won't complain about this struct not having a user-provided constructor
  • Float a patch on V8 to make this struct compatible with older versions of clang
  • Maybe there's a flag to disable this check on clang, but I couldn't find it :(

I'll try to reproduce this issue in a FreeBSD box and figure out which clang version fixes this issue.

/cc @nodejs/v8 @nodejs/build

@mmarchini
Copy link
Contributor

mmarchini commented May 8, 2018

FWIW I was able to reproduce this error on Ubuntu 16.04 with clang 3.8.

Also a reference to why I think this is a clang version issue: https://stackoverflow.com/a/28338265/2956796

@mmarchini
Copy link
Contributor

Upstream bug: https://bugs.chromium.org/p/v8/issues/detail?id=7743

I'll try to open a CL fixing it by the end of the day

@mmarchini
Copy link
Contributor

@mmarchini
Copy link
Contributor

Fix landed upstream. Should we try to backport it to 6.7 or should we float it?

@targos
Copy link
Member Author

targos commented May 13, 2018

Thanks for your help @mmarchini !
It would be nice to get it backported to 6.7. A merge request has been made in https://bugs.chromium.org/p/v8/issues/detail?id=7743

@targos
Copy link
Member Author

targos commented May 13, 2018

@jasnell, @cjihrig I just read your comments in #20662 about semver-ness of adding new globals.

This version of V8 adds 3 of them: BigInt, BigInt64Array, BigUint64Array. Are we going to have to disable the BigInt feature to be able to land V8 6.7 on Node 10?

@devsnek
Copy link
Member

devsnek commented May 13, 2018

I would say no due to the relative non-existence of them in code, and anyone who is using those globals is running with harmony since you can't really polyfill bigint. I would personally consider this extenuating circumstances but I understand if it would be semver-major anyway.

@addaleax
Copy link
Member

+1 to not considering the BigInt global addition semver-major.

v8::HeapProfiler::SetWrapperClassInfoProvider is deprecated

I think I can do that, or guide somebody else do address this. What’s the time frame? Does it have to happen before the ETA date (May 29)? It looks like for now it’s just a deprecation.

An issue with this might be the interaction with addons. I’m not aware of addons using the old API, but I wouldn’t be surprised if there are. The new API seems to assume a monolithic embedder (like Chromium), but in Node’s case we cannot provide information about objects created by userland addons. I’ll try to figure out what we can do here.

(@ChALkeR I know Gzemnid is JS-focused, but would it be possible to see if SetWrapperClassInfoProvider is something that addons use?)

watson added a commit to watson/apm-agent-nodejs that referenced this pull request Jul 17, 2018
The bug in V8 that meant we couldn't instrument Node 10 was fixed and
Node 10.4.0 shipped with a newer version of V8.

This is the original bug report in Node:
nodejs/node#20516

This is the PR that fixed it in Node:
nodejs/node#19989
watson added a commit to watson/apm-agent-nodejs that referenced this pull request Jul 17, 2018
The bug in V8 that meant we couldn't instrument Node 10 was fixed and
Node 10.4.0 shipped with a newer version of V8.

This is the original bug report in Node:
nodejs/node#20516

This is the PR that fixed it in Node:
nodejs/node#19989

Closes elastic#448
hferreiro pushed a commit to brave/node that referenced this pull request Jul 18, 2018
Refs: nodejs/node-v8#46

PR-URL: nodejs/node#19989
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matheus Marchini <matheus@sthima.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
(cherry picked from commit fbe6b85)
watson added a commit to elastic/apm-agent-nodejs that referenced this pull request Jul 18, 2018
The bug in V8 that meant we couldn't instrument Node 10 was fixed and
Node 10.4.0 shipped with a newer version of V8.

This is the original bug report in Node:
nodejs/node#20516

This is the PR that fixed it in Node:
nodejs/node#19989

Closes #448
mcollina pushed a commit that referenced this pull request Aug 23, 2018
The actual bug was fixed by a V8 update in Node v10.4.0.

See: #19989
PR-URL: #22374
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Aug 24, 2018
The actual bug was fixed by a V8 update in Node v10.4.0.

See: #19989
PR-URL: #22374
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Sep 3, 2018
The actual bug was fixed by a V8 update in Node v10.4.0.

See: #19989
PR-URL: #22374
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
aduh95 pushed a commit that referenced this pull request Oct 22, 2024
Refs: #19989
Fixes: #55446
PR-URL: #55450
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
aduh95 pushed a commit that referenced this pull request Oct 23, 2024
Refs: #19989
Fixes: #55446
PR-URL: #55450
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
louwers pushed a commit to louwers/node that referenced this pull request Nov 2, 2024
Refs: nodejs#19989
Fixes: nodejs#55446
PR-URL: nodejs#55450
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-minor PRs that contain new features and should be released in the next minor version. v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

Successfully merging this pull request may close these issues.