Commit Graph

8687 Commits (b922b5e90d2c14dd332b95827c2533e083df7e55)

Author SHA1 Message Date
ayanamist b922b5e90d stream: writes may return false but forget to emit drain
If a write is above the highWaterMark, _write still manages to
fully send it synchronously, _writableState.length will be adjusted down
to 0 synchronously with the write returning false, but 'drain' will
not be emitted until process.nextTick.

If another small write which is below highWaterMark is issued before
process.nextTick happens, _writableState.needDrain will be reset to false,
and the drain event will never be fired.

So we should check needDrain before setting it up, which prevents it
from inproperly resetting to false.
2014-01-05 19:44:45 +04:00
Timothy J Fontaine aa56d9d354 blog: Post for v0.11.10 2013-12-31 16:24:58 -08:00
Maciej Małecki 5a8de857f0 doc: document that `process.send` is synchronous
Ref #2598
2013-12-31 14:52:43 -08:00
Timothy J Fontaine ffb718b5a3 doc: clarify process on exit safe usage 2013-12-31 14:48:20 -08:00
Ron Korving 3917232030 docs: process.on('exit') receives exit code
The fact that the "exit" event passes the exit code as an argument
as omitted from the documentation. This adds the explanation and
augments the example code to show that.
2013-12-31 14:38:09 -08:00
Timothy J Fontaine 6f8aa24d1e test: fix test-cluster-eaccess to work on windows 2013-12-31 11:57:13 -08:00
Fedor Indutny 3e9f2e61db cluster: report more errors to workers
Some errors for listening and binding to a socket were not properly
delivered to workers.

fix #6767
2013-12-31 09:47:33 -08:00
Fedor Indutny cb5da7b443 deps: update gyp to 828ce09 2013-12-30 15:52:47 -08:00
Dav Glass 34b9280da4 doc: Fix missing backtick in debugger doc 2013-12-30 11:44:13 -08:00
Lev Gimelfarb d2d56d04f8 build: add settings for VS 2013 to vcbuild.bat
Search for VS2013 compiler 1st, before falling back to older ones. This
allows compiling using the latest VS2013.
2013-12-28 16:58:01 +04:00
isaacs 7f82faee30 npm: Upgrade to v1.3.22 2013-12-25 19:15:23 -08:00
T.C. Hollingsworth 55b0bd639d build: install common.gypi along with headers
node-gyp requires this file
2013-12-20 11:03:06 -08:00
Timothy J Fontaine f84c7a2776 blog: Post for v0.10.24 2013-12-19 09:05:14 -08:00
Timothy J Fontaine 00e28ee6a8 Now working on 0.10.25 2013-12-19 09:05:14 -08:00
Timothy J Fontaine 696ae46fd7 Merge branch 'v0.10.24-release' into v0.10 2013-12-19 09:03:45 -08:00
Timothy J Fontaine b7fd6bc899 2013.12.18, Version 0.10.24 (Stable)
* uv: Upgrade to v0.10.21

* npm: upgrade to 1.3.21

* v8: backport fix for CVE-2013-{6639|6640}

* build: unix install node and dep library headers (Timothy J Fontaine)

* cluster, v8: fix --logfile=%p.log (Ben Noordhuis)

* module: only cache package main (Wyatt Preul)
2013-12-18 15:49:45 -08:00
Timothy J Fontaine 9371be0aa1 uv: Upgrade to v0.10.21 2013-12-18 15:42:46 -08:00
Ben Noordhuis 2eaef9f6da cluster, v8: fix --logfile=%p.log
The %p is replaced with the current PID.  This used to work in node.js
v0.9.7 but it seems to have been lost somewhere along the way.

