0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
Commit Graph

11908 Commits

Author SHA1 Message Date
Evan Lucas
842eb5b853 test: add test for dgram.setTTL
Verify that passing a non-number will throw and that the argument is
returned on success.

PR-URL: https://github.com/nodejs/io.js/pull/2121
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-07-09 23:23:20 -05:00
Jeremiah Senkpiel
1a340a81cf Working on v2.3.5 2015-07-09 12:23:41 -07:00
Jeremiah Senkpiel
dfcd202753 2015-07-09 io.js v2.3.4 Release
Notable changes

* openssl: Upgrade to 1.0.2d, fixes CVE-2015-1793 (Alternate Chains
Certificate Forgery).
* npm: Upgraded to v2.12.1, release notes can be found in
https://github.com/npm/npm/releases/tag/v2.12.0 and
https://github.com/npm/npm/releases/tag/v2.12.1 (Kat Marchán)
https://github.com/nodejs/io.js/pull/2112.
2015-07-09 12:23:41 -07:00
Shigeki Ohtsu
c70e68fa32 deps: update deps/openssl/conf/arch/*/opensslconf.h
They should be updated according to the fix at
b4f0d1a4a8

PR-URL: https://github.com/nodejs/io.js/pull/2141
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-07-09 18:24:26 +02:00
Shigeki Ohtsu
ca93f7f2e6 deps: upgrade openssl sources to 1.0.2d
This just replaces all sources of openssl-1.0.2d.tar.gz
into deps/openssl/openssl

deps: copy all openssl header files to include dir

All symlink files in `deps/openssl/openssl/include/openssl/`
 are removed and replaced with real header files to avoid
issues on Windows.

deps: fix openssl assembly error on ia32 win32

`x86masm.pl` was mistakenly using .486 instruction set, why `cpuid` (and
perhaps others) are requiring .686 .

Fixes: https://github.com/iojs/io.js/issues/589
PR-URL: https://github.com/iojs/io.js/pull/1389
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>

deps: fix asm build error of openssl in x86_win32

See
https://mta.openssl.org/pipermail/openssl-dev/2015-February/000651.html

iojs needs to stop using masm and move to nasm or yasm on Win32.

Fixes: https://github.com/iojs/io.js/issues/589
PR-URL: https://github.com/iojs/io.js/pull/1389
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

openssl: fix keypress requirement in apps on win32

Reapply b910613792 .

Fixes: https://github.com/iojs/io.js/issues/589
PR-URL: https://github.com/iojs/io.js/pull/1389
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

deps: add -no_rand_screen to openssl s_client

In openssl s_client on Windows, RAND_screen() is invoked to initialize
random state but it takes several seconds in each connection.
This added -no_rand_screen to openssl s_client on Windows to skip
RAND_screen() and gets a better performance in the unit test of
test-tls-server-verify.
Do not enable this except to use in the unit test.

Fixes: https://github.com/nodejs/io.js/issues/1461
PR-URL: https://github.com/nodejs/io.js/pull/1836
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

PR-URL: https://github.com/nodejs/io.js/pull/2141
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-07-09 17:57:34 +02:00
Bradley Meck
6bef15afe7 src: remove traceSyncIO property from process
PR-URL: https://github.com/nodejs/io.js/pull/2143
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-07-09 17:28:56 +02:00
Johan Bergström
2ba1740ba1 test: add missing crypto checks
Add a check for crypto before using it, similar to how
other tests work.

PR-URL: https://github.com/nodejs/io.js/pull/2129
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-07-08 10:48:47 +10:00
Ali Ijaz Sheikh
ee3ce2ed88 tools: install gdbinit from v8 to $PREFIX/share
gdbinit provided by V8 can be very useful for low-level debugging of
crashes in node and in binary addons. Most useful commands at 'jst'
for JS stack traces and 'job' for printing a heap object.

This patch installs the file at $PREFIX/share/doc/node/gdbinit.

Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
PR-URL: https://github.com/nodejs/io.js/pull/2123
2015-07-07 14:59:31 -07:00
Sakthipriyan Vairamani
180fd392ca test: refactor test-repl-tab-complete
The original test uses a variable to explicitly count how many
times the callback is invoked. This patch uses common.mustCall()
to track if the callback is called or not. This makes the test
more robust, as we don't explicitly hardcode the number of times
to be called.

PR-URL: https://github.com/nodejs/io.js/pull/2122
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-07-07 12:08:39 -04:00
Rod Vagg
84b3915764 doc: document current release procedure
PR-URL: https://github.com/nodejs/io.js/pull/2099
Author: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-07-07 12:32:22 +10:00
Bert Belder
dd523c75da win,node-gyp: enable delay-load hook by default
The delay-load hook allows node.exe/iojs.exe to be renamed. See efadffe
for more background.

PR-URL: https://github.com/iojs/io.js/pull/1433
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-07-06 10:28:58 -07:00
cjihrig
b18c841ec1 deps: make node-gyp work with io.js
Every npm version bump requires a few patches to be floated on
node-gyp for io.js compatibility. These patches are found in
03d199276e,
5de334c230, and
da730c76e9. This commit squashes
them into a single commit.

PR-URL: https://github.com/iojs/io.js/pull/990
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-07-06 10:28:58 -07:00
Kat Marchán
863cdbdd08 deps: upgrade to npm 2.12.1
PR-URL: https://github.com/nodejs/io.js/pull/2112
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-07-06 10:28:20 -07:00
Fedor Indutny
fb05c8e27d Revert "test: add test for missing close/finish event"
This reverts commit 9436a860cb.
2015-07-04 11:19:58 -07:00
Nathan Woltman
0d15161c24 benchmark: Add some path benchmarks for #1778
Path functions being benchmarked are:
* format
* isAbsolute
* join
* normalize
* relative
* resolve

PR-URL: https://github.com/nodejs/io.js/pull/1778
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-07-04 13:30:20 +02:00
Nathan Woltman
bca53dce76 path: refactor for performance and consistency
Improve performance by:
+ Not leaking the `arguments` object!
+ Getting the last character of a string by index, instead of
  with `.substr()` or `.slice()`

Improve code consistency by:
+ Using `[]` instead of `.charAt()` where possible
+ Using a function declaration instead of a var declaration
+ Using `.slice()` with clearer arguments
+ Checking if `dir` is truthy in `win32.format`
  (added tests for this)

Improve both by:
+ Making the reusable `trimArray()` function
+ Standardizing getting certain path statistics with
  the new `win32StatPath()` function

PR-URL: https://github.com/nodejs/io.js/pull/1778
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-07-04 13:24:59 +02:00
Rod Vagg
46140334cd doc: update AUTHORS list
Update AUTHORS list using tools/update-authors.sh

PR-URL: https://github.com/nodejs/io.js/pull/2100
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James Hartig <fastest963@gmail.com>
2015-07-04 15:20:13 +10:00
Mark Plomer
9436a860cb test: add test for missing close/finish event
See next commit for the actual fix.

PR-URL: https://github.com/iojs/io.js/pull/1373
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-07-03 20:31:07 -07:00
Jeremiah Senkpiel
3754920ffd Working on v2.3.4 2015-07-03 17:10:40 -07:00
Jeremiah Senkpiel
2faae580ae 2015-07-04 io.js v2.3.3 Release
Notable changes

* deps: Fixed an out-of-band write in utf8 decoder.
This is an important security update as it can be used to cause a
denial of service attack.
2015-07-03 17:10:40 -07:00
Fedor Indutny
030f8045c7 deps: fix out-of-band write in utf8 decoder
Originally reported by: Kris Reeves <kris.re@bbhmedia.com>

Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-07-03 16:15:29 -07:00
Benjamin Gruenbaum
0f09b8db28 doc: don't recommend domains for error handling
Remove the suggestion to use domains for exception handling. Add clarity
to "unhandledException".

Fixes: https://github.com/nodejs/io.js/issues/2055
PR-URL: https://github.com/nodejs/io.js/pull/2056
Reviewed-By: Trev Norris <trev.norris@gmail.com>
Reviewed-By: Chris Dickinson <chris@neversaw.us>
2015-07-03 15:22:27 -06:00
Sakthipriyan Vairamani
9cd44bb2b6 util: prepend '(node) ' to deprecation messages
Changes included in this commit are

   1. Making the deprecation messages consistent. The messages will be in
      the following format

           x is deprecated. Use y instead.

      If there is no alternative for `x`, then the ` Use y instead.` part
      will not be there in the message.

   2. All the internal deprecation messages are printed with the prefix
      `(node) `, except when the `--trace-deprecation` flag is set.

Fixes: https://github.com/nodejs/io.js/issues/1883
PR-URL: https://github.com/nodejs/io.js/pull/1892
Reviewed-By: Roman Reiss <me@silverwind.io>
2015-07-03 16:32:29 +02:00
Rod Vagg
d55a778bae Working on v2.3.3 2015-07-02 19:43:29 +10:00
Rod Vagg
44c2465451 2015-07-02 io.js v2.3.2 Release
Notable changes

build:
  - Added support for compiling with Microsoft Visual C++ 2015
  - Started building and distributing headers-only tarballs along with binaries
2015-07-02 18:58:40 +10:00
Rich Trott
eabed2f518 repl: remove obsolete TODO
It's long past v0.3.0 and .break isn't going anywhere anytime soon.

PR-URL: https://github.com/nodejs/io.js/pull/2081
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brian White <mscdex@mscdex.net>
2015-07-01 22:45:06 -07:00
Evan Lucas
af249fa8a1 net: wrap connect in nextTick
Fixes an edge case regression introduced in
1bef717476.

With the lookup being skipped, an error could be emitted before an
error listener has been added.

An example of this was presented by changing the server’s IP address
and then immediately making a request to the old address.

Related: https://github.com/nodejs/io.js/pull/1823
PR-URL: https://github.com/nodejs/io.js/pull/2054
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2015-06-30 23:16:26 -05:00
Fedor Indutny
9180140231 _stream_wrap: prevent use after free in TLS
Queued write requests should be invoked on handle close, otherwise the
"consumer" might be already destroyed when the write callbacks of the
"consumed" handle will be invoked. Same applies to the shutdown
requests.

Make sure to "move" away socket from server to not break the
`connections` counter in `net.js`. Otherwise it might not call `close`
callback, or call it too early.

Fix: https://github.com/iojs/io.js/issues/1696
PR-URL: https://github.com/nodejs/io.js/pull/1910
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-06-30 20:09:22 -07:00
Rich Trott
6c61ca5325 url: fix typo in comment
PR-URL: https://github.com/nodejs/io.js/pull/2071
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-06-30 13:47:57 -07:00
Shigeki Ohtsu
58e914f9bc tools: fix gyp to work on MacOSX without XCode
This issue has already submitted to the upstream in
https://code.google.com/p/gyp/issues/detail?id=477
Use this commit until the upstream is to be fixed.

PR-URL: https://github.com/iojs/io.js/pull/1325
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-30 13:40:40 +02:00
Ben Noordhuis
99cbbc0a13 tools: update gyp to 25ed9ac
Includes improved support for VS 2015[0] and makes it possible to build
with ninja again[1].

[0] https://codereview.chromium.org/1112753003
[1] https://codereview.chromium.org/1209553002

Fixes: https://github.com/nodejs/io.js/pull/2065
PR-URL: https://github.com/nodejs/io.js/pull/2074
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp>
2015-06-30 13:38:26 +02:00
Rich Trott
05a73c0f25 benchmark: make concurrent requests configurable
In http_bench.js, allow the concurrent requests per client
to be configurable.

This also changes the launch of clients to wait until all
forked servers are online. This eliminates spurious error
messages at the start of the run.

PR-URL: https://github.com/nodejs/io.js/pull/2068
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-29 23:01:53 -07:00
Rich Trott
f52d73352e benchmark: fix typo in README
PR-URL: https://github.com/nodejs/io.js/pull/2067
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2015-06-29 10:11:52 -07:00
Roman Reiss
e3f9335c40 tools: re-enable comma-spacing linter rule
The rule was disabled because of an eslint bug which is now resolved.
All code in lib was already conforming and only test code needed a few
changes to make the linter happy with this rule enabled.

Ref: https://github.com/eslint/eslint/issues/2408

PR-URL: https://github.com/nodejs/io.js/pull/2072
Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com>
Reviewed-by: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Alex Kocharin <alex@kocharin.ru>
2015-06-29 19:04:16 +02:00
Roman Reiss
d91e10b3bd tools: update eslint to 0.24.0
PR-URL: https://github.com/nodejs/io.js/pull/2072
Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com>
Reviewed-by: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Alex Kocharin <alex@kocharin.ru>
2015-06-29 19:02:17 +02:00
Ben Noordhuis
1a51f0058c v8: cherry-pick JitCodeEvent patch from upstream
Original commit log follows:

    Meaningful name for builtins in JitCodeEvent API.

    Report builtins by name (e.g. "Builtin:ArgumentsAdaptorTrampoline")
    instead of labeling everything "Builtin:A builtin from the snapshot"

    Review URL: https://codereview.chromium.org/1216833002

PR-URL: https://github.com/nodejs/io.js/pull/2075
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-06-29 14:44:36 +02:00
Shigeki Ohtsu
9e890fe8b4 crypto: fix VerifyCallback in case of verify error
3beb880716 has a bug in VerifyCallback
when preverify is 1 and the cert chain has an verify error. If the
error is UNABLE_TO_GET_ISSUER_CERT_LOCALLY, it leads an assertion
error in finding rootCA.
The whitelist check should be made only when the cert chain has no
verify error with X509_V_OK.

Fixes: https://github.com/nodejs/io.js/issues/2061
PR-URL: https://github.com/nodejs/io.js/pull/2064
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-27 10:38:47 +09:00
Chris Dickinson
8cee8f54fc src: nix stdin _readableState.reading manipulation
this opts for stream.push('') which has the same effect
but uses a public API.

PR-URL: https://github.com/nodejs/io.js/pull/454
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
2015-06-26 11:04:57 -07:00
Evan Lucas
7f63449fde net: fix debug for dnsopts
Prevent debug call from showing [object Object] for dnsopts in
lookupAndConnect

PR-URL: https://github.com/nodejs/io.js/pull/2059
Reviewed-by: Colin Ihrig <cjihrig@gmail.com>
2015-06-26 07:42:43 -05:00
Trevor Norris
1cd9eeb556 buffer: prevent abort on bad proto
If an object's prototype is munged it's possible to bypass the
instanceof check and cause the application to abort. Instead now use
HasInstance() to verify that the object is a Buffer, and throw if not.

This check will not work for JS only methods. So while the application
won't abort, it also won't throw.

In order to properly throw in all cases with toString() the JS
optimization of checking that length is zero has been removed. In its
place the native methods will now return early if a zero length string
is detected.

Ref: https://github.com/nodejs/io.js/pull/1486
Ref: https://github.com/nodejs/io.js/pull/1922
Fixes: https://github.com/nodejs/io.js/issues/1485
PR-URL: https://github.com/nodejs/io.js/pull/2012
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-25 13:07:01 -06:00
Rich Trott
856c11f8c8 test: purge stale disabled tests
Tests in the disabled directory are not used by Makefile nor by the CI.
Other than a single 2015 commit that puts 'use strict' in each test,
many of them haven't been touched in years.

This removes all the disabled tests that have been unmodified since
2011 (with the exception of the 'use strict' modification mentioned
above).

PR-URL: https://github.com/nodejs/io.js/pull/2045
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2015-06-25 11:21:41 -07:00
Rich Trott
4d5089e181 test: do not swallow OpenSSL support error
PR-URL: https://github.com/nodejs/io.js/pull/2042
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2015-06-25 11:13:35 -07:00
Ben Noordhuis
8350f3a3a2 buffer: optimize Buffer#toString()
Break up Buffer#toString() into a fast and slow path.  The fast path
optimizes for zero-length buffers and no-arg method invocation.

The speedup for zero-length buffers is a satisfying 700%.  The no-arg
toString() operation gets faster by about 13% for a one-byte buffer.

This change exploits the fact that most Buffer#toString() calls are
plain no-arg method calls.  Rewriting the method to take no arguments
means a call doesn't go through an ArgumentsAdaptorTrampoline stack
frame in the common case.

PR-URL: https://github.com/nodejs/io.js/pull/2027
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Christian Tellnes <christian@tellnes.no>
Reviewed-By: Daniel Cousens <email@dcousens.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2015-06-25 18:32:15 +02:00
cjihrig
06721fe005 test: fix test-repl-tab-complete.js
test-repl-tab-complete.js contains numerous assertions that are
never run. Anything that results in a ReferenceError bails out,
and never calls the functions containing the assertions. This
commit adds checking for successful tab completions, as well as
ReferenceErrors.

PR-URL: https://github.com/nodejs/io.js/pull/2052
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-25 12:18:56 -04:00
Julien Gilli
a198c68b56 repl: make 'Unexpected token' errors recoverable
Fix the regexp used to detect 'Unexpected token' errors so that they can
be considered as recoverable. This fixes the following use case:

> var foo = 'bar \
... baz';
undefined
> foo
'bar baz'
>

Fixes: https://github.com/joyent/node/issues/8874
PR-URL: https://github.com/joyent/node/pull/8875
PR-URL: https://github.com/nodejs/io.js/pull/2052
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-25 12:17:51 -04:00
Sangmin Yoon
d735b2c6ef repl: fix tab completion for a non-global context
Use vm.isContext() to properly identify contexts.

PR-URL: https://github.com/joyent/node/pull/25382
PR-URL: https://github.com/nodejs/io.js/pull/2052
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-06-25 12:16:41 -04:00
Ivan Yan
c370bd3aea doc: make the abbreviation 1MM clear
Refs: https://github.com/nodejs/io.js/pull/2050
PR-URL: https://github.com/nodejs/io.js/pull/2053
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2015-06-25 11:42:09 -04:00
Rod Vagg
628a3ab093 build: add tar-headers target for headers-only tar
to replace the full src download by node-gyp, using the proper format
instead of the full source format

PR-URL: https://github.com/nodejs/io.js/pull/1975
Reviewed-By: William Blankenship <william.jblankenship@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2015-06-25 19:17:58 +10:00
Shigeki Ohtsu
1f371e3988 deps: copy all openssl header files to include dir
On upgrading openssl, all symlinks in pulic header files are replaced
with nested include files. The issue was raised that installing them
leads to lost its references to real header files.
To avoid this, all public header files are copied into the
`deps/openssl/openssl/include/openssl/` directory.
As a result, we have duplicated header files under
`deps/openssl/openssl/` but copied files are refereed in build as
specified to include path in openssl.gyp.

Fixes: https://github.com/nodejs/io.js/pull/1975
PR-URL: https://github.com/nodejs/io.js/pull/2016
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2015-06-25 19:17:41 +10:00
Rod Vagg
dcbb9e1da6 build: update build targets for io.js
PR-URL: https://github.com/nodejs/io.js/pull/1938
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Alexis Campailla <alexis@janeasystems.com>
2015-06-25 15:22:27 +10:00