Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2014-08-192014.08.19, Version 0.10.31 (Stable)v0.10.31Timothy J Fontaine
* v8: backport CVE-2013-6668 * openssl: Update to v1.0.1i * npm: Update to v1.4.23 * cluster: disconnect should not be synchronous (Sam Roberts) * fs: fix fs.readFileSync fd leak when get RangeError (Jackson Tian) * stream: fix Readable.wrap objectMode falsy values (James Halliday) * timers: fix timers with non-integer delay hanging. (Julien Gilli)
2014-08-04timers: fix timers with non-integer delay hanging.Julien Gilli
When backporting f8193ab into v0.10, a regression was introduced. Timers with non-integer timeout could trigger a infinite recursion with 100% cpu usage. This commit backports 93b0624 which fixes the regression. After backporting f8193ab, instead of using Date.now(), timers would use Timer.now() to determine if they had expired. However, Timer.now() is based on loop->time, which is not updated when a timer's remaining time is > 0 and < 1. Timers would thus never timeout if their remaining time was at some point > 0 and < 1. With this commit, Timer.now() updates loop->time itself, and timers always timeout eventually. Fixes #8065 and #8068.
2014-07-31Now working on 0.10.31Timothy J Fontaine
2014-07-312014.07.31, Version 0.10.30 (Stable)v0.10.30Timothy J Fontaine
* uv: Upgrade to v0.10.28 * npm: Upgrade to v1.4.21 * v8: Interrupts must not mask stack overflow. * Revert "stream: start old-mode read in a next tick" (Fedor Indutny) * buffer: fix sign overflow in `readUIn32BE` (Fedor Indutny) * buffer: improve {read,write}{U}Int* methods (Nick Apperson) * child_process: handle writeUtf8String error (Fedor Indutny) * deps: backport 4ed5fde4f from v8 upstream (Fedor Indutny) * deps: cherry-pick eca441b2 from OpenSSL (Fedor Indutny) * lib: remove and restructure calls to isNaN() (cjihrig) * module: eliminate double `getenv()` (Maciej Małecki) * stream2: flush extant data on read of ended stream (Chris Dickinson) * streams: remove unused require('assert') (Rod Vagg) * timers: backport f8193ab (Julien Gilli) * util.h: interface compatibility (Oguz Bastemur) * zlib: do not crash on write after close (Fedor Indutny)
2014-07-31timers: backport f8193abJulien Gilli
Original commit message: timers: use uv_now instead of Date.now This saves a few calls to gettimeofday which can be expensive, and potentially subject to clock drift. Instead use the loop time which uses hrtime internally. In addition to the backport, this commit: - keeps _idleStart timers' property which is still set to Date.now() to avoid breaking existing code that uses it, even if its use is discouraged. - adds automated tests. These tests use a specific branch of libfaketime that hasn't been submitted upstream yet. libfaketime is git cloned if needed when running automated tests. Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
2014-07-02constants: add O_NONBLOCK constantFedor Indutny
It appears that it is defined unconditionally on all supported unixes. fix #7867 #7855 Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2014-07-02Revert "constants: export O_NONBLOCK"Fedor Indutny
This reverts commit 00890e43fb935c8bc5dc150f0f2c96bc465d8a4d. Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2014-07-02Revert "src: fix _XOPEN_SOURCE redefinition warning"Fedor Indutny
This reverts commit 885142a5edc2c803fa8b9d92b5d0771379237764. Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2014-06-27util.h: interface compatibilityOguz Bastemur
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-06-09Now working on 0.10.30Timothy J Fontaine
2014-06-092014.06.05, Version 0.10.29 (Stable)v0.10.29Timothy J Fontaine
* openssl: to 1.0.1h (CVE-2014-0224) * npm: upgrade to 1.4.10 * utf8: Prevent Node from sending invalid UTF-8 (Felix Geisendörfer) - *NOTE* this introduces a breaking change, previously you could construct invalid UTF-8 and invoke an error in a client that was expecting valid UTF-8, now unmatched surrogate pairs are replaced with the unknown UTF-8 character. To restore the old functionality simply have NODE_INVALID_UTF8 environment variable set. * child_process: do not set args before throwing (Greg Sabia Tucker) * child_process: spawn() does not throw TypeError (Greg Sabia Tucker) * constants: export O_NONBLOCK (Fedor Indutny) * crypto: improve memory usage (Alexis Campailla) * fs: close file if fstat() fails in readFile() (cjihrig) * lib: name EventEmitter prototype methods (Ben Noordhuis) * tls: fix performance issue (Alexis Campailla)
2014-06-07src: replace usage of String::Utf8ValueTimothy J Fontaine
v8::String::Utf8Value previously could allow invalid surrogates when interpreting values.
2014-06-07string_bytes: Guarantee valid utf-8 outputFelix Geisendörfer
Previously v8's WriteUtf8 function would produce invalid utf-8 output when encountering unmatched surrogate code units [1]. The new REPLACE_INVALID_UTF8 option fixes that by replacing invalid code points with the unicode replacement character. [1]: JS Strings are defined as arrays of 16 bit unsigned integers. There is no unicode enforcement, so one can easily end up with invalid unicode code unit sequences inside a string.
2014-05-16crypto: improve memory usageAlexis Campailla
ClientHelloParser used to contain an 18k buffer that was kept around for the life of the connection, even though it was not needed in many situations. I changed it to be deallocated when it's determined to be no longer needed. Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-05-14src: fix _XOPEN_SOURCE redefinition warningBen Noordhuis
Fix the following compiler warning on systems where _XOPEN_SOURCE is defined by default: ../src/node_constants.cc:35:0: warning: "_XOPEN_SOURCE" redefined #define _XOPEN_SOURCE 500 Move the (re)definition of _XOPEN_SOURCE to the top of the file while we're here. Commit 00890e4 adds a `#define _XOPEN_SOURCE 500` in order to make <fcntl.h> expose O_NONBLOCK but it does so after other system headers have been included. If those headers include <fcntl.h>, then the #include in node_constants.cc will be a no-op and O_NONBLOCK won't be visible. Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-05-02constants: export O_NONBLOCKFedor Indutny
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-05-02Now working on 0.10.29Timothy J Fontaine
2014-05-022014.05.01, Version 0.10.28 (Stable)v0.10.28Timothy J Fontaine
* npm: upgrade to v1.4.9
2014-05-02Now working on 0.10.28Timothy J Fontaine
2014-05-022014.05.01, Version 0.10.27 (Stable)v0.10.27Timothy J Fontaine
* npm: upgrade to v1.4.8 * openssl: upgrade to 1.0.1g * uv: update to v0.10.27 * dns: fix certain txt entries (Fedor Indutny) * assert: Ensure reflexivity of deepEqual (Mike Pennisi) * child_process: fix deadlock when sending handles (Fedor Indutny) * child_process: fix sending handle twice (Fedor Indutny) * crypto: do not lowercase cipher/hash names (Fedor Indutny) * dtrace: workaround linker bug on FreeBSD (Fedor Indutny) * http: do not emit EOF non-readable socket (Fedor Indutny) * http: invoke createConnection when no agent (Nathan Rajlich) * stream: remove useless check (Brian White) * timer: don't reschedule timer bucket in a domain (Greg Brail) * url: treat the same as / (isaacs) * util: format as Error if instanceof Error (Rod Vagg)
2014-04-10src: use monotonic time for process.uptime()Timothy J Fontaine
`process.uptime()` interface will return the amount of time the current process has been running. To achieve this it was caching the `uv_uptime` value at program start, and then on the call to `process.uptime()` returning the delta between the two values. `uv_uptime` is defined as the number of seconds the operating system has been up since last boot. On sunos this interface uses `kstat`s which can be a significantly expensive operation as it requires exclusive access, but because of the design of `process.uptime()` node *had* to always call this on start. As a result if you had many node processes all starting at the same time you would suffer lock contention as they all tried to read kstats. Instead of using `uv_uptime` to achieve this, the libuv loop already has a concept of current loop time in the form of `uv_now()` which is in fact monotonically increasing, and already stored directly on the loop. By using this value at start every platform performs at least one fewer syscall during initialization. Since the interface to `uv_uptime` is defined as seconds, in the call to `process.uptime()` we now `uv_update_time` get our delta, divide by 1000 to get seconds, and then convert to an `Integer`. In 0.12 we can move back to `Number::New` instead and not lose precision. Caveat: For some platforms `uv_uptime` reports time monotonically increasing regardless of system hibernation, `uv_now` interface is also monotonically increasing but may not reflect time spent in hibernation.
2014-03-26src: ensure that openssl's PRNG is fully seededBen Noordhuis
Ensure that OpenSSL has enough entropy (at least 256 bits) for its PRNG. The entropy pool starts out empty and needs to fill up before the PRNG can be used securely. OpenSSL normally fills the pool automatically but not when someone starts generating random numbers before the pool is full: in that case OpenSSL keeps lowering the entropy estimate to thwart attackers trying to guess the initial state of the PRNG. When that happens, we wait until enough entropy is available, something that normally should never take longer than a few milliseconds. Fixes #7338.
2014-03-26src: seed V8's random number generator at startupBen Noordhuis
The default entropy source is /dev/urandom on UNIX platforms, which is okay but we can do better by seeding it from OpenSSL's entropy pool. On Windows we can certainly do better; on that platform, V8 seeds the random number generator using only the current system time. Fixes #6250. NB: This is a back-port of commit 7ac2391 from the master branch that for some reason never got back-ported to the v0.10 branch. The default on UNIX platforms in v0.10 is different and arguably worse than it is with master: if no entropy source is provided, V8 3.14 calls srandom() with a xor of the PID and the current time in microseconds. That means that on systems with a coarse system clock, the initial state of the PRNG may be easily guessable. The situation on Windows is even more dire because there the PRNG is seeded with only the current time... in milliseconds.
2014-03-05src: add default visibility to NODE_MODULEBen Noordhuis
It's currently not really possible to compile native add-ons with -fvisibility=hidden because that also hides the struct containing the module definition. The NODE_MODULE() and NODE_MODULE_DECL() macros are structured in a way that makes it impossible to add a visibility attribute manually so there is no escape hatch there. That's why this commit adds an explicit visibility attribute to the module definition. It doesn't help with node.js releases that are already out there but at least it improves the situation going forward.
2014-03-04src: domain should not replace nextTick functionTimothy J Fontaine
Previously if you cached process.nextTick and then require('domain') subsequent nextTick() calls would not be caught because enqueued functions were taking the wrong path. This keeps nextTick to a single function reference and changes the implementation details after domain has been required.
2014-02-21dtrace: workaround linker bug on FreeBSDFedor Indutny
2014-02-19Now working on v0.10.27Timothy J Fontaine
2014-02-192014.02.18, Version 0.10.26 (Stable)Timothy J Fontaine
* uv: Upgrade to v0.10.25 (Timothy J Fontaine) * npm: upgrade to 1.4.3 (isaacs) * v8: support compiling with VS2013 (Fedor Indutny) * cares: backport TXT parsing fix (Fedor Indutny) * crypto: throw on SignFinal failure (Fedor Indutny) * crypto: update root certificates (Ben Noordhuis) * debugger: Fix breakpoint not showing after restart (Farid Neshat) * fs: make unwatchFile() insensitive to path (iamdoron) * net: do not re-emit stream errors (Fedor Indutny) * net: make Socket destroy() re-entrance safe (Jun Ma) * net: reset `endEmitted` on reconnect (Fedor Indutny) * node: do not close stdio implicitly (Fedor Indutny) * zlib: avoid assertion in close (Fedor Indutny)
2014-02-18zlib: introduce pending close stateFedor Indutny
zlib should not crash in `close()` if the write is still in progress. fix #7101
2014-02-09src: refactor buffer bounds checkingTimothy J Fontaine
Consolidate buffer bounds checking logic into Buffer namespace and use it consistently throughout the source.
2014-02-04crypto: update root certificatesBen Noordhuis
Update the list of root certificates in src/node_root_certs.h with tools/mk-ca-bundle.pl and update src/node_crypto.cc to make use of the new format. Fixes #6013.
2014-02-01dtrace: fix arguments warningFedor Indutny
Add enough arguments to `NODE_NET_SOCKET_READ()` and `NODE_NET_SOCKET_WRITE()` stubs.
2014-01-30node: do not ever close stdioFedor Indutny
Even if stdio streams are opened as file streams, we should not ever try to close them. This could be accomplished by passing `autoClose: false` in options on their creation.
2014-01-26crypto: throw on SignFinal failureFedor Indutny
fix #6963
2014-01-23Now working on 0.10.26Timothy J Fontaine
2014-01-232014.01.23, Version 0.10.25 (Stable)Timothy J Fontaine
* uv: Upgrade to v0.10.23 * npm: Upgrade to v1.3.24 * v8: Fix enumeration for objects with lots of properties * child_process: fix spawn() optional arguments (Sam Roberts) * cluster: report more errors to workers (Fedor Indutny) * domains: exit() only affects active domains (Ryan Graham) * src: OnFatalError handler must abort() (Timothy J Fontaine) * stream: writes may return false but forget to emit drain (Yang Tianyang)
2014-01-12src: return empty set on ENOSYS for interfacesTimothy J Fontaine
If node was compiled with --no-ifaddrs to support older operating systems, don't throw instead simply return an empty object Fixes #6846
2014-01-10src: OnFatalError handler must abort()Timothy J Fontaine
We are in an unrecoverable state if v8 throws a FatalError, actually ask the operating system to dump core in this case. Fixes #6836
2013-12-19Now working on 0.10.25Timothy J Fontaine
2013-12-192013.12.18, Version 0.10.24 (Stable)v0.10.24Timothy J Fontaine
* 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-12Now working on 0.10.24Timothy J Fontaine
2013-12-122013.12.12, Version 0.10.23 (Stable)v0.10.23Timothy J Fontaine
* 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-10fs: report correct path when EEXISTFedor Indutny
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-10tls: emit 'end' on .receivedShutdownFedor Indutny
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-02process: document kill(0), disallow kill(O_RDWR)Sam Roberts
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-02tls: reset NPN callbacks after SNIFedor Indutny
SNI callback selects a new SSL_CTX for the connection, which doesn't have NPN callbacks set up.
2013-11-27stream_wrap: don't call Number::New()Ben Noordhuis
Replace call to Number::New() with a call to Integer::NewFromUnsigned(). Profiling a Real World(TM) application with perf(1) suggests that the conversion of its argument from integer to double is disproportionally costly: over 60% of CPU cycles accountable to WriteStringImpl() are attributable to the conversion. After changing it to Integer::NewFromUnsigned(), WriteStringImpl() has dropped from the 'most costly functions' top ten altogether.
2013-11-19dgram: fix abort when getting `fd` of closed dgramFedor Indutny
v8's `messages.js` file's `CallSiteGetMethodName` is running through all object properties and getter to figure out method name of function that appears in stack trace. This run-through will also read `fd` property of `UDPWrap` instance's javascript object, making `UNWRAP()` fail. As a simple alternative to the test case above, one could just keep reference to the dgram handle and try accessing `handle.fd` after it has been fully closed. fix #6536
2013-11-13Now working on 0.10.23Timothy J Fontaine
2013-11-132013.11.12, Version 0.10.22 (Stable)v0.10.22Timothy J Fontaine
* npm: Upgrade to 1.3.14 * uv: Upgrade to v0.10.19 * child_process: don't assert on stale file descriptor events (Fedor Indutny) * darwin: Fix "Not Responding" in Mavericks activity monitor (Fedor Indutny) * debugger: Fix bug in sb() with unnamed script (Maxim Bogushevich) * repl: do not insert duplicates into completions (Maciej Małecki) * src: Fix memory leak on closed handles (Timothy J Fontaine) * tls: prevent stalls by using read(0) (Fedor Indutny) * v8: use correct timezone information on Solaris (Maciej Małecki)