Original commit message:
[gcc] Fix gcc / bazel build
Add <iomanip> includes to fix gcc/blaze builds. Also ignore a dangling
pointer warning introduced in newer gcc, since it has false positives
on some uses of scope classes.
Change-Id: Ib86a2437ffc34b5497a5b8619013d6d5b4ea30fe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5380192
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#92977}
Refs: 500de8bd37
PR-URL: https://github.com/nodejs/node/pull/52676
Fixes: https://github.com/nodejs/node/issues/52675
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
PR-URL: https://github.com/nodejs/node/pull/52616
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
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>
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>
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>
PR-URL: https://github.com/nodejs/node/pull/52517
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/52573
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
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>
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>
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>
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>
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>
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>
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>
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>
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/52516
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/52395
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs/node/pull/52473
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/52458
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
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>
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>
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>
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>
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>
PR-URL: https://github.com/nodejs/node/pull/52227
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
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/52123
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Should use `current_cpu` instead of `target_cpu` in GN build files,
otherwise the host build may use wrong configs when doing cross
compilation.
PR-URL: https://github.com/nodejs/node/pull/51903
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/51948
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs/node/pull/51796
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs/node/pull/51810
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Within Node.js, attempt to determine if libuv is using io_uring. If it
is, disable process.setuid() and other user identity setters.
We cannot fully prevent users from changing the process's user identity,
but this should still prevent some accidental, dangerous scenarios.
PR-URL: https://github.com/nodejs-private/node-private/pull/528
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
CVE-ID: CVE-2024-22017
setuid() does not affect libuv's internal io_uring operations if
initialized before the call to setuid(). This potentially allows the
process to perform privileged operations despite presumably having
dropped such privileges through a call to setuid(). Similar concerns
apply to other functions that modify the process's user identity.
This commit changes libuv's io_uring behavior from opt-out (through
UV_USE_IO_URING=0) to opt-in (through UV_USE_IO_URING=1) until we figure
out a better long-term solution.
PR-URL: https://github.com/nodejs-private/node-private/pull/528
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
CVE-ID: CVE-2024-22017
PR-URL: https://github.com/nodejs/node/pull/51582
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs/node/pull/51630
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/51580
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/51614
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/51614
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
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>
PR-URL: https://github.com/nodejs/node/pull/51584
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/51461
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This should get rid of the following GCC warning:
ISO C90 does not support ‘long long’ [-Wlong-long]
PR-URL: https://github.com/nodejs/node/pull/51410
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/51385
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
- update uvwasi to 0.0.20
- adjust tests to reflect udpated behaviour from
https://github.com/nodejs/uvwasi/pull/224 included
in uvwasi 0.0.20
Signed-off-by: Michael Dawson <midawson@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/51355
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/51400
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/51278
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/51313
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
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>
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>
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>
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>
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>
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>
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>
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>
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/51024
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Original commit message:
aix: disable ipv6 link local (#4229)
AIX does not implement ifaddrs and when retrieving the network
interfaces with uv_interface_addresses there was a test failure in
tcp_connect6_link_local.
For now disable ipv6 link local on aix to:
1) fix broken aix build
2) stop blocking libuv upgrade in node
Refs: https://github.com/libuv/libuv/pull/4222#issuecomment-1812962233
Refs: https://github.com/nodejs/node/pull/50650
Refs: bfbe4e38d7
PR-URL: https://github.com/nodejs/node/pull/50650
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
deps: update libuv to 1.47.0
PR-URL: https://github.com/nodejs/node/pull/50650
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/50915
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/50815
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/50813
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/50806
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Original commit message:
[ptr-compr] Fix multi-cage mode
This CL introduces PtrComprCageAccessScope which sets/restores current
thread's pointer compression cage base values. It's supposed to be used
by V8 jobs accessing V8 heap outside of v8::Isolate::Scope or
i::LocalHeap or i::LocalIsolate scopes (they already ensure that the
cage base values are properly initialized).
For all other build modes PtrComprCageAccessScope is a no-op.
For simplicity reasons the multi-cage mode is made incompatible with
external code space.
Bug: v8:13788, v8:14292
Change-Id: I06c2d19a1eb7254fa7af07a17617e22d98abea9f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4846592
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#90075}
Refs: 475c8cdf9a
PR-URL: https://github.com/nodejs/node/pull/50680
Refs: https://bugs.chromium.org/p/v8/issues/detail?id=14292
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/50322
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
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/50531
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/50441
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/50456
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/50463
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/50411
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/50411
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
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>
Co-authored-by: Richard Lau <rlau@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/50082
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
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>
Original commit message:
fix: EmbeddedTargetOs on IBM i with Python 3.9
For some context, Python 3.9 on IBM i returns "os400" for sys.platform
instead of "aix". We used to build with Python 3.6 which returned "aix"
as the platform
When attempting to build Node.js with python 3.9 on IBM i we run into a
build error.
Ref: https://github.com/nodejs/node/pull/48056
Ref: https://github.com/nodejs/node/pull/48056#issuecomment-1553719508
I'm not quite sure where target_os is being passed down to the function ToEmbeddedTargetOs.
It seems as though target_os is being generated from sys.platform or
similar call from python as we started running into this issue after
building with Python 3.9.
This PR supersedes initial changes proposed in:
https://chromium-review.googlesource.com/c/v8/v8/+/4259330
This PR contains the minimal changes to successfully build Node.js (builds v8 as an internal dep)
on IBM i with Python 3.9.
Change-Id: I32d43197bce994a72a0d85091e91f80eeea4482d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4846413
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#89981}
Refs: 8ec2651fbd
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>
Original commit message:
Ignore flags implied by --predictable during hash computation
https://chromium-review.googlesource.com/c/v8/v8/+/4681766 added
code to ignore --predictable during hash computation of flags
in order to produce reproducible code cache. This turns out to
be not enough since the flags implied by --predictable also
need to be ignored for it to work. This patch makes sure that
they are ignored.
Change-Id: Ifa36641efe3ca105706fd293be46fc974055d2d4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4851287
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#90022}
Refs: de9a5de227
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>
Original commit message:
Fix for no member named 'init_jmpbuf' on AIX
In AIX, the system header file usr/include/sys/context.h file has jmpbuf redefined as __jmpbuf which is creating the problem here.
Change-Id: I4393e260092016315ac7559465684e3fdbba4900
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4868434
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#90087}
Refs: b5b5d6c31b
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>
Original commit message:
Reland "[api] allow v8::Data as internal field"
This is a reland of commit 0aa622e12893e9921c01a34ce9507b544e599c4a
The original patch tried to run a test that calls exit() in the
fatal error handler in parallel, which would not work. This marked
the test with TEST() to avoid running it in parallel.
Original change's description:
> [api] allow v8::Data as internal field
>
> Previously only v8::Value can be stored as internal fields.
> In some cases, however, it's necessary for the embedder to
> tie the lifetime of a v8::Data with the lifetime of a
> JS object, and that v8::Data may not be a v8::Value, as
> it can be something returned from the V8 API. One way to
> keep the v8::Data alive may be to use a v8::Persistent<v8::Data>
> but that can easily lead to leaks.
>
> This patch changes v8::Object::GetInternalField() and
> v8::Object::SetInernalField() to accept v8::Data instead of just
> v8::Value, so that v8::Data can kept alive by a JS object in
> a way that the GC can be aware of to address this problem.
> This is a breaking change for embedders
> using v8::Object::GetInternalField() as it changes the return
> type. Since most v8::Value subtypes only support direct casts
> from v8::Value but not v8::Data, calls like
>
> object->GetInternalField(index).As<v8::External>()
>
> needs to be updated to cast the value to v8::Value first:
>
> object->GetInternalField(index).As<v8::Value>().As<v8::External>()
>
> Bug: v8:14120
> Change-Id: I731c958d1756b9d5ee4a3e78813416cd60d1b7ca
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4707972
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Joyee Cheung <joyee@igalia.com>
> Cr-Commit-Position: refs/heads/main@{#89718}
Bug: v8:14120
Change-Id: I3e45d09b5c300d5eefc73e380ef21ac2bd61760c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4834471
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#89824}
Refs: 93b1a74cbc
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>
Original commit message:
Fix build issue, remove unneeded include uchar.h.
Follow the conversation on:
https://groups.google.com/g/v8-dev/c/nsbshwlmP3c.
The `uchar.h` include is not necessary.
It was added to get the definition of char16_t but that's an intrinsic
type in C++.
Change-Id: I0aaa11dba0be3ccad15b9e421f8bae71450d443b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4823404
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Eric Leese <leese@chromium.org>
Reviewed-by: Eric Leese <leese@chromium.org>
Cr-Commit-Position: refs/heads/main@{#89787}
Refs: 1a3ecc2483
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/49639
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
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>
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>
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/49639
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This reverts commit 2070ad27a5fc674909f4bbd34e7d862c625fc54b.
deps: fix call to undeclared functions 'ntohl' and 'htons'
PR-URL: https://github.com/nodejs/node/pull/49979
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Richard Lau <rlau@redhat.com>
Original commit message:
fix: EmbeddedTargetOs on IBM i with Python 3.9
For some context, Python 3.9 on IBM i returns "os400" for sys.platform
instead of "aix". We used to build with Python 3.6 which returned "aix"
as the platform
When attempting to build Node.js with python 3.9 on IBM i we run into a
build error.
Ref: https://github.com/nodejs/node/pull/48056
Ref: https://github.com/nodejs/node/pull/48056#issuecomment-1553719508
I'm not quite sure where target_os is being passed down to the function ToEmbeddedTargetOs.
It seems as though target_os is being generated from sys.platform or
similar call from python as we started running into this issue after
building with Python 3.9.
This PR supersedes initial changes proposed in:
https://chromium-review.googlesource.com/c/v8/v8/+/4259330
This PR contains the minimal changes to successfully build Node.js (builds v8 as an internal dep)
on IBM i with Python 3.9.
Change-Id: I32d43197bce994a72a0d85091e91f80eeea4482d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4846413
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#89981}
Refs: 8ec2651fbd
PR-URL: https://github.com/nodejs/node/pull/49862
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Original commit message:
Ignore flags implied by --predictable during hash computation
https://chromium-review.googlesource.com/c/v8/v8/+/4681766 added
code to ignore --predictable during hash computation of flags
in order to produce reproducible code cache. This turns out to
be not enough since the flags implied by --predictable also
need to be ignored for it to work. This patch makes sure that
they are ignored.
Change-Id: Ifa36641efe3ca105706fd293be46fc974055d2d4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4851287
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#90022}
Refs: de9a5de227
PR-URL: https://github.com/nodejs/node/pull/49703
Refs: b33bf2dfd2
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
The file was removed in the latest libuv upgrade. Remove it from the
build recipe as well.
Fixes: https://github.com/nodejs/node/issues/49739
PR-URL: https://github.com/nodejs/node/pull/49744
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/48981
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Original commit message:
[api] mark v8::Script and v8::UnboundScript as v8::Data
v8::UnboundModuleScript and v8::Module are already v8::Data.
Mark v8::Script and v8::UnboundScript as v8::Data so that they
can be used in other V8 APIs that takes v8::Data.
Refs: https://github.com/nodejs/node/pull/48510
Bug: v8:14120
Change-Id: I2dd5648528c1b0030292872441758d4fb2cfcc1c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4827307
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Cr-Commit-Position: refs/heads/main@{#89727}
Refs: b60a03df4c
PR-URL: https://github.com/nodejs/node/pull/49491
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Nitzan Uziely <linkgoron@gmail.com>
Original commit message:
Reland "[api] allow v8::Data as internal field"
This is a reland of commit 0aa622e12893e9921c01a34ce9507b544e599c4a
The original patch tried to run a test that calls exit() in the
fatal error handler in parallel, which would not work. This marked
the test with TEST() to avoid running it in parallel.
Original change's description:
> [api] allow v8::Data as internal field
>
> Previously only v8::Value can be stored as internal fields.
> In some cases, however, it's necessary for the embedder to
> tie the lifetime of a v8::Data with the lifetime of a
> JS object, and that v8::Data may not be a v8::Value, as
> it can be something returned from the V8 API. One way to
> keep the v8::Data alive may be to use a v8::Persistent<v8::Data>
> but that can easily lead to leaks.
>
> This patch changes v8::Object::GetInternalField() and
> v8::Object::SetInernalField() to accept v8::Data instead of just
> v8::Value, so that v8::Data can kept alive by a JS object in
> a way that the GC can be aware of to address this problem.
> This is a breaking change for embedders
> using v8::Object::GetInternalField() as it changes the return
> type. Since most v8::Value subtypes only support direct casts
> from v8::Value but not v8::Data, calls like
>
> object->GetInternalField(index).As<v8::External>()
>
> needs to be updated to cast the value to v8::Value first:
>
> object->GetInternalField(index).As<v8::Value>().As<v8::External>()
>
> Bug: v8:14120
> Change-Id: I731c958d1756b9d5ee4a3e78813416cd60d1b7ca
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4707972
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Joyee Cheung <joyee@igalia.com>
> Cr-Commit-Position: refs/heads/main@{#89718}
Bug: v8:14120
Change-Id: I3e45d09b5c300d5eefc73e380ef21ac2bd61760c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4834471
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#89824}
Refs: 93b1a74cbc
PR-URL: https://github.com/nodejs/node/pull/49419
Refs: 0aa622e128
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Original commit message:
Fix usage of MulHighS64 on <= z13
mgrk is only available with MISC_INSTR_EXT2 installed.
A runtime call needs to be made if it's unavailable.
We also need to make sure caller saved registers are saved
accordingly before making a call.
Change-Id: If7ac06eef57cc3db059c2640b77c80de3b16fced
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4521297
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#87675}
Fixes: https://github.com/nodejs/node/issues/47064
PR-URL: https://github.com/nodejs/node/pull/49401
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/49034
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/49033
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/48838
Reviewed-By: Luke Karrys <luke@lukekarrys.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Original commit message:
[cppgc] expose wrapper descriptor on CppHeap
This makes it possible for embedders to:
1. Avoid creating wrapper objects that happen to have a layout that
leads V8 to consider the object cppgc-managed while it's not.
Refs: https://github.com/nodejs/node/pull/43521
2. Create cppgc-managed wrapper objects when they do not own the
CppHeap. Refs: https://github.com/nodejs/node/pull/45704
Bug: v8:13960
Change-Id: If31f4d56c5ead59dc0d56f937494d23d631f7438
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4598833
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#88490}
Refs: 9327503128
PR-URL: https://github.com/nodejs/node/pull/48660
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/48788
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Original commit message:
Fix mistake in the skip branch of test/mjsunit/regress-1320641.js
It was doing a `string.test(regex)` which was wrong. It's supposed
to be `regex.test(string)`. It wasn't caught in the CI because
the skip path is not normally taken in the V8 CI.
Change-Id: Id1bdab5bbc41968bba8adc1cb3664e8f95fb5d72
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4697855
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#89044}
Refs: 9f4b7699f6
PR-URL: https://github.com/nodejs/node/pull/48830
Refs: c1a54d5ffc
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/48713
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Original commit message:
[compiler] fix CompileFunction ignoring kEagerCompile
v8::ScriptCompiler::CompileFunction was ignoring kEagerCompile. Unlike
the other functions in v8::ScriptCompiler, it was not actually
propagating kEagerCompile to the parser. The newly updated test fails
without this change.
I did some archeology and found that this was commented out since the
original CL in https://crrev.com/c/980944.
As far as I know Node.js is the main consumer of this particular API.
This CL speeds up Node.js's overall startup time by ~13%.
Change-Id: Ifc3cd6653555194d46ca48db14f7ba7a4afe0053
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4571822
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/main@{#87944}
Refs: cb00db4dba
PR-URL: https://github.com/nodejs/node/pull/48671
Refs: https://github.com/nodejs/node/pull/48576
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
PR-URL: https://github.com/nodejs/node/pull/48665
Reviewed-By: Luke Karrys <luke@lukekarrys.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
The HTML structured serialize algorithm treats transferable and
serializable as two different bits. A web platform interface can be
both transferable and serializable.
Splits BaseObject::TransferMode to be able to compose the two bits
and distinguishes the transferable and cloneable.
PR-URL: https://github.com/nodejs/node/pull/47956
Refs: cf13b9b465
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/48541
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>