Ben Noordhuis
57cc4e3071
src: print backtrace on failed CHECK/ASSERT
...
Print a C backtrace on fatal errors to make it easier to debug issues.
PR-URL: https://github.com/nodejs/node/pull/6734
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2016-07-05 22:36:49 +02:00
Ben Noordhuis
b8919b1d23
src: move ABORT() logic into node::Abort()
...
Don't inline calls to node::DumpBacktrace() and fflush(), it makes the
generated code bigger. A secondary benefit of moving it to a function
is that it gives you something to put a breakpoint on.
PR-URL: https://github.com/nodejs/node/pull/6734
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2016-07-05 22:36:49 +02:00
cjihrig
517e71508e
test: add abort test for backtrace validation
...
This commit adds a test that validates backtraces which are
printed on fatal errors.
PR-URL: https://github.com/nodejs/node/pull/6734
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2016-07-05 22:36:48 +02:00
Ben Noordhuis
c96d701769
src: print backtrace on abort/unreachable code
...
Print a C backtrace on fatal errors to make it easier to debug issues.
PR-URL: https://github.com/nodejs/node/pull/6734
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2016-07-05 22:36:48 +02:00
Ben Noordhuis
6cec90a611
src: print backtrace on fatal error
...
Print a C backtrace on fatal errors to make it easier to debug issues
like https://github.com/nodejs/node/issues/6727 .
PR-URL: https://github.com/nodejs/node/pull/6734
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2016-07-05 22:36:48 +02:00
Ben Noordhuis
6de80fcaea
test: don't use internal headers in add-on tests
...
There is no real need and it causes endless grief on Windows with some
of the upcoming changes.
PR-URL: https://github.com/nodejs/node/pull/6734
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2016-07-05 22:36:48 +02:00
Ben Noordhuis
c7ab7a31d7
test: fix abort/test-abort-uncaught-exception
...
The --abort-on-uncaught-exception can terminate the process with either
a SIGABRT or a SIGILL signal but the test only expected SIGABRT.
PR-URL: https://github.com/nodejs/node/pull/6734
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2016-07-05 22:36:47 +02:00
Ben Noordhuis
4b0ab5b308
test: add testcfg.py to test/abort/
...
`python tools/test.py abort` won't work without one.
PR-URL: https://github.com/nodejs/node/pull/6734
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2016-07-05 22:36:47 +02:00
Ben Noordhuis
8f7baffee4
src: fix bad logic in uid/gid checks
...
Pointed out by Coverity. Introduced in commits 3546383c ("process_wrap:
avoid leaking memory when throwing due to invalid arguments") and
fa4eb47c ("bindings: add spawn_sync bindings").
The return statements inside the if blocks were dead code because their
guard conditions always evaluated to false. Remove them.
PR-URL: https://github.com/nodejs/node/pull/7374
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2016-07-05 22:36:47 +02:00
Ben Noordhuis
6fa560dce9
src: fix memory leak in WriteBuffers() error path
...
Pointed out by Coverity. Introduced in commit 05d30d53 from July 2015
("fs: implemented WriteStream#writev").
WriteBuffers() leaked memory in the synchronous uv_fs_write() error path
when trying to write > 1024 buffers.
PR-URL: https://github.com/nodejs/node/pull/7374
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2016-07-05 22:36:46 +02:00
Ben Noordhuis
ce039c3240
src: fix use-after-return in zlib bindings
...
Pointed out by Coverity. Introduced in commit 5b8e1dab from September
2011 ("Initial pass at zlib bindings".)
The asynchronous version of Write() used a pointer to a stack-allocated
buffer on flush. A mitigating factor is that zlib does not dereference
the pointer for zero-sized writes but it's still technically UB.
PR-URL: https://github.com/nodejs/node/pull/7374
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2016-07-05 22:36:46 +02:00
Ben Noordhuis
2816418c04
src: remove deprecated HMAC_Init, use HMAC_Init_ex
...
PR-URL: https://github.com/nodejs/node/pull/7374
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2016-07-05 22:36:46 +02:00
Ben Noordhuis
b7e661b12c
src: remove duplicate HMAC_Init calls
...
PR-URL: https://github.com/nodejs/node/pull/7374
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2016-07-05 22:36:45 +02:00
Ben Noordhuis
25bc7fee34
src: remove unused md_ data members
...
The code assigned the result of EVP_get_digestbyname() to data members
called md_ that were not used outside the initialization functions.
PR-URL: https://github.com/nodejs/node/pull/7374
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2016-07-05 22:36:45 +02:00
Ben Noordhuis
2228a656b0
src: remove unused data member write_queue_size_
...
Remove TLSWrap::write_queue_size_, it's not used anywhere.
PR-URL: https://github.com/nodejs/node/pull/7374
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2016-07-05 22:36:45 +02:00
Ben Noordhuis
9945b4ecd6
src: guard against starting fs watcher twice
...
This commit adds a CHECK that verifies that the file event watcher is
not started twice, which would be indicative of a bug in lib/fs.js.
PR-URL: https://github.com/nodejs/node/pull/7374
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2016-07-05 22:36:45 +02:00
Ben Noordhuis
3b1c19f90a
src: initialize encoding_ data member
...
Pointed out by Coverity. Not really a bug because it's assigned before
use but explicit assignment in the constructor is more obviously
correct.
PR-URL: https://github.com/nodejs/node/pull/7374
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2016-07-05 22:36:44 +02:00
Ben Noordhuis
c795d1ed9b
src: check uv_async_init() return value
...
Pointed out by Coverity.
PR-URL: https://github.com/nodejs/node/pull/7374
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2016-07-05 22:36:44 +02:00
Andras
44f0f940c8
benchmark: add setImmediate() benchmarks
...
Timings for sequential and concurren setImmediate() with and without
arguments, and set + clearImmediate().
PR-URL: https://github.com/nodejs/node/pull/6436
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2016-07-05 22:36:44 +02:00
Andras
efb7a90fa9
timers: optimize setImmediate()
...
Save the setImmediate() callback arguments into an array instead of a
closure, and invoke the callback on the arguments from an optimizable
function.
60% faster setImmediate with 0 args (15% if self-recursive)
4x faster setImmediate with 1-3 args, 2x with > 3
seems to be faster with less memory pressure when memory is tight
Changes:
- use L.create() to build faster lists
- use runCallback() from within tryOnImmediate()
- save the arguments and do not build closures for the callbacks
PR-URL: https://github.com/nodejs/node/pull/6436
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2016-07-05 22:36:43 +02:00
Andras
a5d894590d
timers: optimize linkedlist
...
Now uses a new L.create() factory to create access-optimized linkedlist
objects.
PR-URL: https://github.com/nodejs/node/pull/6436
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2016-07-05 22:36:43 +02:00
Ben Noordhuis
e727cb5021
tools: fix -Wunused-variable warning
...
PR-URL: https://github.com/nodejs/node/pull/7462
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2016-07-05 22:36:43 +02:00
Ben Noordhuis
001aa06bc0
src: lint v8abbr.h
...
PR-URL: https://github.com/nodejs/node/pull/7462
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2016-07-05 22:36:42 +02:00
Ben Noordhuis
ca4fb084f6
src: lint node_lttng_tp.h
...
PR-URL: https://github.com/nodejs/node/pull/7462
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2016-07-05 22:36:42 +02:00
Ben Noordhuis
da0ebf62c7
src: lint node_win32_perfctr_provider.cc
...
PR-URL: https://github.com/nodejs/node/pull/7462
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2016-07-05 22:36:42 +02:00
Ben Noordhuis
8a31b234ee
build: remove unused files from CPPLINT_FILES
...
PR-URL: https://github.com/nodejs/node/pull/7462
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2016-07-05 22:36:41 +02:00
Ben Noordhuis
3fa643b069
src: fix whitespace/indent cpplint warnings
...
PR-URL: https://github.com/nodejs/node/pull/7462
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2016-07-05 22:36:41 +02:00
Ben Noordhuis
f72259aa89
src: fix whitespace/blank_line cpplint warnings
...
PR-URL: https://github.com/nodejs/node/pull/7462
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2016-07-05 22:36:41 +02:00
Ben Noordhuis
1b3c1b08a8
src: fix runtime/references cpplint warnings
...
PR-URL: https://github.com/nodejs/node/pull/7462
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2016-07-05 22:36:41 +02:00
Ben Noordhuis
be0c575ab4
src: fix runtime/int cpplint warnings
...
PR-URL: https://github.com/nodejs/node/pull/7462
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2016-07-05 22:36:40 +02:00
Ben Noordhuis
88c5183147
src: fix runtime/indentation_namespace warnings
...
PR-URL: https://github.com/nodejs/node/pull/7462
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2016-07-05 22:36:40 +02:00
Ben Noordhuis
1fa6dba8f2
src: fix readability/nolint cpplint warnings
...
PR-URL: https://github.com/nodejs/node/pull/7462
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2016-07-05 22:36:40 +02:00
Ben Noordhuis
43e83576bd
src: fix readability/namespace cpplint warnings
...
PR-URL: https://github.com/nodejs/node/pull/7462
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2016-07-05 22:36:39 +02:00
Ben Noordhuis
5fd158568f
src: fix readability/inheritance cpplint warnings
...
PR-URL: https://github.com/nodejs/node/pull/7462
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2016-07-05 22:36:39 +02:00
Ben Noordhuis
b7e006b489
src: fix readability/constructors cpplint warnings
...
PR-URL: https://github.com/nodejs/node/pull/7462
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2016-07-05 22:36:39 +02:00
Ben Noordhuis
7fe758de85
src: fix readability/braces cpplint warnings
...
PR-URL: https://github.com/nodejs/node/pull/7462
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2016-07-05 22:36:38 +02:00
Ben Noordhuis
6280ccdaaa
src: fix build/header_guard cpplint warnings
...
PR-URL: https://github.com/nodejs/node/pull/7462
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2016-07-05 22:36:38 +02:00
Ben Noordhuis
5dfa234bae
src: fix build/c++tr1 cpplint warnings
...
PR-URL: https://github.com/nodejs/node/pull/7462
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2016-07-05 22:36:38 +02:00
Ben Noordhuis
9d0641e20d
tools: allow cpplint to run outside git repo
...
This reapplies commit a493dab ("cpplint: make it possible to run
outside git repo") from September 2015, this time with a proper
status line.
PR-URL: https://github.com/nodejs/node/pull/7462
Refs: https://github.com/nodejs/node/issues/2693
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2016-07-05 22:36:38 +02:00
Ben Noordhuis
01b7b9a2bc
tools: add back --mode=tap to cpplint
...
This commit reimplements commit 7b45163 ("tools: add tap output to
cpplint") on top of the upgraded copy of cpplint.
PR-URL: https://github.com/nodejs/node/pull/7462
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2016-07-05 22:36:37 +02:00
Ben Noordhuis
e3662a4386
tools: disable unwanted cpplint rules again
...
This commit disables the build/include, build/include_alpha,
build/include_order and legal/copyright warnings again.
PR-URL: https://github.com/nodejs/node/pull/7462
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2016-07-05 22:36:37 +02:00
Ben Noordhuis
5830ec5d41
tools: update cpplint to r456
...
PR-URL: https://github.com/nodejs/node/pull/7462
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2016-07-05 22:36:37 +02:00
Rich Trott
365f5207b3
test: test isFullWidthCodePoint with invalid input
...
Code coverage information shows that we are only testing the happy path
for the internal readline `isFullWidthCodePoint()` function. Test it
with invalid input.
PR-URL: https://github.com/nodejs/node/pull/7422
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-07-05 22:36:26 +02:00
Anna Henningsen
58ae35c34d
doc: fix broken refs to url.parse() in http docs
...
PR-URL: https://github.com/nodejs/node/pull/7392
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-07-05 22:16:30 +02:00
Anna Henningsen
f269c008f2
doc: add added: information for https
...
Ref: https://github.com/nodejs/node/issues/6578
PR-URL: https://github.com/nodejs/node/pull/7392
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-07-05 22:16:29 +02:00
Anna Henningsen
1c7b622cfc
doc: add added: information for http
...
Ref: https://github.com/nodejs/node/issues/6578
PR-URL: https://github.com/nodejs/node/pull/7392
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-07-05 22:16:29 +02:00
Stefan Budeanu
91744aaf00
build: configure --shared
...
Add configure flag for building a shared library that can be
embedded in other applications (like Electron). Add flags
--without-bundled-v8 and --without-v8-platform to control V8
dependencies used.
PR-URL: https://github.com/nodejs/node/pull/6994
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Fedor Indutny <fedor@indutny.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Conflicts:
src/node.cc
2016-07-05 22:16:23 +02:00
James M Snell
bc37e6a22d
doc: general improvements to timers.md
...
Overall improvements to timers.md documentation,
Includes squashed commit from @bengl:
doc: add timer classes
The timers returned by `setTimeout` and friends are
actually instances of `Timeout` and `Immediate`.
Documenting them as such, so that the `ref` and
`unref` methods can be identified as methods on
`Timeout` objects.
Sparked by discussion in #5792
PR-URL: https://github.com/nodejs/node/pull/6937
Reviewed-By: Robert Jefe Lindstaedt <robert.lindstaedt@gmail.com >
Reviewed-By: Bryan English <bryan@bryanenglish.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2016-07-05 22:15:48 +02:00
Evan Lucas
fe580eb578
inspector: print warning when used
...
This is done to note that this is an experimental feature.
PR-URL: https://github.com/nodejs/node/pull/7383
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-07-05 22:15:48 +02:00
Michaël Zasso
225f3b9f34
deps: update v8_inspector
...
Pick up latest commit of v8_inspector and inspector_protocol.
This brings back compatibility with V8 5.1.
PR-URL: https://github.com/nodejs/node/pull/7385
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
2016-07-05 22:15:48 +02:00