Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v13.12.0 proposal #32376

Merged
merged 100 commits into from
Mar 26, 2020
Merged
Changes from 1 commit
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
c72a678
doc: add missing link for v13.11.0 changelog
MylesBorins Mar 12, 2020
397cbca
meta: move inactive collaborators to emeriti
Trott Mar 8, 2020
19fee76
doc: add Ruben to TSC
mhdawson Mar 11, 2020
cd0982a
lib: change var to let/const
himself65 Mar 2, 2020
2262e7c
test: fix test-tls-env-extra-ca-file-load
ebickle Mar 3, 2020
d497f26
src: refactor to more safe method
gengjiawen Mar 4, 2020
08edf53
test: `buffer.write` with longer string scenario
HarshithaKP Mar 6, 2020
435341a
lib: use spread operator on cluster
himself65 Mar 6, 2020
2069c4e
build: disable libstdc++ debug containers globally
bnoordhuis Jan 3, 2020
53fd0d8
util: use a global symbol for `util.promisify.custom`
ExE-Boss Feb 7, 2020
5080734
doc: expand fs.watch caveats
bzoz Mar 10, 2020
1ecd407
repl: align preview with the actual executed code
BridgeAR Feb 24, 2020
ed83a1c
test: refactor and simplify test-repl-preview
BridgeAR Mar 9, 2020
597bcb5
doc: update conditional exports recommendations
guybedford Mar 4, 2020
e83dcde
worker: allow URL in Worker constructor
aduh95 Feb 6, 2020
c0af3ac
test: use portable EOL
HarshithaKP Mar 5, 2020
d2fea9f
http2: rename counter in `mapToHeaders` inner loop
mkrawczuk Feb 28, 2020
fd80c21
test: add new scenario for async-local storage
HarshithaKP Mar 4, 2020
ae90bcc
deps: V8: cherry-pick f9257802c1c0
mmarchini Mar 10, 2020
fa1fa31
util: text decoding allows SharedArrayBuffer
bfarias-godaddy Mar 11, 2020
3e9012a
esm: port loader code to JS
addaleax Mar 7, 2020
09ca76b
test: verify that WASI errors are rethrown
cjihrig Mar 9, 2020
bee1261
deps: upgrade to libuv 1.35.0
cjihrig Mar 11, 2020
963ce08
tools: update to acorn@7.1.1
Trott Mar 14, 2020
fbcf602
test: make test-memory-usage predictable
mmarchini Mar 12, 2020
7fc5e6d
src: fix warn_unused_result compiler warning
cjihrig Mar 13, 2020
df1d4f7
test: workaround for V8 8.1 inspector pause issue
mmarchini Mar 12, 2020
c00ce7b
src: find .text section using dl_iterate_phdr
Mar 13, 2020
1950c08
src: unconditionally include report feature
cjihrig Mar 13, 2020
96ad768
build: remove node_report option in node.gyp
cjihrig Mar 13, 2020
074c3c1
build: make --without-report a no-op
cjihrig Mar 13, 2020
76781bd
test: remove common.skipIfReportDisabled()
cjihrig Mar 13, 2020
cd388b2
doc,lib,src,test: make --experimental-report a nop
cjihrig Mar 13, 2020
2e1fb2b
doc: update stability of report features
cjihrig Mar 13, 2020
59a21e2
n-api: fix comment on expected N-API version
mhdawson Mar 12, 2020
5adaf10
tools: update minimist@1.2.5
Trott Mar 14, 2020
b5b7bf5
src,cli: support compact (one-line) JSON reports
sam-github Mar 13, 2020
11ed1e6
deps,doc: move openssl maintenance guide to doc
sam-github Mar 11, 2020
71a2fa2
errors: drop pronouns from ERR_WORKER_PATH message
cjihrig Mar 15, 2020
1476182
src: handle NULL env scenario
himself65 Mar 12, 2020
05fd160
test: use Promise.all() in test-hash-seed
Trott Mar 14, 2020
ef32069
http: don't emit 'finish' after 'error'
ronag Mar 14, 2020
36ba54e
lib: add option to disable __proto__
devsnek Mar 15, 2020
b875346
doc: complete n-api version matrix
Mar 16, 2020
d2ce8e9
doc: fix some 404 links
watson Mar 11, 2020
dedd219
tools: fixup icutrim.py use of string and bytes objects
jmercier-lbi Feb 6, 2020
7904ecd
deps: update to uvwasi 0.0.6
cjihrig Mar 15, 2020
1c4a112
src: clean up stream_base.h and stream-base-inl.h
jasnell Mar 16, 2020
569e555
doc: update security release process
sam-github Feb 7, 2020
f873d87
src: prefer OnScopeLeave over shared_ptr<void>
addaleax Mar 13, 2020
3825afe
deps: upgrade to c-ares v1.16.0
addaleax Mar 13, 2020
79fdc6b
cli: allow --huge-max-old-generation-size in NODE_OPTIONS
addaleax Mar 13, 2020
4d173ea
test: uv_tty_init returns EBADF on IBM i
dmabupt Mar 18, 2020
243d0d4
src: add debug option to report large page stats
Mar 17, 2020
8ea5ffc
build: expand ASAN acronym in configure help
sam-github Mar 17, 2020
e16964e
deps: minor ICU fixes: maint docs/tool, downloader
srl295 Mar 18, 2020
2cb9f7a
deps: update to ICU 66.1
srl295 Mar 18, 2020
11650c6
src: update comment for SetImmediate()
addaleax Mar 16, 2020
bd55a9a
src: avoid Isolate::GetCurrent() for platform implementation
addaleax Mar 14, 2020
85bdb42
Revert "build: add asan check in Github action"
mmarchini Mar 11, 2020
bdcc11f
test: replace Map with Array in cluster-net-listen tests
Trott Mar 18, 2020
2e28783
test: replace countdown with Promise.all() in cluster-net-listen tests
Trott Mar 19, 2020
7356c43
module: add hook for global preload code
jkrems Mar 3, 2020
3878d8d
deps: upgrade openssl sources to 1.1.1e
hassaanp Mar 17, 2020
d719f87
deps: adjust openssl configuration for 1.1.1e
hassaanp Mar 18, 2020
d640426
deps: update archs files for OpenSSL-1.1.1e
hassaanp Mar 18, 2020
fcf9b46
test: discard data received by client
hassaanp Mar 19, 2020
76a7386
test: end tls connection with some data
sam-github Mar 20, 2020
2fe351f
src: delete CallbackInfo when cleared from cleanup hook
addaleax Mar 21, 2020
2bcf535
src: simplify IsolateData shortcut accesses
addaleax Mar 21, 2020
6f06cf0
src: delete BaseObjectWeakPtr data when pointee is gone
addaleax Mar 20, 2020
2f73e6e
test: use mustCall in place of countdown in timers test
Trott Mar 22, 2020
fbdc4f5
deps: upgrade npm to 6.14.1
isaacs Feb 27, 2020
eef4721
deps: update npm to 6.14.3
MylesBorins Mar 19, 2020
8201704
deps: remove *.pyc files from deps/npm
bnoordhuis Mar 20, 2020
6387cf8
deps: update term-size with signed version
rvagg Jan 30, 2020
f8a020e
build: macOS package notarization
rvagg Jan 22, 2020
99f260f
doc: official macOS builds now on 10.15 + Xcode 11
rvagg Mar 4, 2020
471a5d8
doc: add note re term-size commit on top of npm
rvagg Mar 21, 2020
23ba088
stream: don't emit 'finish' after 'error'
ronag Mar 14, 2020
4ca3030
doc: import clarifications with links to MDN
aldeed Mar 18, 2020
81183ca
build: annotate markdown lint failures in pull requests
richardlau Mar 20, 2020
bbea3f2
doc: improve wording in esm.md
Trott Mar 22, 2020
dfcc3e8
doc: improve wording in vm.md
Trott Mar 22, 2020
07e4131
test: refactoring / cleanup on child-process tests
jasnell Mar 23, 2020
99a7636
doc: fix lint warning in doc/api/esm.md
richardlau Mar 24, 2020
b5e4adf
doc: add new TSC members
mhdawson Mar 24, 2020
0185e3a
stream: add pipeline test for destroy of returned stream
ronag Mar 22, 2020
b7a8878
stream: fix pipeline with dest in objectMode
ronag Mar 21, 2020
28e298f
report: handle on-fatalerror better
HarshithaKP Mar 16, 2020
e9e12b8
src: use single ObjectTemplate for TextDecoder
addaleax Mar 22, 2020
94952b4
src: enhance C++ sprintf utility
himself65 Mar 20, 2020
6693b40
doc: simplify and correct example descriptions in net.md
Trott Mar 24, 2020
3e002c3
doc: update async_hooks.md
Doc999tor Mar 20, 2020
9fda912
doc: trim wording in n-api.md text about exceptions
Trott Mar 24, 2020
6168bd5
doc: remove unnecessary "obvious(ly)" modifiers in esm.md
Trott Mar 24, 2020
40a9289
doc: remove extraneous sentence in events.md
Trott Mar 24, 2020
deab08b
deps: upgrade npm to 6.14.4
ruyadorno Mar 26, 2020
56da8df
stream: emit 'pause' on unpipe
ronag Mar 24, 2020
f6a339f
2020-03-26 Version 13.12.0 (Current)
MylesBorins Mar 24, 2020
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
report: handle on-fatalerror better
--report-on-fatalerror was not honored properly, as there was no
way to check the value which was stored in the Environment pointer
which can be inaccessible under certain fatal error situations.

