Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
fcc6d54
lib: return directly if udp socket close before lookup
theanarkh Mar 1, 2024
5034363
src: fix --disable-single-executable-application
joyeecheung Feb 19, 2024
e992af8
test: skip SEA tests when SEA generation fails
joyeecheung Feb 26, 2024
5908c12
doc: clarify Corepack threat model
aduh95 Mar 1, 2024
9d2c039
test: remove flaky designation
lpinca Mar 2, 2024
20e0ba3
doc,module: clarify hook chain execution sequence
JakobJingleheimer Mar 2, 2024
87d2acc
doc: fix actual result of example is different in events
deokjinkim Mar 2, 2024
fcf235d
doc: add policy for distribution
GeoffreyBooth Mar 3, 2024
9617adc
Revert "build: fix warning in cares under GN build"
lpinca Mar 3, 2024
4d99797
lib: make sure close net server
theanarkh Mar 3, 2024
67e8001
meta: bump actions/setup-node from 4.0.1 to 4.0.2
dependabot[bot] Mar 3, 2024
e476cb4
meta: bump actions/download-artifact from 4.1.1 to 4.1.3
dependabot[bot] Mar 3, 2024
015a157
meta: bump actions/cache from 4.0.0 to 4.0.1
dependabot[bot] Mar 3, 2024
42ca545
meta: bump codecov/codecov-action from 4.0.1 to 4.1.0
dependabot[bot] Mar 3, 2024
78f38a0
meta: bump actions/upload-artifact from 4.3.0 to 4.3.1
dependabot[bot] Mar 3, 2024
10aaabd
meta: bump github/codeql-action from 3.23.2 to 3.24.6
dependabot[bot] Mar 3, 2024
57ba8f5
test: fix flaky http-chunk-extensions-limit test
Ethan-Arrowood Mar 3, 2024
23c32ab
build: respect the `NODE` env variable in `Makefile`
aduh95 Mar 3, 2024
625c9e0
benchmark: update iterations of benchmark/domain/domain-fn-args.js
Mar 4, 2024
0dfe810
benchmark: update iterations of benchmark/async_hooks/async-local-
Mar 4, 2024
5864534
deps: update nghttp2 to 1.60.0
nodejs-github-bot Mar 5, 2024
fd86ea8
Revert "build: workaround for node-core-utils"
richardlau Mar 5, 2024
fff7f48
test: reduce flakiness of `test-runner-output`
aduh95 Mar 5, 2024
7ff3551
build: fix arm64 host cross-compilation in GN
zcbenz Feb 28, 2024
85aa6ca
Revert "test_runner: do not invoke after hook when test is empty"
cjihrig Mar 7, 2024
bee3b36
test: add regression test for test_runner after hook
cjihrig Mar 7, 2024
a48c9ca
stream: do not defer construction by one microtick
mcollina Mar 7, 2024
84c7e6f
2024-03-08, Version 21.7.1 (Current)
targos Mar 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
src: fix --disable-single-executable-application
Previously it would not compile if the build is configured with
--disable-single-executable-application because we use directives
to exclude the definition of SEA-related code completely. This patch
changes them so that the SEA code are still compiled and internals
can still check whether the executable is an SEA. The executable would
not try to load the SEA blob at all if SEA is disabled. If future
modifications to the C++ code attempt to load the SEA blob when SEA
is disabled, UNREACHABLE() would be raised. If user attempt to
generate the SEA blob with --experimental-sea-config with an executable
that disables SEA, they would get an error.

PR-URL: #51808
Fixes: #51730
Reviewed-By: Tobias Nießen <[email protected]>
  • Loading branch information
joyeecheung authored and targos committed Mar 7, 2024
commit 50343636e8b7b1135f25710a01aa64129df05fef
7 changes: 5 additions & 2 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1441,13 +1441,16 @@ static ExitCode StartInternal(int argc, char** argv) {
});

uv_loop_configure(uv_default_loop(), UV_METRICS_IDLE_TIME);

std::string sea_config = per_process::cli_options->experimental_sea_config;
if (!sea_config.empty()) {
#if !defined(DISABLE_SINGLE_EXECUTABLE_APPLICATION)
return sea::BuildSingleExecutableBlob(
sea_config, result->args(), result->exec_args());
#else
fprintf(stderr, "Single executable application is disabled.\n");
return ExitCode::kGenericUserError;
#endif // !defined(DISABLE_SINGLE_EXECUTABLE_APPLICATION)
}

// --build-snapshot indicates that we are in snapshot building mode.
if (per_process::cli_options->per_isolate->build_snapshot) {
if (per_process::cli_options->per_isolate->build_snapshot_config.empty() &&
Expand Down
8 changes: 4 additions & 4 deletions src/node_sea.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
#include <tuple>
#include <vector>

#if !defined(DISABLE_SINGLE_EXECUTABLE_APPLICATION)

using node::ExitCode;
using v8::ArrayBuffer;
using v8::BackingStore;
Expand Down Expand Up @@ -189,6 +187,7 @@ SeaResource SeaDeserializer::Read() {
}

std::string_view FindSingleExecutableBlob() {
#if !defined(DISABLE_SINGLE_EXECUTABLE_APPLICATION)
CHECK(IsSingleExecutable());
static const std::string_view result = []() -> std::string_view {
size_t size;
Expand All @@ -209,6 +208,9 @@ std::string_view FindSingleExecutableBlob() {
result.data(),
result.size());
return result;
#else
UNREACHABLE();
#endif // !defined(DISABLE_SINGLE_EXECUTABLE_APPLICATION)
}

} // anonymous namespace
Expand Down Expand Up @@ -668,5 +670,3 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) {

NODE_BINDING_CONTEXT_AWARE_INTERNAL(sea, node::sea::Initialize)
NODE_BINDING_EXTERNAL_REFERENCE(sea, node::sea::RegisterExternalReferences)

#endif // !defined(DISABLE_SINGLE_EXECUTABLE_APPLICATION)
4 changes: 0 additions & 4 deletions src/node_sea.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#if !defined(DISABLE_SINGLE_EXECUTABLE_APPLICATION)

#include <cinttypes>
#include <optional>
#include <string>
Expand Down Expand Up @@ -52,8 +50,6 @@ node::ExitCode BuildSingleExecutableBlob(
} // namespace sea
} // namespace node

#endif // !defined(DISABLE_SINGLE_EXECUTABLE_APPLICATION)

#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#endif // SRC_NODE_SEA_H_