Welcome to this week’s wrap up of the week in Node and libuv covering June 20 through July 10. The purpose of this blog is to recap a subset of the non-documentation related commits to Node.js, plus give a little color and commentary to the ongoing development of Node.
Node v0.10 branch highlights
zlib: allow zero values for level and strategy
http: use an unref’d timer to fix delay in exit
Peter Rust fixed a bug in 16b59cb that would keep a Node.js process open for up to a second longer than needed. Although this was not very noticeable, fixing it had a profound impact on the duration of
make test. Reducing the running time of the test suite by about 30-40%.
src: fix memory leak in UsingDomains()
In commit 806e30, Ben fixed a memory leak in the ‘domains’ initialization code, which is the built-in error handling mechanism in Node. The exact size of the leak depends on the scope of the lexical closure of the process._tickCallback() function…something that’s worthy of a blog post itself! As Ben points out, “over-capturing closures are a frequent source of memory leaks in Node.js code.”
http: Dump response when request aborted
tls: only wait for finish if we haven’t seen it
You can view the complete Nodev0.10 commit history on GitHub.
Node master branch highlights
buffer: fix gcc 4.2 build breakage
Ben fixed the build (or rather, worked around a compiler bug) in 157d2bc. gcc 4.2 as shipped with Xcode got terminally confused about a call to node::Buffer::Data().
child_process: emit ‘disconnect’ asynchronously
Ben committed b255f4c, in which the ‘disconnect’ event for child processes is now always emitted asynchronously.
crypto: do not move half-filled write head
node.cc: break on uncaught exceptions
zlib: allow custom flush type for flush()
Brian made it possible in 086d4cc to pass a custom flush type to Zlib.flush().
crypto: fix memory leak in LoadPKCS12
slab_allocator: remove SlabAllocator
Trevor removed the slab allocator in ec90e6e. It was used to avoid the overhead of having to call malloc/free all the time, but the new Buffer implementation is fast enough that it’s no longer necessary.
stream: objectMode transform should allow falsey values
v8: upgrade to v3.20.2
build: remove -unsafe-optimizations flag
Ben removed the –unsafe-optimizations configure flag in 9b3de60. Node.js is now always built with flags that have been known to trigger bugs in some gcc/binutils combinations (the commit log goes into some detail about this.) If you experience crashes, either upgrade your toolchain or download a pre-compiled binary from http://nodejs.org/
deps: upgrade c-ares to piscisaureus/cares@805d153
Ben upgraded the bundled copy of c-ares in 58e4eda. It should now be possible to build Node.js for Android without having to jump through extra hoops.
configure: fix the –without-ssl option
You can view the complete Node master commit history on GitHub.
libuv v0.10 branch highlights
Version 0.10.12 (Stable)
A new release of libuv dropped on July 10, 2013. Official release notes in 58a462.
build: ‘all’ now builds static and dynamic lib
Ben committed 88a2c7f so that
make all now builds both the shared and the static library.
unix: fix build when !defined(PTHREAD_MUTEX_ERRORCHECK)
Ben fixed the build with very old versions of glibc, circa 2002 with commit 37d0209.
You can view the complete libuv v0.10 commit history on GitHub.
libuv master branch highlights
build: add install target to the makefile
build: switch to autotools
Navaneeth Kedaram Nambiathan added
make install target to the Makefile in 624be53 but it wasn’t meant to be, as Ben switched the build system to autotools. As Ben describes them, “the build tool everyone loves to hate!”) in ddd7e04. the rationale is in the changelog.
build: use AM_PROG_AR conditionally
build: use AM_SILENT_RULES conditionally
There were of course a few fix-ups after a big change like d2f67b9. Specifically, (“build: use AM_PROG_AR conditionally”) and 3b9cfe2 (“build: use AM_SILENT_RULES conditionally”) which work around issues with old autotools versions.
build: add DTrace detection for autotools
TJ Fontaine added dtrace support again in 2f3124a.
linux, darwin, win: link-local IPv6 addresses
Miroslav added support for link-local addresses to uv_ip6_addr() in fd45f87.
unix, windows: return error codes directly
And last but not least, Ben changed libuv in 3ee4d3f to return error codes directly rather than through a loop-global field. This was another big commit (109 files changed, 2586 insertions(+), 2438 deletions(-)).
You can view the complete libuv master commit history on GitHub.
This week’s blogs, tutorials, how-to’s and news
- Node.js Infographic with data points galore!
- NodeFly Node.js News Round Up July 11, 2013 by NodeFly
- Ready to develop APIs in Node.js and get them connected to your data? Check out the Node.js LoopBack framework. We’ve made it easy to get started either locally or on your favorite cloud, with a simple npm install.