Commit Graph

946 Commits

Author SHA1 Message Date
Joyee Cheung
d4630d9d3e deps: V8: cherry-pick cd10ad7cdbe5
Original commit message:

    [compiler] reset script details in functions deserialized from code cache

    During the serialization of the code cache, V8 would wipe out the
    host-defined options, so after a script id deserialized from the
    code cache, the host-defined options need to be reset on the script
    using what's provided by the embedder when doing the deserializing
    compilation, otherwise the HostImportModuleDynamically callbacks
    can't get the data it needs to implement dynamic import().

    Change-Id: I33cc6a5e43b6469d3527242e083f7ae6d8ed0c6a
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5401780
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Commit-Queue: Joyee Cheung <joyee@igalia.com>
    Cr-Commit-Position: refs/heads/main@{#93323}

Refs: cd10ad7cdb
PR-URL: https://github.com/nodejs/node/pull/52535
Refs: https://github.com/nodejs/node/issues/47472
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/52465
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-04-22 21:25:23 +00:00
Michaël Zasso
0d6ac38b13 deps: V8: revert CL 5331688
On Windows debug builds, it is not allowed to dereference empty
iterators.

Refs: https://chromium-review.googlesource.com/c/v8/v8/+/5331688
PR-URL: https://github.com/nodejs/node/pull/52465
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-04-22 21:25:23 +00:00
StefanStojanovic
4728eb0f02 deps: patch V8 to support compilation with MSVC
After enabling -std:c++20 on Windows, patch is now much smaller.

PR-URL: https://github.com/nodejs/node/pull/52465
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-04-22 21:25:22 +00:00
StefanStojanovic
b338202fab build: compile with C++20 support on Windows
Our Linux build infra is not ready for it yet,
but V8 is making it difficult to compile on Windows
without it.

Refs: https://github.com/nodejs/node/issues/45402
PR-URL: https://github.com/nodejs/node/pull/52465
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-04-22 21:25:22 +00:00
Michaël Zasso
84aeeff06a deps: silence internal V8 deprecation warning
PR-URL: https://github.com/nodejs/node/pull/52293
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/52465
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-04-22 21:25:21 +00:00
Michaël Zasso
c046e0785e deps: patch V8 to avoid duplicated zlib symbol
PR-URL: https://github.com/nodejs/node/pull/49639
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/52465
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-04-22 21:25:20 +00:00
Michaël Zasso
d4a9e7f027 deps: remove usage of a C++20 feature from V8
We are not ready to compile with C++20 support yet.
This is only a DCHECK that can be removed without affecting the behavior
of release builds.

PR-URL: https://github.com/nodejs/node/pull/49639
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/52465
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-04-22 21:25:20 +00:00
Michaël Zasso
601c788e74 deps: avoid compilation error with ASan
Refs: https://bugs.chromium.org/p/v8/issues/detail?id=14221
PR-URL: https://github.com/nodejs/node/pull/49639
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/52465
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-04-22 21:25:19 +00:00
Michaël Zasso
80a42a9eaa deps: disable V8 concurrent sparkplug compilation
It introduces process hangs on some platforms because Node.js doesn't
tear down V8 correctly.
Disable it while we work on a solution.

Refs: https://github.com/nodejs/node/issues/47297
Refs: https://bugs.chromium.org/p/v8/issues/detail?id=13902
PR-URL: https://github.com/nodejs/node/pull/47450
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/52465
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-04-22 21:25:18 +00:00
Michaël Zasso
2397b5cb8c deps: silence irrelevant V8 warning
PR-URL: https://github.com/nodejs/node/pull/45579
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/52465
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-04-22 21:25:18 +00:00
Michaël Zasso
d9c52fe3c2 deps: always define V8_EXPORT_PRIVATE as no-op
dllexport introduces issues when compiling with MSVC.

PR-URL: https://github.com/nodejs/node/pull/47251
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/52465
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-04-22 21:25:17 +00:00
Michaël Zasso
85496704fc build: reset embedder string to "-node.0"
PR-URL: https://github.com/nodejs/node/pull/52465
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-04-22 21:25:16 +00:00
Joyee Cheung
91661ec08b deps: V8: cherry-pick cd10ad7cdbe5
Original commit message:

    [compiler] reset script details in functions deserialized from code cache

    During the serialization of the code cache, V8 would wipe out the
    host-defined options, so after a script id deserialized from the
    code cache, the host-defined options need to be reset on the script
    using what's provided by the embedder when doing the deserializing
    compilation, otherwise the HostImportModuleDynamically callbacks
    can't get the data it needs to implement dynamic import().

    Change-Id: I33cc6a5e43b6469d3527242e083f7ae6d8ed0c6a
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5401780
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Commit-Queue: Joyee Cheung <joyee@igalia.com>
    Cr-Commit-Position: refs/heads/main@{#93323}

Refs: cd10ad7cdb
PR-URL: https://github.com/nodejs/node/pull/52535
Refs: https://github.com/nodejs/node/issues/47472
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/52293
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-04-19 08:39:56 +00:00
Richard Lau
826dda2659 deps: V8: backport c4be0a97f981
Original commit message:

    Fix build with gcc12

    - A number of erroneous flags have been added to BUILD.gn
    - wasm-init-expr.cc is creating an 8 byte buffer witch may be
      much smaller than max size_t output. We also need to make room
      for the `f` character and the terminating null character
    - inspector_protocol currently generates the following error
       ```
       error: loop variable ‘json_in’ of type ‘const std::string&’ {aka
       ‘const std::__cxx11::basic_string<char>&’} binds to a temporary
       constructed from type ‘const char* const’
       ```

    Change-Id: I1139899b2664e47d01ebc44f2e972fc4c0ec212d
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5331756
    Reviewed-by: Matthias Liedtke <mliedtke@chromium.org>
    Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
    Reviewed-by: Toon Verwaest <verwaest@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#92615}

Refs: c4be0a97f9
PR-URL: https://github.com/nodejs/node/pull/52183
Refs: f8d5e576b8
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/52293
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-04-19 08:39:55 +00:00
Michaël Zasso
9930eb4c36 deps: silence internal V8 deprecation warning
PR-URL: https://github.com/nodejs/node/pull/52293
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-04-19 08:39:54 +00:00
Stefan Stojanovic
c72dd1a73b deps: patch V8 to support compilation with MSVC
This patches V8 v12.3 for Windows, by fixing multiple compilation
errors caused by V8 being a Clang-oriented project. There are various
types of errors fixed by this going from changing `using` directives
and renaming to overcoming the differences in which Clang and MSVC see
templates and metaprogramming.

The changes introduced here are strictly meant as a patch only, so they
shouldn't be pushed upstream.

Refs: https://github.com/targos/node/pull/13
Refs: https://github.com/targos/node/pull/14
Refs: https://github.com/targos/node/pull/15
PR-URL: https://github.com/nodejs/node/pull/52293
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-04-19 08:39:54 +00:00
Michaël Zasso
16f1d65102 deps: patch V8 to avoid duplicated zlib symbol
PR-URL: https://github.com/nodejs/node/pull/49639
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/52293
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-04-19 08:39:53 +00:00
Michaël Zasso
314a680daa deps: remove usage of a C++20 feature from V8
We are not ready to compile with C++20 support yet.
This is only a DCHECK that can be removed without affecting the behavior
of release builds.

PR-URL: https://github.com/nodejs/node/pull/49639
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/52293
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-04-19 08:39:52 +00:00
Michaël Zasso
e96542f2c6 deps: avoid compilation error with ASan
Refs: https://bugs.chromium.org/p/v8/issues/detail?id=14221
PR-URL: https://github.com/nodejs/node/pull/49639
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/52293
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-04-19 08:39:52 +00:00
Michaël Zasso
c618b1a960 deps: disable V8 concurrent sparkplug compilation
It introduces process hangs on some platforms because Node.js doesn't
tear down V8 correctly.
Disable it while we work on a solution.

Refs: https://github.com/nodejs/node/issues/47297
Refs: https://bugs.chromium.org/p/v8/issues/detail?id=13902
PR-URL: https://github.com/nodejs/node/pull/47450
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/52293
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-04-19 08:39:51 +00:00
Michaël Zasso
3c228c1810 deps: silence irrelevant V8 warning
PR-URL: https://github.com/nodejs/node/pull/45579
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/52293
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-04-19 08:39:51 +00:00
Michaël Zasso
390ff9fa6e deps: always define V8_EXPORT_PRIVATE as no-op
dllexport introduces issues when compiling with MSVC.

PR-URL: https://github.com/nodejs/node/pull/47251
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/52293
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
2024-04-19 08:39:50 +00:00
Michaël Zasso
1878453eb7 build: reset embedder string to "-node.0"
PR-URL: https://github.com/nodejs/node/pull/52293
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2024-04-19 08:39:49 +00:00
Joyee Cheung
83eb4f2855
deps: V8: cherry-pick cd10ad7cdbe5
Original commit message:

    [compiler] reset script details in functions deserialized from code cache

    During the serialization of the code cache, V8 would wipe out the
    host-defined options, so after a script id deserialized from the
    code cache, the host-defined options need to be reset on the script
    using what's provided by the embedder when doing the deserializing
    compilation, otherwise the HostImportModuleDynamically callbacks
    can't get the data it needs to implement dynamic import().

    Change-Id: I33cc6a5e43b6469d3527242e083f7ae6d8ed0c6a
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5401780
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Commit-Queue: Joyee Cheung <joyee@igalia.com>
    Cr-Commit-Position: refs/heads/main@{#93323}

Refs: cd10ad7cdb
PR-URL: https://github.com/nodejs/node/pull/52535
Refs: https://github.com/nodejs/node/issues/47472
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
2024-04-17 23:39:26 +02:00
Richard Lau
61a0d3b4c4
deps: V8: backport c4be0a97f981
Original commit message:

    Fix build with gcc12

    - A number of erroneous flags have been added to BUILD.gn
    - wasm-init-expr.cc is creating an 8 byte buffer witch may be
      much smaller than max size_t output. We also need to make room
      for the `f` character and the terminating null character
    - inspector_protocol currently generates the following error
       ```
       error: loop variable ‘json_in’ of type ‘const std::string&’ {aka
       ‘const std::__cxx11::basic_string<char>&’} binds to a temporary
       constructed from type ‘const char* const’
       ```

    Change-Id: I1139899b2664e47d01ebc44f2e972fc4c0ec212d
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5331756
    Reviewed-by: Matthias Liedtke <mliedtke@chromium.org>
    Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
    Reviewed-by: Toon Verwaest <verwaest@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#92615}

Refs: c4be0a97f9
PR-URL: https://github.com/nodejs/node/pull/52183
Refs: f8d5e576b8
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/51362
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-03-31 15:37:04 +02:00
Richard Lau
f55380a725
deps: V8: cherry-pick f8d5e576b814
Original commit message:

    Fix build with older versions of GCC.

    This ports the change from bazel on v8:
    https://crrev.com/c/3368869

    Compilation errors started showing after this CL:
    https://crrev.com/c/5199515

    Change-Id: I8c161a0d9ad5c04d452c444ef4feafae2ef4f6db
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5280535
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
    Cr-Commit-Position: refs/heads/main@{#92252}

Refs: f8d5e576b8
PR-URL: https://github.com/nodejs/node/pull/52183
Refs: c4be0a97f9
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/51362
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-03-31 15:37:03 +02:00
StefanStojanovic
b9d806a2dd
deps: patch V8 to support compilation with MSVC
This patches V8 v12.2 for Windows, by fixing multiple compilation
errors caused by V8 being a Clang-oriented project. There are various
types of errors fixed by this going from changing `using` directives
and renaming to overcoming the differences in which Clang and MSVC see
templates and metaprogramming.

The changes introduced here are strictly meant as a patch only, so they
shouldn't be pushed upstream.

Refs: https://github.com/targos/node/pull/13
Refs: https://github.com/targos/node/pull/14
PR-URL: https://github.com/nodejs/node/pull/51362
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-03-31 15:36:55 +02:00
Michaël Zasso
63b58bc17b
deps: patch V8 to avoid duplicated zlib symbol
PR-URL: https://github.com/nodejs/node/pull/49639
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/51362
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-03-31 15:36:46 +02:00
Michaël Zasso
86056353c4
deps: remove usage of a C++20 feature from V8
We are not ready to compile with C++20 support yet.
This is only a DCHECK that can be removed without affecting the behavior
of release builds.

PR-URL: https://github.com/nodejs/node/pull/49639
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/51362
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-03-31 15:36:39 +02:00
Michaël Zasso
2e0efc1c8d
deps: avoid compilation error with ASan
Refs: https://bugs.chromium.org/p/v8/issues/detail?id=14221
PR-URL: https://github.com/nodejs/node/pull/49639
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/51362
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2024-03-31 15:36:37 +02:00
Michaël Zasso
59e6f62e34
deps: disable V8 concurrent sparkplug compilation
It introduces process hangs on some platforms because Node.js doesn't
tear down V8 correctly.
Disable it while we work on a solution.

Refs: https://github.com/nodejs/node/issues/47297
Refs: https://bugs.chromium.org/p/v8/issues/detail?id=13902
PR-URL: https://github.com/nodejs/node/pull/47450
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/51362
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-03-31 15:36:34 +02:00
Michaël Zasso
0423f7e27e
deps: silence irrelevant V8 warning
PR-URL: https://github.com/nodejs/node/pull/45579
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/51362
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-03-31 15:36:30 +02:00
Michaël Zasso
f36620806d
deps: always define V8_EXPORT_PRIVATE as no-op
dllexport introduces issues when compiling with MSVC.

PR-URL: https://github.com/nodejs/node/pull/47251
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/51362
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2024-03-31 15:36:26 +02:00
Michaël Zasso
94f0369d1d
build: reset embedder string to "-node.0"
PR-URL: https://github.com/nodejs/node/pull/51362
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2024-03-31 15:36:10 +02:00
Richard Lau
f6996ee150 deps: V8: backport c4be0a97f981
Original commit message:

    Fix build with gcc12

    - A number of erroneous flags have been added to BUILD.gn
    - wasm-init-expr.cc is creating an 8 byte buffer witch may be
      much smaller than max size_t output. We also need to make room
      for the `f` character and the terminating null character
    - inspector_protocol currently generates the following error
       ```
       error: loop variable ‘json_in’ of type ‘const std::string&’ {aka
       ‘const std::__cxx11::basic_string<char>&’} binds to a temporary
       constructed from type ‘const char* const’
       ```

    Change-Id: I1139899b2664e47d01ebc44f2e972fc4c0ec212d
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5331756
    Reviewed-by: Matthias Liedtke <mliedtke@chromium.org>
    Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
    Reviewed-by: Toon Verwaest <verwaest@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#92615}

Refs: c4be0a97f9
PR-URL: https://github.com/nodejs/node/pull/52183
Refs: f8d5e576b8
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-03-23 19:49:42 +00:00
Richard Lau
0d4bc4c40e deps: V8: cherry-pick f8d5e576b814
Original commit message:

    Fix build with older versions of GCC.

    This ports the change from bazel on v8:
    https://crrev.com/c/3368869

    Compilation errors started showing after this CL:
    https://crrev.com/c/5199515

    Change-Id: I8c161a0d9ad5c04d452c444ef4feafae2ef4f6db
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5280535
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
    Cr-Commit-Position: refs/heads/main@{#92252}

Refs: f8d5e576b8
PR-URL: https://github.com/nodejs/node/pull/52183
Refs: c4be0a97f9
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-03-23 19:49:41 +00:00
Rafael Gonzaga
ba06c5c509
build,tools: add test-ubsan ci
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
Co-Authored-By: Santiago Gimeno <santiago.gimeno@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/46297
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
2024-03-15 17:49:51 +00:00
Joyee Cheung
a3e0834ee4
deps: V8: cherry-pick efb1133eb894
Original commit message:

    [api] Add v8::ScriptCompiler::CachedData::CompatibilityCheck()

    This patch adds a new API v8::ScriptCompiler::CachedData::CompatibilityCheck()
    in order to allow embedders to check if the code cache can be used in
    the current isolate without looking up for the source code. It also returns more detailed reasons about why the code cache cannot be used
    when it's bound to be rejected. This makes it possible to enforce
    portability checks in case code code becomes CPU-dependent in the
    future.

    Refs: https://github.com/nodejs/node/issues/42566#issuecomment-1735862123

    Change-Id: Ia1d677b949050add961af6fbf62c44342c061312
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4905290
    Reviewed-by: Marja Hölttä <marja@chromium.org>
    Reviewed-by: Toon Verwaest <verwaest@chromium.org>
    Commit-Queue: Joyee Cheung <joyee@igalia.com>
    Cr-Commit-Position: refs/heads/main@{#90833}

Refs: efb1133eb8
PR-URL: https://github.com/nodejs/node/pull/51551
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2024-02-01 11:53:59 +00:00
Keyhan Vakil
0da3beebfc
deps: V8: cherry-pick de611e69ad51
Original commit message:

    [maglev] fix non-ptr-compr compilation on old compilers

    When pointer compression is disabled, the preprocessor expands some
    static asserts to static_assert(false), which doesn't compile on
    compilers not implementing the C++ defect report CWG2518, notably clang
    before version 17 and gcc before version 13.

    Adding in part of the template parameter to the static assert prevents
    it from being evaluated immediately which fixes the compilation.

    Test: compiled with gcc-11 and clang-14 without pointer compression.
    Change-Id: I95ce29bdb1278e6dad9e592d6f9476395f8aeb59
    Fixed: v8:14355
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5022760
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Commit-Queue: Leszek Swirski <leszeks@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#91553}

Refs: de611e69ad
PR-URL: https://github.com/nodejs/node/pull/51200
Refs: https://github.com/nodejs/node/issues/50690
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/50115
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-01-04 09:31:51 +01:00
Joyee Cheung
b982335637
deps: V8: cherry-pick 0fd478bcdabd
Original commit message:

    [heap-profiler]: expose QueryObjects() to v8::HeapProfiler

    This allows embedders to use this API for testing memory leaks more
    reliably. See https://github.com/nodejs/node/pull/50572 for an
    example about how the API can be used.

    Change-Id: Ic3d1268e2b331c37e8ec92997b764b9b5486f8c2
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5006373
    Reviewed-by: Camillo Bruni <cbruni@chromium.org>
    Reviewed-by: Simon Zünd <szuend@chromium.org>
    Commit-Queue: Joyee Cheung <joyee@igalia.com>
    Cr-Commit-Position: refs/heads/main@{#91123}

Refs: 0fd478bcda
PR-URL: https://github.com/nodejs/node/pull/50572
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
PR-URL: https://github.com/nodejs/node/pull/50115
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-01-04 09:31:46 +01:00
Chengzhong Wu
481a90116c
deps: V8: cherry-pick 0f9ebbc672c7
Original commit message:

    [flags] Remove --harmony-string-is-well-formed

    The String.prototype.isWellFormed and toWellFormed have shipped
    since M111.

    Bug: v8:13557
    Change-Id: I27e332d2fde0f9ea8ad649c016a84d2d3e0bf592
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4931269
    Reviewed-by: Shu-yu Guo <syg@chromium.org>
    Commit-Queue: Chengzhong Wu (legendecas) <legendecas@gmail.com>
    Cr-Commit-Position: refs/heads/main@{#90398}

Refs: 0f9ebbc672
PR-URL: https://github.com/nodejs/node/pull/50867
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
PR-URL: https://github.com/nodejs/node/pull/50115
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-01-04 09:31:45 +01:00
Lu Yahan
782addbdc3
deps: V8: cherry-pick 8f0b94671ddb
Original commit message:

    [gcc] Add include for TurboShaft

    Include <limits> for std::numeric_limits.

    Bug: chromium:819294
    Change-Id: I26a71ed4bad1858d2f5ed5d7dcd529e9cae60f37
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4889285
    Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
    Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#90347}

Refs: 8f0b94671d
PR-URL: https://github.com/nodejs/node/pull/50654
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/50115
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-01-04 09:31:42 +01:00
Luke Albao
b682e7f540
deps: V8: cherry-pick f7d000a7ae7b
Original commit message:

    [logging] Bugfix: LinuxPerfBasicLogger should log JS functions

    This patch fixes a typo that was introduced in commit
    c51041f45400928cd64fbc8f389c0dd0dd15f82f /
    https://chromium-review.googlesource.com/c/v8/v8/+/2336793, which reversed the behavior of the perf_basic_prof_only_functions flag.

    This also refactors the equivalent guard in LinuxPerfJitLogger to use the same inline CodeKind API for identifying JS Functions. This is unrelated to the bug, but it seems a fair rider to add on here.

    Bug: v8:14387
    Change-Id: I25766b0d45f4c65dfec5ae01e094a1ed94111054
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4954225
    Reviewed-by: Camillo Bruni <cbruni@chromium.org>
    Commit-Queue: Camillo Bruni <cbruni@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#90501}

Refs: f7d000a7ae
PR-URL: https://github.com/nodejs/node/pull/50302
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/50115
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-01-04 09:31:40 +01:00
Joyee Cheung
a60090c52f
deps: V8: cherry-pick 25902244ad1a
Original commit message:

    [api] add line breaks to the output of Message::PrintCurrentStackTrace

    Previously this prints the stack trace without line breaks and it
    can be difficult to read. This also affects
    --abort-on-uncaught-exception. This patch adds line breaks to the
    output to improve readability.

    Change-Id: I4c44b529f8c829329f784b0859b1d13c9ec56838
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4925009
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Commit-Queue: Joyee Cheung <joyee@igalia.com>
    Cr-Commit-Position: refs/heads/main@{#90360}

Refs: 25902244ad
PR-URL: https://github.com/nodejs/node/pull/50156
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/50115
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-01-04 09:31:35 +01:00
Michaël Zasso
8441d1fc18
deps: patch V8 to avoid duplicated zlib symbol
PR-URL: https://github.com/nodejs/node/pull/49639
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/50115
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-01-04 09:31:29 +01:00
Michaël Zasso
e8e9bbd7a9
deps: remove usage of a C++20 feature from V8
We are not ready to compile with C++20 support yet.
This is only a DCHECK that can be removed without affecting the behavior
of release builds.

PR-URL: https://github.com/nodejs/node/pull/49639
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/50115
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-01-04 09:31:25 +01:00
Michaël Zasso
785d5cd006
deps: avoid compilation error with ASan
Refs: https://bugs.chromium.org/p/v8/issues/detail?id=14221
PR-URL: https://github.com/nodejs/node/pull/49639
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/50115
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-01-04 09:31:21 +01:00
Michaël Zasso
7071c1dafd
deps: disable V8 concurrent sparkplug compilation
It introduces process hangs on some platforms because Node.js doesn't
tear down V8 correctly.
Disable it while we work on a solution.

Refs: https://github.com/nodejs/node/issues/47297
Refs: https://bugs.chromium.org/p/v8/issues/detail?id=13902
PR-URL: https://github.com/nodejs/node/pull/47450
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/49639
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/50115
2024-01-04 09:31:17 +01:00
Michaël Zasso
d1d60b297d
deps: silence irrelevant V8 warning
PR-URL: https://github.com/nodejs/node/pull/45579
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/47251
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/49639
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/50115
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-01-04 09:31:05 +01:00
Michaël Zasso
5b240c62f9
deps: always define V8_EXPORT_PRIVATE as no-op
dllexport introduces issues when compiling with MSVC.

PR-URL: https://github.com/nodejs/node/pull/47251
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/49639
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/50115
Reviewed-By: Michael Dawson <midawson@redhat.com>
2024-01-04 09:30:58 +01:00