This commit makes the fix from 6b713b52 ("cluster: make --prof work for
workers") work again.  Without it, all log data ends up in a single
file and is unusable because the addresses are all wrong.
2013-12-18 15:36:12 -08:00
Timothy J Fontaine 32478acf94 build: unix install node and dep library headers
Restores functionality from v0.8 where module authors may not be
relying on gyp for building their modules.
2013-12-18 15:06:20 -08:00
isaacs 2a741f2d12 npm: upgrade to 1.3.21 2013-12-17 14:33:52 -08:00
isaacs e10c223eb6 npm: upgrade to 1.3.20
The 1.3.19 release had a critical bug: any packages published with it
could not be installed, because the shasum would be incorrect.

Thankfully, 1.3.19 was published using 1.3.19, so could not be installed
by any users!  However, if it goes out as part of a Node.js release,
then obviously that would be a problem.
2013-12-17 09:04:30 -08:00
isaacs 97738994e0 npm: Upgrade to 1.3.19 2013-12-16 23:09:16 -08:00
jkummerow@chromium.org 39e2426b20 v8: backport fix for CVE-2013-{6639|6640}
Quoting CVE-2013-6639:

    The DehoistArrayIndex function in hydrogen-dehoist.cc in Google V8
    before 3.22.24.7, as used in Google Chrome before 31.0.1650.63,
    allows remote attackers to cause a denial of service (out-of-bounds
    write) or possibly have unspecified other impact via JavaScript code
    that sets the value of an array element with a crafted index.

Quoting CVE-2013-6640:

    The DehoistArrayIndex function in hydrogen-dehoist.cc in Google V8
    before 3.22.24.7, as used in Google Chrome before 31.0.1650.63,
    allows remote attackers to cause a denial of service (out-of-bounds
    read) via JavaScript code that sets a variable to the value of an
    array element with a crafted index.

Like 6b92a7, this is unlikely to affect node.js because it only runs
local, trusted code.  However, if there exists some module somewhere
that populates an array index with remotely provided data this could
very well be used to crash a remote server running node.  Defense in
depth and all.

This is a backport of upstream commit r17801. Original commit log:

    Limit size of dehoistable array indices

    LOG=Y
    BUG=chromium:319835,chromium:319860
    R=dslomov@chromium.org

    Review URL: https://codereview.chromium.org/74113002
2013-12-14 02:55:29 +04:00
Wyatt Preul 1d5e797445 module: only cache package main 2013-12-12 09:38:47 -08:00
Timothy J Fontaine 7dca8d714f blog: Post for v0.10.23 2013-12-11 22:11:19 -08:00
Timothy J Fontaine bb1575b4c4 Now working on 0.10.24 2013-12-11 22:11:19 -08:00
Timothy J Fontaine 593672c33d Merge branch 'v0.10.23-release' into v0.10 2013-12-11 22:11:06 -08:00
Timothy J Fontaine 0462bc2356 2013.12.12, Version 0.10.23 (Stable)
* uv: Upgrade to v0.10.20 (Timothy J Fontaine)

* npm: Upgrade to 1.3.17 (isaacs)

* gyp: update to 78b26f7 (Timothy J Fontaine)

* build: include postmortem symbols on linux (Timothy J Fontaine)

* crypto: Make Decipher._flush() emit errors. (Kai Groner)

* dgram: fix abort when getting `fd` of closed dgram (Fedor Indutny)

* events: do not accept NaN in setMaxListeners (Fedor Indutny)

* events: avoid calling `once` functions twice (Tim Wood)

* events: fix TypeError in removeAllListeners (Jeremy Martin)

* fs: report correct path when EEXIST (Fedor Indutny)

* process: enforce allowed signals for kill (Sam Roberts)

* tls: emit 'end' on .receivedShutdown (Fedor Indutny)

* tls: fix potential data corruption (Fedor Indutny)

* tls: handle `ssl.start()` errors appropriately (Fedor Indutny)

* tls: reset NPN callbacks after SNI (Fedor Indutny)
2013-12-11 21:20:06 -08:00
Nicolas Kaiser 4bc2ec90d7 doc: fix typos in node.1 2013-12-11 20:41:36 -08:00
Mathias Bynens f89a7185b7 doc: mention `binary` as deafult for Hash strings 2013-12-11 20:39:22 -08:00
Gabriel Farrell 04d52270b6 doc: "finish" event is on the writable stream 2013-12-11 20:29:17 -08:00
Timothy J Fontaine 910bc3c02d uv: Upgrade v0.10.20 2013-12-11 20:24:36 -08:00
Timothy J Fontaine 4ec189b250 gyp: update to 78b26f7 2013-12-11 20:06:11 -08:00
isaacs a22de4f7ee npm: Upgrade to 1.3.17 2013-12-11 10:20:26 -08:00
Fedor Indutny f16edd2632 fs: report correct path when EEXIST
When `symlink`, `link` or `rename` report EEXIST, ENOTEMPTY or EPERM -
the destination file name should be included in the error message,
instead of source file name.

fix #6510
2013-12-10 23:17:00 +04:00
Fedor Indutny 4a2792cd2f tls: emit 'end' on .receivedShutdown
NOTE: Also removed `.receivedShutdown` method of `Connection` it wasn't
documented anywhere, and was rewritten with `true` after receiving
`close_notify`.

fix #6638
2013-12-10 22:56:01 +04:00
Timothy J Fontaine 92bbd60a3f build: only whole archive on static v8 builds
Closes #6629
2013-12-10 10:11:28 -08:00
Timothy J Fontaine 2905884b63 build: pass --no-parallel by default to gyp
gyp by default now tries to process gyp files in parallel by using
python's multiprocessing module, but it has problems on oddball
platforms. We don't have many files or complex dependency chains that
would benefit from parallel processing so disable by deafult

fixes #6640
2013-12-06 21:07:46 -08:00
Timothy J Fontaine b5e161989c build: ./configure pass positional args to gyp
use `--` to specify the arguments you want to pass directly to gyp.

for example: `./configure -- --no-parallel -Dsome_define=foo`

fixes #6370
2013-12-06 21:07:00 -08:00
Yazhong Liu 5cfee927cd doc: mention execArgv in setupMaster 2013-12-06 10:45:40 -08:00
Fedor Indutny 796834bf18 doc: document 'error' event for stream.Writable
fix #5255
2013-12-06 10:26:49 -08:00
Kai Groner 98be8df571 crypto: Make Decipher._flush() emit errors.
When Decipher processes a stream using an incorrect key, the
DecipherFinal() method throws an unhandled exception at the end of the
stream.
2013-12-04 19:52:15 +04:00
isaacs b371d4ae8f blog: bnoordhuis departure 2013-12-04 01:00:07 -08:00
Fedor Indutny 60f777d343 tls: fix pool usage race
When calling `encOut` in loop, `maybeInitFinished()` may invoke
`clearOut`'s loop, leading to the writing of interleaved data
(encrypted and cleartext) into the one shared pool.

Move `maybeInitFinished()` out of the loop and add assertion for
future.
2013-12-02 15:18:04 -08:00
Yazhong Liu bd7fa92de4 doc: list execArgv option for child_process.fork() 2013-12-02 13:41:30 -08:00
Gabriel Falkenberg 94c4ba9dd3 doc: change constant to consistent 2013-12-02 13:31:23 -08:00
Sam Roberts 8aac118b69 process: document kill(0), disallow kill(O_RDWR)
The null signal test existed, but only tested the case where the target
process existed, not when it did not exist.

Also clarified that SIGUSR1 is reserved by Node.js only for receiveing,
its not at all reserved when sending a signal with kill().

kill(pid, 'O_RDWR'), or any other node constant, "worked". I fixed this
by also checking for 'SIG'. The same as done in the isSignal() function.
Now the signal names supported by process.kill() are the same as those
supported by process.on().
2013-12-02 10:41:37 -08:00
Fedor Indutny 9b8fcff435 tls: reset NPN callbacks after SNI
SNI callback selects a new SSL_CTX for the connection, which doesn't
have NPN callbacks set up.
2013-12-02 14:48:14 +04:00
Timothy J Fontaine 6877e64fa8 build: include postmortem symbols on linux
Previously we were building the symbols, but the linker was garbage
collecting the symbols because they weren't used. Inform the linker
that we want to keep all symbols from v8 around.
2013-12-01 18:57:43 -08:00
Yazhong Liu fcfaa392ae doc: net: fix typo in example code 2013-11-30 14:05:45 +01:00