From 626db18635d9cdb3c1ed6766b94eef5a2520bdab Mon Sep 17 00:00:00 2001 From: Olivier Lalonde Date: Wed, 24 Oct 2012 00:45:10 +0800 Subject: [PATCH 1/6] doc: child_process: document uid and gid spawn() options --- doc/api/child_process.markdown | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/api/child_process.markdown b/doc/api/child_process.markdown index d4616e63c23..4417ed77e11 100644 --- a/doc/api/child_process.markdown +++ b/doc/api/child_process.markdown @@ -250,6 +250,8 @@ there is no IPC channel keeping it alive. When calling this method the for stdio. (See below) * `env` {Object} Environment key-value pairs * `detached` {Boolean} The child will be a process group leader. (See below) + * `uid` {Number} Sets the user identity of the process. (See setuid(2).) + * `gid` {Number} Sets the group identity of the process. (See setgid(2).) * return: {ChildProcess object} Launches a new process with the given `command`, with command line arguments in `args`. From f34f1e30a69ae52cd2ccf7bec639e365b961a548 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Wed, 24 Oct 2012 02:42:57 +0200 Subject: [PATCH 2/6] repl: call resume() after setRawMode() Solves #4178, but does not fix the underlying issue --- lib/readline.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/readline.js b/lib/readline.js index d9a6fcdb4a5..8457ad666c8 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -75,7 +75,6 @@ function Interface(input, output, completer, terminal) { this.output = output; this.input = input; - input.resume(); // Check arity, 2 - for async, 1 for sync this.completer = completer.length === 2 ? completer : function(v, callback) { @@ -137,6 +136,8 @@ function Interface(input, output, completer, terminal) { output.removeListener('resize', onresize); }); } + + input.resume(); } inherits(Interface, EventEmitter); From 82a72e9591b6970685a113a59a647fb79fc104ca Mon Sep 17 00:00:00 2001 From: isaacs Date: Wed, 24 Oct 2012 10:08:58 -0700 Subject: [PATCH 3/6] blog: Post for v0.9.3 release --- doc/blog/release/v0.9.3.md | 87 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 doc/blog/release/v0.9.3.md diff --git a/doc/blog/release/v0.9.3.md b/doc/blog/release/v0.9.3.md new file mode 100644 index 00000000000..47e3140aa6d --- /dev/null +++ b/doc/blog/release/v0.9.3.md @@ -0,0 +1,87 @@ +category: release +version: v0.9.3 +date: Wed Oct 24 10:04:08 PDT 2012 +slug: node-v0.9.3 +title: Node v0.9.3 (Unstable) + +2012.10.24, Version 0.9.3 (Unstable) + +* V8: Upgrade to 3.13.7.4 + +* crypto: Default to buffers instead of binary strings (isaacs, Fedor Indutny) + +* crypto: add getHashes() and getCiphers() (Ben Noordhuis) + +* unix: add custom thread pool, remove libeio (Ben Noordhuis) + +* util: make `inspect()` accept an "options" argument (Nathan Rajlich) + +* https: fix renegotation attack protection (Ben Noordhuis) + +* cluster: make 'listening' handler see actual port (Aaditya Bhatia) + +* windows: use USERPROFILE to get the user's home dir (Bert Belder) + +* path: add platform specific path delimiter (Paul Serby) + +* http: add response.headersSent property (Pavel Lang) + +* child_process: make .fork()'d child auto-exit (Ben Noordhuis) + +* events: add 'removeListener' event (Ben Noordhuis) + +* string_decoder: Add 'end' method, do base64 properly (isaacs) + +* buffer: include encoding value in exception when invalid (Ricky Ng-Adam) + +* http: make http.ServerResponse no longer emit 'end' (isaacs) + +* streams: fix pipe is destructed by 'end' from destination (koichik) + + +Source Code: http://nodejs.org/dist/v0.9.3/node-v0.9.3.tar.gz + +Macintosh Installer (Universal): http://nodejs.org/dist/v0.9.3/node-v0.9.3.pkg + +Windows Installer: http://nodejs.org/dist/v0.9.3/node-v0.9.3-x86.msi + +Windows x64 Installer: http://nodejs.org/dist/v0.9.3/x64/node-v0.9.3-x64.msi + +Windows x64 Files: http://nodejs.org/dist/v0.9.3/x64/ + +Linux 32-bit Binary: http://nodejs.org/dist/v0.9.3/node-v0.9.3-linux-x86.tar.gz + +Linux 64-bit Binary: http://nodejs.org/dist/v0.9.3/node-v0.9.3-linux-x64.tar.gz + +Solaris 32-bit Binary: http://nodejs.org/dist/v0.9.3/node-v0.9.3-sunos-x86.tar.gz + +Solaris 64-bit Binary: http://nodejs.org/dist/v0.9.3/node-v0.9.3-sunos-x64.tar.gz + +Other release files: http://nodejs.org/dist/v0.9.3/ + +Website: http://nodejs.org/docs/v0.9.3/ + +Documentation: http://nodejs.org/docs/v0.9.3/api/ + +Shasums: + +``` +188b3ffacdc4342dc3c34e7ea8374acc3e186df0 node-v0.9.3-darwin-x64.tar.gz +94ae90f06a5bf72bb6efa8053c0beefde21f8bd7 node-v0.9.3-darwin-x86.tar.gz +ccb065fe242f15ffe35ecd7b22db33d11d6a5951 node-v0.9.3-linux-x64.tar.gz +0febfb1c37a3560b0140f7f952042aa4b4712974 node-v0.9.3-linux-x86.tar.gz +4362fdfefa0ed2985045883cea51ab802555c24c node-v0.9.3-sunos-x64.tar.gz +f43b6ce2a5da3bb384f6c115826cd2fea5f4bc2c node-v0.9.3-sunos-x86.tar.gz +ff6a7f8ff1a6d1af299a2702e09eec2cdfef474a node-v0.9.3-x86.msi +d47f953ee97047e1202350db2b11fb880ce2809b node-v0.9.3.pkg +34b7406e1da49bf0f0967e5a084157fdf8735078 node-v0.9.3.tar.gz +d0829f57b8460807cf58b2154b16176ef68189b1 node.exe +76007380d1f5cefd772b5890cd64f409ba85893e node.exp +fbe95014f9f4e2c5a38bc67b75511683f4a17fa9 node.lib +8c405af98ce922bf9bd82d29723aa343f3ca5488 node.pdb +04c1dce1188f4c52adfda0bc8219c478ed6553a8 x64/node-v0.9.3-x64.msi +fe6af3bd1405ecdef826a31a7c1333819aab4f3b x64/node.exe +abc9afb5ac40276346072f85601bd1a9e5135856 x64/node.exp +41622dce275f0f0f740485cca8d86ba3e63c884e x64/node.lib +8c34040ba4aa916d13c8313514cf93f99f5e3e34 x64/node.pdb +``` From de0303d3ad530d6a4f9b48fb5ac46795cfe4663f Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Tue, 23 Oct 2012 14:06:04 +0200 Subject: [PATCH 4/6] url: parse hostnames that start with - or _ Allow hostnames like '-lovemonsterz.tumblr.com' and '_jabber._tcp.google.com'. Fixes #4177. --- lib/url.js | 4 +- test/simple/test-url.js | 91 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 92 insertions(+), 3 deletions(-) diff --git a/lib/url.js b/lib/url.js index 50eb8b20f66..77686ed0f60 100644 --- a/lib/url.js +++ b/lib/url.js @@ -50,8 +50,8 @@ var protocolPattern = /^([a-z0-9.+-]+:)/i, .concat(unwise).concat(autoEscape), nonAuthChars = ['/', '@', '?', '#'].concat(delims), hostnameMaxLen = 255, - hostnamePartPattern = /^[a-zA-Z0-9][a-z0-9A-Z_-]{0,62}$/, - hostnamePartStart = /^([a-zA-Z0-9][a-z0-9A-Z_-]{0,62})(.*)$/, + hostnamePartPattern = /^[a-z0-9A-Z_-]{0,63}$/, + hostnamePartStart = /^([a-z0-9A-Z_-]{0,63})(.*)$/, // protocols that can allow "unsafe" and "unwise" chars. unsafeProtocol = { 'javascript': true, diff --git a/test/simple/test-url.js b/test/simple/test-url.js index ff4a8449eb0..764a541b6aa 100644 --- a/test/simple/test-url.js +++ b/test/simple/test-url.js @@ -651,7 +651,96 @@ var parseTests = { 'hash': '#abc', 'pathname': '/a/b', 'path': '/a/b?a=b' - } + }, + + 'http://-lovemonsterz.tumblr.com/rss': { + 'protocol': 'http:', + 'slashes': true, + 'host': '-lovemonsterz.tumblr.com', + 'hostname': '-lovemonsterz.tumblr.com', + 'href': 'http://-lovemonsterz.tumblr.com/rss', + 'pathname': '/rss', + 'path': '/rss', + }, + + 'http://-lovemonsterz.tumblr.com:80/rss': { + 'protocol': 'http:', + 'slashes': true, + 'port': '80', + 'host': '-lovemonsterz.tumblr.com:80', + 'hostname': '-lovemonsterz.tumblr.com', + 'href': 'http://-lovemonsterz.tumblr.com:80/rss', + 'pathname': '/rss', + 'path': '/rss', + }, + + 'http://user:pass@-lovemonsterz.tumblr.com/rss': { + 'protocol': 'http:', + 'slashes': true, + 'auth': 'user:pass', + 'host': '-lovemonsterz.tumblr.com', + 'hostname': '-lovemonsterz.tumblr.com', + 'href': 'http://user:pass@-lovemonsterz.tumblr.com/rss', + 'pathname': '/rss', + 'path': '/rss', + }, + + 'http://user:pass@-lovemonsterz.tumblr.com:80/rss': { + 'protocol': 'http:', + 'slashes': true, + 'auth': 'user:pass', + 'port': '80', + 'host': '-lovemonsterz.tumblr.com:80', + 'hostname': '-lovemonsterz.tumblr.com', + 'href': 'http://user:pass@-lovemonsterz.tumblr.com:80/rss', + 'pathname': '/rss', + 'path': '/rss', + }, + + 'http://_jabber._tcp.google.com/test': { + 'protocol': 'http:', + 'slashes': true, + 'host': '_jabber._tcp.google.com', + 'hostname': '_jabber._tcp.google.com', + 'href': 'http://_jabber._tcp.google.com/test', + 'pathname': '/test', + 'path': '/test', + }, + + 'http://user:pass@_jabber._tcp.google.com/test': { + 'protocol': 'http:', + 'slashes': true, + 'auth': 'user:pass', + 'host': '_jabber._tcp.google.com', + 'hostname': '_jabber._tcp.google.com', + 'href': 'http://user:pass@_jabber._tcp.google.com/test', + 'pathname': '/test', + 'path': '/test', + }, + + 'http://_jabber._tcp.google.com:80/test': { + 'protocol': 'http:', + 'slashes': true, + 'port': '80', + 'host': '_jabber._tcp.google.com:80', + 'hostname': '_jabber._tcp.google.com', + 'href': 'http://_jabber._tcp.google.com:80/test', + 'pathname': '/test', + 'path': '/test', + }, + + 'http://user:pass@_jabber._tcp.google.com:80/test': { + 'protocol': 'http:', + 'slashes': true, + 'auth': 'user:pass', + 'port': '80', + 'host': '_jabber._tcp.google.com:80', + 'hostname': '_jabber._tcp.google.com', + 'href': 'http://user:pass@_jabber._tcp.google.com:80/test', + 'pathname': '/test', + 'path': '/test', + }, + }; for (var u in parseTests) { From 28e6403a56bcb5af4b4127c3e2fe87d2113ab3b7 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 25 Oct 2012 00:44:37 +0200 Subject: [PATCH 5/6] build: add --unsafe-optimizations configure switch Turns on -O3 and other optimizations that may produce buggy code with some toolchains. Use at your own risk. --- configure | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/configure b/configure index cfd11aa5aec..7211682ac11 100755 --- a/configure +++ b/configure @@ -176,6 +176,12 @@ parser.add_option("--with-arm-float-abi", help="Specifies which floating-point ABI to use. Valid values are: " "soft, softfp, hard") +# Using --unsafe-optimizations voids your warranty. +parser.add_option("--unsafe-optimizations", + action="store_true", + dest="unsafe_optimizations", + help=optparse.SUPPRESS_HELP) + (options, args) = parser.parse_args() @@ -345,6 +351,8 @@ def configure_node(o): o['variables']['node_prefix'] = os.path.expanduser(options.prefix or '') o['variables']['node_install_npm'] = b(not options.without_npm) o['variables']['node_install_waf'] = b(not options.without_waf) + o['variables']['node_unsafe_optimizations'] = ( + 1 if options.unsafe_optimizations else 0) o['default_configuration'] = 'Debug' if options.debug else 'Release' host_arch = host_arch_win() if os.name == 'nt' else host_arch_cc() From 4b8629db3717a587a44b373cd10351e005b190f3 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 25 Oct 2012 00:52:15 +0200 Subject: [PATCH 6/6] v8: remove optimization switches Remove compiler switches from $(TOPLEVEL)/deps/v8/build/common.gypi, we set them globally in $(TOPLEVEL)/common.gypi. Commit 29d12c73 accidentally reintroduced the switches again. In particular, the 'cflags!': ['-O2','-Os'] section forced building V8 without any optimizations, resulting in a steep (~66%) performance drop on some benchmarks. Fixes #4191. --- deps/v8/build/common.gypi | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/deps/v8/build/common.gypi b/deps/v8/build/common.gypi index 5d6132c7061..7b8a32b2053 100644 --- a/deps/v8/build/common.gypi +++ b/deps/v8/build/common.gypi @@ -339,16 +339,6 @@ 'conditions': [ ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" \ or OS=="android"', { - 'cflags!': [ - '-O2', - '-Os', - ], - 'cflags': [ - '-fdata-sections', - '-ffunction-sections', - '-fomit-frame-pointer', - '-O3', - ], 'conditions': [ [ 'gcc_version==44 and clang==0', { 'cflags': [