isaacs [Fri, 5 Apr 2013 18:32:33 +0000 (11:32 -0700)]
test: Fix message/error_exit
isaacs [Fri, 5 Apr 2013 16:02:48 +0000 (09:02 -0700)]
Merge remote-tracking branch 'ry/v0.10'
Conflicts:
AUTHORS
ChangeLog
deps/v8/src/json-parser.h
lib/crypto.js
src/node_version.h
Fedor Indutny [Wed, 3 Apr 2013 12:58:10 +0000 (16:58 +0400)]
crypto: use better memory BIO implementation
Ben Noordhuis [Wed, 3 Apr 2013 23:59:36 +0000 (01:59 +0200)]
build: fix windows build, disable postmortem
Always define v8_postmortem_support, even if the platform does not
support it. Commit d8852aa adds a rule that references it in node.gyp.
Fixes the Windows build.
Paddy Byers [Wed, 3 Apr 2013 07:35:39 +0000 (08:35 +0100)]
build: depend on v8 postmortem-metadata if enabled
isaacs [Wed, 3 Apr 2013 18:27:04 +0000 (11:27 -0700)]
blog: Post about 0.10.3
isaacs [Wed, 3 Apr 2013 18:26:54 +0000 (11:26 -0700)]
Now working on 0.10.4
isaacs [Wed, 3 Apr 2013 18:27:55 +0000 (11:27 -0700)]
Merge branch 'v0.10.3-release' into v0.10
Fedor Indutny [Wed, 3 Apr 2013 18:11:32 +0000 (22:11 +0400)]
v8: cherry-pick
75311294 from upstream
Quote from commit message:
Create a new HandleScope for each JSON-parsed object to avoid
excessive growth.
isaacs [Wed, 3 Apr 2013 17:30:57 +0000 (10:30 -0700)]
2013.04.03, Version 0.10.3 (Stable)
* npm: Upgrade to 1.2.17
* child_process: acknowledge sent handles (Fedor Indutny)
* etw: update prototypes to match dtrace provider (Timothy J Fontaine)
* dtrace: pass more arguments to probes (Dave Pacheco)
* build: allow building with dtrace on osx (Dave Pacheco)
* http: Remove legacy ECONNRESET workaround code (isaacs)
* http: Ensure socket cleanup on client response end (isaacs)
* tls: Destroy socket when encrypted side closes (isaacs)
* repl: isSyntaxError() catches "strict mode" errors (Nathan Rajlich)
* crypto: Pass options to ctor calls (isaacs)
* src: tie process.versions.uv to uv_version_string() (Ben Noordhuis)
isaacs [Mon, 1 Apr 2013 22:46:51 +0000 (15:46 -0700)]
http: Remove legacy ECONNRESET workaround code
Fix #5179
isaacs [Wed, 3 Apr 2013 17:17:04 +0000 (10:17 -0700)]
npm: Upgrade to 1.2.17
isaacs [Wed, 3 Apr 2013 17:01:50 +0000 (10:01 -0700)]
test: fork-getconnections stricter, less chatty
Fedor Indutny [Mon, 1 Apr 2013 20:07:24 +0000 (00:07 +0400)]
child_process: acknowledge sent handles
Fix race-condition when multiple handles are sent and SCM_RIGHTS
messages are gets merged by OS by avoiding sending multiple handles at
once!
fix #4885
isaacs [Wed, 3 Apr 2013 16:43:17 +0000 (09:43 -0700)]
assert: Simplify AssertError creation
Timothy J Fontaine [Sat, 30 Mar 2013 03:46:36 +0000 (20:46 -0700)]
etw: update prototypes to match dtrace provider
The DTrace probes were updated to accomodate platforms that can't
handle structs, update the prototypes for ETW but it's not necessary
to do anything with the new arguments as it's redundant information.
Ben Noordhuis [Sat, 30 Mar 2013 00:49:19 +0000 (01:49 +0100)]
dtrace: check if _handle property is set
Check that _handle is an object before trying to read its `fd`
property, avoids bogus values.
Timothy J Fontaine [Thu, 28 Mar 2013 23:51:52 +0000 (16:51 -0700)]
dtrace: actually use the _handle.fd value
When using the DTrace/systemtap subsystems it would be helpful to
actually have an fd associated with the requests and responses.
Dave Pacheco [Thu, 28 Mar 2013 20:52:43 +0000 (13:52 -0700)]
dtrace: pass more arguments to probes
OSX and other DTrace implementations don't support dereferencing
structs in probes. To accomodate that pass members from the struct as
arguments so that DTrace is useful on those systems.
Dave Pacheco [Thu, 28 Mar 2013 18:36:00 +0000 (11:36 -0700)]
build: allow building with dtrace on osx
Brian White [Tue, 2 Apr 2013 16:27:19 +0000 (12:27 -0400)]
src: remove unused variables
isaacs [Tue, 2 Apr 2013 00:19:05 +0000 (17:19 -0700)]
http client: Ensure socket cleanup on response end
If an http response has an 'end' handler that throws, then the socket
will never be released back into the pool.
Granted, we do NOT guarantee that throwing will never have adverse
effects on Node internal state. Such a guarantee cannot be reasonably
made in a shared-global mutable-state side-effecty language like
JavaScript. However, in this case, it's a rather trivial patch to
increase our resilience a little bit, so it seems like a win.
There is no semantic change in this case, except that some event
listeners are removed, and the `'free'` event is emitted on nextTick, so
that you can schedule another request which will re-use the same socket.
From the user's point of view, there should be no detectable difference.
Closes #5107
Andrew Hart [Sun, 31 Mar 2013 06:16:52 +0000 (00:16 -0600)]
test: test intended code-paths
The tests did not agree with the test comments. Tests first and second
were both testing the !state.reading case. Now second tests the
state.reading && state.length case.
Fixes joyent/node#5183
isaacs [Sat, 30 Mar 2013 01:23:39 +0000 (18:23 -0700)]
tls: Destroy socket when encrypted side closes
The v0.8 Stream.pipe() method automatically destroyed the destination
stream whenever the src stream closed. However, this caused a lot of
problems, and was removed by popular demand. (Many userland modules
still have a no-op destroy() method just because of this.) It was also
very hazardous because this would be done even if { end: false } was
passed in the pipe options.
In v0.10, we decided that the 'close' event and destroy() method are
application-specific, and pipe() doesn't automatically call destroy().
However, TLS actually depended (silently) on this behavior. So, in this
case, we should just go ahead and destroy the thing when close happens.
Closes #5145
Michael Hart [Sat, 30 Mar 2013 01:29:50 +0000 (12:29 +1100)]
Ensure BAD domain example actually uses domain
Timothy J Fontaine [Sat, 30 Mar 2013 03:46:36 +0000 (20:46 -0700)]
etw: update prototypes to match dtrace provider
The DTrace probes were updated to accomodate platforms that can't
handle structs, update the prototypes for ETW but it's not necessary
to do anything with the new arguments as it's redundant information.
Kyle Robinson Young [Thu, 28 Mar 2013 23:16:12 +0000 (16:16 -0700)]
doc: typo fixes
Mitar [Sun, 31 Mar 2013 10:42:33 +0000 (03:42 -0700)]
querystring: Removing unnecessary binding
Binding of `http_parser` in querystring isn't used anywhere and should
be removed.
David Braun [Tue, 26 Mar 2013 15:14:52 +0000 (12:14 -0300)]
buffer: change output of Buffer.prototype.toJSON()
Expand the JSON representation of Buffer to include type information
so that it can be deserialized in JSON.parse() without context.
Fixes #5110.
Fixes #5143.
Nathan Rajlich [Sat, 30 Mar 2013 20:35:36 +0000 (13:35 -0700)]
repl: use more readable RegExp syntax for spaces
This is just a cosmetic change really, nothing major.
Nathan Rajlich [Sat, 30 Mar 2013 20:10:30 +0000 (13:10 -0700)]
repl: isSyntaxError() catches "strict mode" errors
Closes #5178.
Ben Noordhuis [Sat, 30 Mar 2013 00:49:19 +0000 (01:49 +0100)]
dtrace: check if _handle property is set
Check that _handle is an object before trying to read its `fd`
property, avoids bogus values.
Timothy J Fontaine [Thu, 28 Mar 2013 23:51:52 +0000 (16:51 -0700)]
dtrace: actually use the _handle.fd value
When using the DTrace/systemtap subsystems it would be helpful to
actually have an fd associated with the requests and responses.
Dave Pacheco [Thu, 28 Mar 2013 20:52:43 +0000 (13:52 -0700)]
dtrace: pass more arguments to probes
OSX and other DTrace implementations don't support dereferencing
structs in probes. To accomodate that pass members from the struct as
arguments so that DTrace is useful on those systems.
Dave Pacheco [Thu, 28 Mar 2013 18:36:00 +0000 (11:36 -0700)]
build: allow building with dtrace on osx
Trevor Norris [Fri, 29 Mar 2013 15:32:53 +0000 (08:32 -0700)]
lint: add isolate, remove semicolon
isaacs [Fri, 29 Mar 2013 16:39:51 +0000 (09:39 -0700)]
crypto: Pass options to ctor calls
Ben Noordhuis [Fri, 29 Mar 2013 15:13:06 +0000 (16:13 +0100)]
src: fix Persistent<> deprecation warning
Pass the Isolate to Persistent<Function>::New(). Fixes the following
warning:
../../src/node.cc: In function ‘v8::Handle<v8::Value>
node::UsingDomains(const v8::Arguments&)’:
../../src/node.cc:921: warning: ‘New’ is deprecated
declared at ../../deps/v8/include/v8.h:4438)
Ben Noordhuis [Fri, 29 Mar 2013 15:10:56 +0000 (16:10 +0100)]
deps: upgrade libuv to c43e851
Kyle Robinson Young [Mon, 25 Mar 2013 19:15:10 +0000 (12:15 -0700)]
zlib: allow passing options to convenience methods
isaacs [Thu, 28 Mar 2013 21:53:29 +0000 (14:53 -0700)]
blog: v0.11.0 release
isaacs [Thu, 28 Mar 2013 21:50:43 +0000 (14:50 -0700)]
Now working on 0.11.1
isaacs [Thu, 28 Mar 2013 21:50:20 +0000 (14:50 -0700)]
Merge branch 'v0.11.0-release'
isaacs [Thu, 28 Mar 2013 21:39:52 +0000 (14:39 -0700)]
blog: Update linux binary tarball shasums
I just accidentally the binary release.
isaacs [Thu, 28 Mar 2013 20:53:13 +0000 (13:53 -0700)]
2013.03.28, Version 0.11.0 (Unstable)
* V8: update to 3.17.13
* os: use %SystemRoot% or %windir% in os.tmpdir() (Suwon Chae)
* util: fix util.inspect() line width calculation (Marcin Kostrzewa)
* buffer: remove _charsWritten (Trevor Norris)
* fs: uv_[fl]stat now reports subsecond resolution (Timothy J Fontaine)
* fs: Throw if error raised and missing callback (bnoordhuis)
* tls: expose SSL_CTX_set_timeout via tls.createServer (Manav Rathi)
* tls: remove harmful unnecessary bounds checking (Marcel Laverdet)
* buffer: write ascii strings using WriteOneByte (Trevor Norris)
* dtrace: fix generation of v8 constants on freebsd (Fedor Indutny)
* dtrace: x64 ustack helper (Fedor Indutny)
* readline: handle wide characters properly (Nao Iizuka)
* repl: Use a domain to catch async errors safely (isaacs)
* repl: emit 'reset' event when context is reset (Sami Samhuri)
* util: custom `inspect()` method may return an Object (Nathan Rajlich)
* console: `console.dir()` bypasses inspect() methods (Nathan Rajlich)
isaacs [Thu, 28 Mar 2013 20:19:08 +0000 (13:19 -0700)]
isaacs [Thu, 28 Mar 2013 20:11:04 +0000 (13:11 -0700)]
Merge remote-tracking branch 'ry/v0.10'
Conflicts:
src/node.cc
src/node_version.h
isaacs [Thu, 28 Mar 2013 20:06:00 +0000 (13:06 -0700)]
blog: Post about v0.10.2
isaacs [Thu, 28 Mar 2013 20:06:18 +0000 (13:06 -0700)]
Node working on 0.10.3
isaacs [Thu, 28 Mar 2013 20:05:37 +0000 (13:05 -0700)]
Merge branch 'v0.10.2-release' into v0.10
Ben Noordhuis [Thu, 28 Mar 2013 19:12:02 +0000 (20:12 +0100)]
src: tie process.versions.uv to uv_version_string()
isaacs [Thu, 28 Mar 2013 18:46:21 +0000 (11:46 -0700)]
2013.03.28, Version 0.10.2 (Stable)
* npm: Upgrade to 1.2.15
* uv: Upgrade to 0.10.3
* tls: handle SSL_ERROR_ZERO_RETURN (Fedor Indutny)
* tls: handle errors before calling C++ methods (Fedor Indutny)
* tls: remove harmful unnecessary bounds checking (Marcel Laverdet)
* crypto: make getCiphers() return non-SSL ciphers (Ben Noordhuis)
* crypto: check randomBytes() size argument (Ben Noordhuis)
* timers: do not calculate Timeout._when property (Alexey Kupershtokh)
* timers: fix off-by-one ms error (Alexey Kupershtokh)
* timers: handle signed int32 overflow in enroll() (Fedor Indutny)
* stream: Fix stall in Transform under very specific conditions (Gil Pedersen)
* stream: Handle late 'readable' event listeners (isaacs)
* stream: Fix early end in Writables on zero-length writes (isaacs)
* domain: fix domain callback from MakeCallback (Trevor Norris)
* child_process: don't emit same handle twice (Ben Noordhuis)
* child_process: fix sending utf-8 to child process (Ben Noordhuis)
Bert Belder [Thu, 28 Mar 2013 19:05:33 +0000 (20:05 +0100)]
deps: upgrade libuv to v0.10.3
isaacs [Thu, 28 Mar 2013 18:35:12 +0000 (11:35 -0700)]
npm: Upgrade to v1.2.15
Fedor Indutny [Thu, 28 Mar 2013 16:55:51 +0000 (20:55 +0400)]
tls: handle SSL_ERROR_ZERO_RETURN
see #5004
wicked [Thu, 25 Oct 2012 04:53:35 +0000 (11:53 +0700)]
setTimeout: do not calculate Timeout._when property
Dramatically improves Timer performance.
isaacs [Wed, 27 Mar 2013 05:43:53 +0000 (22:43 -0700)]
stream: Emit readable on ended streams via read(0)
cc: @mjijackson
isaacs [Tue, 26 Mar 2013 21:42:56 +0000 (14:42 -0700)]
stream: Handle late 'readable' event listeners
In cases where a stream may have data added to the read queue before the
user adds a 'readable' event, there is never any indication that it's
time to start reading.
True, there's already data there, which the user would get if they
checked However, as we use 'readable' event listening as the signal to
start the flow of data with a read(0) call internally, we ought to
trigger the same effect (ie, emitting a 'readable' event) even if the
'readable' listener is added after the first emission.
To avoid confusing weirdness, only the *first* 'readable' event listener
is granted this privileged status. After we've started the flow (or,
alerted the consumer that the flow has started) we don't need to start
it again. At that point, it's the consumer's responsibility to consume
the stream.
Closes #5141
isaacs [Thu, 28 Mar 2013 01:41:41 +0000 (18:41 -0700)]
doc: Add 'don't ignore errors' section to domain
Also, an example program of using cluster and domain to handle errors
safely, with zero downtime, using process isolation.
Benjamin Ruston [Thu, 28 Mar 2013 14:19:10 +0000 (14:19 +0000)]
doc: debugger, dns, http: fix grammar
Suwon Chae [Tue, 19 Mar 2013 06:58:44 +0000 (15:58 +0900)]
os: use %SystemRoot% or %windir% in os.tmpdir()
On Windows, respect the SystemRoot and windir environment variables,
don't default to c:\windows\temp.
Marcin Kostrzewa [Mon, 18 Mar 2013 00:44:43 +0000 (01:44 +0100)]
util: fix util.inspect() line width calculation
Have the formatter filter out vt100 color codes when calculating the
line width. Stops it from unnecessarily splitting strings over multiple
lines.
Fixes #5039.
Ben Noordhuis [Wed, 27 Mar 2013 23:28:45 +0000 (00:28 +0100)]
deps: upgrade libuv to 7514149
isaacs [Wed, 27 Mar 2013 16:47:16 +0000 (09:47 -0700)]
test: Accept either kind of NaN
A llvm/clang bug on Darwin ia32 makes these tests fail 100% of
the time. Since no one really seems to mind overly much, and we
can't reasonably fix this in node anyway, just accept both types
of NaN for now.
Fedor Indutny [Wed, 27 Mar 2013 08:18:43 +0000 (12:18 +0400)]
tls: handle errors before calling C++ methods
Calling `this.pair.encrypted._internallyPendingBytes()` before
handling/resetting error will result in assertion failure:
../src/node_crypto.cc:962: void node::crypto::Connection::ClearError():
Assertion `handle_->Get(String::New("error"))->BooleanValue() == false'
failed.
see #5058
Benjamin Ruston [Wed, 27 Mar 2013 10:09:37 +0000 (10:09 +0000)]
doc: addon: fix grammar
Fedor Indutny [Tue, 26 Mar 2013 18:33:14 +0000 (22:33 +0400)]
openssl: disable HEARTBEAT TLS extension
Microsoft's IIS doesn't support it, and is not replying with ServerHello
after receiving ClientHello which contains it.
The good way might be allowing to opt-out this at runtime from
javascript-land, but unfortunately OpenSSL doesn't support it right now.
see #5119
Trevor Norris [Tue, 26 Mar 2013 05:32:41 +0000 (22:32 -0700)]
domain: fix domain callback from MakeCallback
Since _tickCallback and _tickDomainCallback were both called from
MakeCallback, it was possible for a callback to be called that required
a domain directly to _tickCallback.
The fix was to implement process.usingDomains(). This will set all
applicable functions to their domain counterparts, and set a flag in cc
to let MakeCallback know domain callbacks always need to be checked.
Added test in own file. It's important that the test remains isolated.
Ben Noordhuis [Tue, 26 Mar 2013 22:19:50 +0000 (23:19 +0100)]
openssl: make sed tool configurable
Those poor sods on systems where /usr/bin/sed is a BSD sed can now do
`make -C deps/openssl/asm SED=gsed`.
isaacs [Tue, 26 Mar 2013 17:17:47 +0000 (10:17 -0700)]
test: Use 'close' event in simple/test-repl-timeout-throw
Trevor Norris [Mon, 25 Mar 2013 18:55:44 +0000 (11:55 -0700)]
buffer: remove _charsWritten
_charsWritten is an internal property that was constantly written to,
but never read from. So it has been removed.
Removed documentation reference as well.
Ben Noordhuis [Tue, 26 Mar 2013 15:34:42 +0000 (16:34 +0100)]
doc: child_process: document 'error' event
Fixes #5130.
Ben Noordhuis [Tue, 26 Mar 2013 15:09:48 +0000 (16:09 +0100)]
doc: fix formatting in tty.markdown
Fixes #5135.
Manav Rathi [Mon, 18 Mar 2013 14:10:41 +0000 (19:40 +0530)]
tls: expose SSL_CTX_set_timeout via tls.createServer
Add the `sessionTimeout` integral value to the list of options
recognized by `tls.createServer`.
This option will be useful for applications which need frequently
establish short-lived TLS connections to the same endpoint. The TLS
tickets RFC is an ideal option to reduce the socket setup overhead
for such scenarios, but the default ticket timeout value (5
minutes) is too low to be useful.
Ben Noordhuis [Mon, 25 Mar 2013 23:27:23 +0000 (00:27 +0100)]
Merge remote-tracking branch 'origin/v0.10'
Conflicts:
deps/v8/src/objects-inl.h
deps/v8/src/objects.h
src/node_crypto.cc
Timothy J Fontaine [Mon, 25 Mar 2013 23:16:44 +0000 (16:16 -0700)]
test: test name is the last elem, not second
When a test requires node to have parameters passed (--expose-gc) the
test name will be the last element in the command array, not the second.
Ben Noordhuis [Sun, 24 Mar 2013 23:29:55 +0000 (00:29 +0100)]
child_process: don't emit same handle twice
It's possible to read multiple messages off the parent/child channel.
When that happens, make sure that recvHandle is cleared after emitting
the first message so it doesn't get emitted twice.
Ben Noordhuis [Mon, 18 Mar 2013 23:16:55 +0000 (00:16 +0100)]
crypto: make getCiphers() return non-SSL ciphers
Commit f53441a added crypto.getCiphers() as a function that returns the
names of SSL ciphers.
Commit 14a6c4e then added crypto.getHashes(), which returns the names of
digest algorithms, but that creates a subtle inconsistency: the return
values of crypto.getHashes() are valid arguments to crypto.createHash()
but that is not true for crypto.getCiphers() - the returned values are
only valid for SSL/TLS functions.
Rectify that by adding tls.getCiphers() and making crypto.getCiphers()
return proper cipher names.
Mathias Bynens [Tue, 19 Mar 2013 08:10:23 +0000 (09:10 +0100)]
doc: mention `process.*.isTTY` under `process`
Ben Noordhuis [Thu, 14 Mar 2013 15:59:07 +0000 (16:59 +0100)]
child_process: fix sending utf-8 to child process
In process#send() and child_process.ChildProcess#send(), use 'utf8' as
the encoding instead of 'ascii' because 'ascii' mutilates non-ASCII
input. Correctly handle partial character sequences by introducing
a StringDecoder.
Sending over UTF-8 no longer works in v0.10 because the high bit of
each byte is now cleared when converting a Buffer to ASCII. See
commit 96a314b for details.
Fixes #4999 and #5011.
Ben Noordhuis [Thu, 21 Mar 2013 12:12:41 +0000 (13:12 +0100)]
bench: add child process read perf benchmark
Ben Noordhuis [Sun, 24 Mar 2013 21:53:07 +0000 (22:53 +0100)]
deps: fix openssl build on windows
Commit 8632af3 ("tools: update gyp to r1601") broke the Windows build.
Older versions of GYP link to kernel32.lib, user32.lib, etc. but that
was changed in r1584. See https://codereview.chromium.org/
12256017
Fix the build by explicitly linking to the required libraries.
isaacs [Fri, 22 Mar 2013 01:18:55 +0000 (18:18 -0700)]
stream: Fix early end in Writables on zero-length writes
Doing this causes problems:
z.write(Buffer(0));
z.end();
Fix by not ending Writable streams while they're still in the process of
writing something.
Ben Noordhuis [Sun, 24 Mar 2013 13:29:17 +0000 (14:29 +0100)]
tools: update gyp to r1601
Among other things, this should make it easier for people to build
node.js on openbsd.
Ben Noordhuis [Sun, 24 Mar 2013 12:22:01 +0000 (13:22 +0100)]
doc: update CONTRIBUTING.md
* Latest stable is v0.10 now.
* Add example of what the first line of the commit log should look like.
Alexey Kupershtokh [Fri, 26 Oct 2012 05:49:22 +0000 (12:49 +0700)]
timer: fix off-by-one ms error
Fix #5103
Timothy J Fontaine [Fri, 22 Mar 2013 20:51:11 +0000 (13:51 -0700)]
fs: uv_[fl]stat now reports subsecond resolution
While libuv supports reporting subsecond stat resolution across
platforms, to actually get that resolution your platform and filesystem
must support it (not HFS, ext[23], fat), otherwise the nsecs are 0
Ben Noordhuis [Sat, 23 Mar 2013 18:17:12 +0000 (19:17 +0100)]
deps: upgrade libuv to eca008a
Marcel Laverdet [Thu, 21 Mar 2013 21:56:02 +0000 (16:56 -0500)]
tls: remove harmful unnecessary bounds checking
The EncIn, EncOut, ClearIn & ClearOut functions are victims of some code
copy + pasting. A common line copied to all of them is:
`if (off >= buffer_length) { ...`
448e0f43 corrected ClearIn's check from `>=` to `>`, but left the others
unchanged (with an incorrect bounds check). However, if you look down at
the next very next bounds check you'll see:
`if (off + len > buffer_length) { ...`
So the check is actually obviated by the next line, and should be
removed.
This fixes an issue where writing a zero-length buffer to an encrypted
pair's *encrypted* stream you would get a crash.
Marcel Laverdet [Thu, 21 Mar 2013 21:56:02 +0000 (16:56 -0500)]
tls: remove harmful unnecessary bounds checking
The EncIn, EncOut, ClearIn & ClearOut functions are victims of some code
copy + pasting. A common line copied to all of them is:
`if (off >= buffer_length) { ...`
448e0f43 corrected ClearIn's check from `>=` to `>`, but left the others
unchanged (with an incorrect bounds check). However, if you look down at
the next very next bounds check you'll see:
`if (off + len > buffer_length) { ...`
So the check is actually obviated by the next line, and should be
removed.
This fixes an issue where writing a zero-length buffer to an encrypted
pair's *encrypted* stream you would get a crash.
verwaest@chromium.org [Mon, 18 Mar 2013 13:35:17 +0000 (13:35 +0000)]
v8: Unify kMaxArguments with number of bits used to encode it.
Increase the number of bits by 1 by making Flags unsigned.
BUG=chromium:211741
Review URL: https://chromiumcodereview.appspot.com/
12886008
This is a back-port of commits 13964 and 13988 addressing CVE-2013-2632.
Ben Noordhuis [Sat, 23 Mar 2013 14:48:56 +0000 (15:48 +0100)]
crypto: check randomBytes() size argument
Throw a TypeError if size > 0x3fffffff. Avoids the following V8 fatal
error:
FATAL ERROR: v8::Object::SetIndexedPropertiesToExternalArrayData()
length exceeds max acceptable value
Fixes #5126.
Ben Noordhuis [Sat, 23 Mar 2013 14:38:17 +0000 (15:38 +0100)]
doc: document that stdio is usually blocking
Gil Pedersen [Sun, 17 Mar 2013 14:04:01 +0000 (15:04 +0100)]
stream: Fix stall in Transform under very specific conditions
The stall is exposed in the test, though the test itself asserts before
it stalls.
The test is constructed to replicate the stalling state of a complex
Passthrough usecase since I was not able to reliable trigger the stall.
Some of the preconditions for triggering the stall are:
* rs.length >= rs.highWaterMark
* !rs.needReadable
* _transform() handler that can return empty transforms
* multiple sync write() calls
Combined this can trigger a case where rs.reading is not cleared when
further progress requires this. The fix is to always clear rs.reading.
Fedor Indutny [Thu, 21 Mar 2013 17:38:30 +0000 (21:38 +0400)]
timers: handle signed int32 overflow in enroll()
Before this patch calling `socket.setTimeout(0xffffffff)` will result in
signed int32 overflow in C++ which resulted in assertion error:
Assertion failed: (timeout >= -1), function uv__io_poll, file
../deps/uv/src/unix/kqueue.c, line 121.
see #5101
Trevor Norris [Thu, 21 Mar 2013 17:50:25 +0000 (10:50 -0700)]
doc: update that ascii write doesn't convert null
Since WriteBuffer has been replaced with WriteOneByte, writing ascii
will no longer automatically convert 0x0 to 0x20. So removed mention of
this special case from docs.
isaacs [Thu, 21 Mar 2013 17:52:01 +0000 (10:52 -0700)]
Merge remote-tracking branch 'ry/v0.10' into master
Conflicts:
src/node.cc
src/node_version.h
Trevor Norris [Thu, 21 Mar 2013 16:26:23 +0000 (09:26 -0700)]
src: write ascii strings using WriteOneByte
WriteAscii will be deprecated soon from v8, and performance has
regressed. The v8 team recommended using WriteOneByte instead.
isaacs [Thu, 21 Mar 2013 16:14:01 +0000 (09:14 -0700)]
blog: Post for v0.10.1
isaacs [Thu, 21 Mar 2013 16:14:23 +0000 (09:14 -0700)]
Now working on v0.10.2