Move the flag out of Environment pointer so that this is doable.

Co-authored-by: Shobhit Chittora schittora@paypal.com

PR-URL: #32207
Fixes: #31576
Refs: #29881
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
HarshithaKP authored and MylesBorins committed Mar 25, 2020
commit 28e298f219586b6605d852ebe0b1b4418bb0e6fe
2 changes: 1 addition & 1 deletion src/node_errors.cc
Original file line number Diff line number Diff line change
@@ -406,7 +406,7 @@ void OnFatalError(const char* location, const char* message) {

Isolate* isolate = Isolate::GetCurrent();
Environment* env = Environment::GetCurrent(isolate);
if (env == nullptr || env->isolate_data()->options()->report_on_fatalerror) {
if (per_process::cli_options->report_on_fatalerror) {
report::TriggerNodeReport(
isolate, env, message, "FatalError", "", Local<String>());
}
8 changes: 4 additions & 4 deletions src/node_options.cc
Original file line number Diff line number Diff line change
@@ -590,10 +590,6 @@ PerIsolateOptionsParser::PerIsolateOptionsParser(
"generate diagnostic report upon receiving signals",
&PerIsolateOptions::report_on_signal,
kAllowedInEnvironment);
AddOption("--report-on-fatalerror",
"generate diagnostic report on fatal (internal) errors",
&PerIsolateOptions::report_on_fatalerror,
kAllowedInEnvironment);
AddOption("--report-signal",
"causes diagnostic report to be produced on provided signal,"
" unsupported in Windows. (default: SIGUSR2)",
@@ -667,6 +663,10 @@ PerProcessOptionsParser::PerProcessOptionsParser(
AddOption("--v8-options",
"print V8 command line options",
&PerProcessOptions::print_v8_help);
AddOption("--report-on-fatalerror",
"generate diagnostic report on fatal (internal) errors",
&PerProcessOptions::report_on_fatalerror,
kAllowedInEnvironment);

#ifdef NODE_HAVE_I18N_SUPPORT
AddOption("--icu-data-dir",
2 changes: 1 addition & 1 deletion src/node_options.h
Original file line number Diff line number Diff line change
@@ -186,7 +186,6 @@ class PerIsolateOptions : public Options {
bool no_node_snapshot = false;
bool report_uncaught_exception = false;
bool report_on_signal = false;
bool report_on_fatalerror = false;
bool report_compact = false;
std::string report_signal = "SIGUSR2";
std::string report_filename;
@@ -236,6 +235,7 @@ class PerProcessOptions : public Options {
std::string use_largepages = "off";
bool trace_sigint = false;
std::vector<std::string> cmdline;
bool report_on_fatalerror = false;

inline PerIsolateOptions* get_per_isolate_options();
void CheckOptions(std::vector<std::string>* errors) override;
4 changes: 2 additions & 2 deletions src/node_report_module.cc
Original file line number Diff line number Diff line change
@@ -131,13 +131,13 @@ static void SetSignal(const FunctionCallbackInfo<Value>& info) {
static void ShouldReportOnFatalError(const FunctionCallbackInfo<Value>& info) {
Environment* env = Environment::GetCurrent(info);
info.GetReturnValue().Set(
env->isolate_data()->options()->report_on_fatalerror);
node::per_process::cli_options->report_on_fatalerror);
}

static void SetReportOnFatalError(const FunctionCallbackInfo<Value>& info) {
Environment* env = Environment::GetCurrent(info);
CHECK(info[0]->IsBoolean());
env->isolate_data()->options()->report_on_fatalerror = info[0]->IsTrue();
node::per_process::cli_options->report_on_fatalerror = info[0]->IsTrue();
}

static void ShouldReportOnSignal(const FunctionCallbackInfo<Value>& info) {
37 changes: 23 additions & 14 deletions test/report/test-report-fatal-error.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const common = require('../common');
require('../common');
const assert = require('assert');
// Testcase to produce report on fatal error (javascript heap OOM)
if (process.argv[2] === 'child') {
@@ -20,17 +20,26 @@ if (process.argv[2] === 'child') {
const helper = require('../common/report.js');
const tmpdir = require('../common/tmpdir');
tmpdir.refresh();
const spawn = require('child_process').spawn;
const args = ['--report-on-fatalerror',
'--max-old-space-size=20',
__filename,
'child'];
const child = spawn(process.execPath, args, { cwd: tmpdir.path });
child.on('exit', common.mustCall((code) => {
assert.notStrictEqual(code, 0, 'Process exited unexpectedly');
const reports = helper.findReports(child.pid, tmpdir.path);
assert.strictEqual(reports.length, 1);
const report = reports[0];
helper.validate(report);
}));
const spawnSync = require('child_process').spawnSync;
let args = ['--report-on-fatalerror',
'--max-old-space-size=20',
__filename,
'child'];

let child = spawnSync(process.execPath, args, { cwd: tmpdir.path });

assert.notStrictEqual(child.status, 0, 'Process exited unexpectedly');
let reports = helper.findReports(child.pid, tmpdir.path);
assert.strictEqual(reports.length, 1);
const report = reports[0];
helper.validate(report);
// Verify that reports are not created on fatal error by default.
args = ['--max-old-space-size=20',
__filename,
'child'];

child = spawnSync(process.execPath, args, { cwd: tmpdir.path });
assert.notStrictEqual(child.status, 0, 'Process exited unexpectedly');
reports = helper.findReports(child.pid, tmpdir.path);
assert.strictEqual(reports.length, 0);
}