0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 15:30:56 +01:00
Commit Graph

196 Commits

Author SHA1 Message Date
Glen Keane
5e825d1073 tracing: add lttng support for tracing on linux
This commit adds the ability to enable userspace tracing with lttng
in io.js. It adds tracepoints for all the equivalent dtrace and ETW
tracepoints. To use these tracepoints enable --with-lttng on linux.

PR-URL: https://github.com/iojs/io.js/pull/702
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ryan Graham <ryan@strongloop.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2015-02-09 18:06:57 +01:00
Fedor Indutny
6a5d731f60 gyp: enable postmortem support, fix dtrace paths
Fix: iojs/io.js#461
PR-URL: https://github.com/iojs/io.js/pull/706
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-02-03 19:25:27 +03:00
Ben Noordhuis
4f68369643 build: disable v8 snapshots
Snapshots speed up start-up by a few milliseconds but are potentially
dangerous because of the fixed hash seed that is used for strings and
dictionaries, making collision denial-of-service attacks possible.

Release builds on iojs.org have snapshots disabled but source builds
did not, until now.

The risk for individual source builds is low; the binary gets a random
32 bits hash seed that should be hard to guess by an external attacker.

It's when binaries are distributed by, for example, a distro vendor
that the fixed hash seed becomes a vulnerability, because then it's
possible to target a large group of people at once.

People that really need the faster start-up time can use the new
--with-snapshot configure flag.

PR-URL: https://github.com/iojs/io.js/pull/585
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: Rod Vagg <rod@vagg.org>
2015-01-27 00:54:02 +01:00
Bert Belder
4af5746993 win,build: remove duplicate definition
The duplicate warning was fixed by e1fe270, but returned as of 9f45799.
Hopefully this will fix the issue for good.

PR: https://github.com/iojs/io.js/pull/512
Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-19 20:12:12 +01:00
Bert Belder
e8d08503c7 win: bring back xp/2k3 support
Chrome still runs on Windows XP, so there is no reason that iojs
couldn't.

PR: https://github.com/iojs/io.js/pull/512
Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-19 20:12:11 +01:00
Vladimir Kurchatkin
9f45799dd2 build: fix process.platform
e1fe270 introduces the NODE_PLATFORM macro which had to be redefined in
node.gyp for `process.platform` to return expected values.

PR-URL: https://github.com/iojs/io.js/pull/271
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Bert Belder <bertbelder@gmail.com>
2015-01-09 19:52:51 +01:00
Ben Noordhuis
f17f473af5 build: rename binary from node to iojs
* rename the build targets

* update the test runner to use `out/{Debug,Release}/iojs`

* update the installer to install the iojs binary

* update one test that explicitly checks for the binary name

PR-URL: https://github.com/iojs/io.js/pull/262
Reviewed-By: Bert Belder <bertbelder@gmail.com>
2015-01-08 23:21:20 +01:00
Bert Belder
e1fe270fd7 src: prefix ARCH and PLATFORM with NODE_
The PLATFORM preprocessor symbol is defined in node.gyp, and on Windows
it's set to "win". This conflicts with a built-in preprocessor symbol
with a different value ("win32"), which makes the linker(!) complain.
Resolve this by renaming these symbols to NODE_ARCH and NODE_PLATFORM.

PR-URL: https://github.com/iojs/io.js/pull/261
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-08 14:17:24 +01:00
Ben Noordhuis
94e147500c Merge remote-tracking branch 'joyent/v0.12' into v1.x
I was originally going to do this after the v0.11.15 release, but as
that release is three weeks overdue now, I decided not to wait any
longer; we don't want the delta to get too big.

Conflicts:
	lib/net.js
	test/simple/simple.status

PR-URL: https://github.com/iojs/io.js/pull/236
Reviewed-By: Bert Belder <bertbelder@gmail.com>
Reviewed-By: Fedor Indutny <fedor@indutny.com>
2015-01-05 17:26:47 +01:00
Aleksey Smolenchuk
d8586eab7e lib: introduce process module
This makes require('process') always return a reference to the global
process object.

PR-URL: https://github.com/iojs/io.js/pull/206
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-12-30 23:29:32 +01:00
Ben Noordhuis
db595b2de6 lib: reintroduce v8 module
I introduced this module over a year ago in a pull request as the v8
module but it was quickly subsumed by the tracing module.

The tracing module was recently removed again and that is why this
commit introduces the v8 module again, including the new features it
picked up commits d23ac0e and f8076c4.

PR-URL: https://github.com/iojs/io.js/pull/131
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
Reviewed-By: Christian Tellnes <christian@tellnes.no>
Reviewed-By: Thorsten Lorenz <thlorenz@gmx.de>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
2014-12-14 18:52:57 +01:00
Ben Noordhuis
0fbe528243 build: fix dtrace-enabled build on os x
Commit 691d55f introduces a regression on OS X when dtrace is enabled
(the default.)  This commit rectifies that by removing the erroneous
platform check.

Fixes the following build error:

    CXX(target) /Users/bnoordhuis/src/iojs/out/Release/obj.target/node/src/node_dtrace.o
    ../src/node_dtrace.cc:27:10: fatal error: 'node_provider.h' file not found

PR-URL: https://github.com/iojs/io.js/pull/150
Reviewed-By: Miroslav Bajtoš <miro.bajtos@gmail.com>
2014-12-11 18:22:02 +01:00
Julien Gilli
4dc660e164 build: do not generate support for libuv's probes
Dtrace probes were removed from libuv recently, but their usage by node
was not completely removed, causing build breaks on SmartOS.

Even though the build is working on other platforms, these probes are
not fired by libuv anymore, so there's no point in using them on these
platforms too.

Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-12-09 12:06:33 -08:00
Evan Torrie
691d55feca build: fix build with systemtap providers enabled
The "dtrace" script version include in systemtap-sdt-devel-2.6-3
(part of Fedora 21) no longer ignores unknown command line
arguments, but will instead error out and refuse to run.
This patch adds a separate condition to node's gyp input so
that on Linux it will run dtrace without the -xnolibs
argument that trips it up on systemtap-std-devel-2.6-3.

PR-URL: https://github.com/joyent/node/pull/8846
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-12-09 18:34:12 +01:00
Bert Belder
2b6a0f85f3 src: remove the tracing module entirely
PR-URL: https://github.com/iojs/io.js/pull/124
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-12-09 17:57:19 +01:00
Trevor Norris
5d17b16ecc async-wrap: move MakeCallback to .cc
MakeCallback is too large a function to be inlined. Likewise, only
having header files will not allow for any part of AsyncWrap to be
exposed cleanly via NODE_MODULE_CONTEXT_AWARE_BUILTIN().

PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-09 17:57:13 +01:00
Trevor Norris
2593c14131 async-wrap: move MakeCallback to .cc
MakeCallback is too large a function to be inlined. Likewise, only
having header files will not allow for any part of AsyncWrap to be
exposed cleanly via NODE_MODULE_CONTEXT_AWARE_BUILTIN().

PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-05 04:35:44 -08:00
Trevor Norris
b6559553a4 src: remove Async Listener
Async Listener was the name of the user-facing JS API, and is being
completely removed. Instead low level hooks directly into the mechanism
that AL used will be introduced in a future commit.

PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
2014-12-05 04:33:26 -08:00
Johan Bergström
766d063e05 configure: remove shared cares build option
Bundled cares differs from upstream which will result
in a compilation error when trying to used a shared cares.

Fixes: https://github.com/joyent/node/pull/8786
PR-URL: https://github.com/iojs/io.js/pull/38
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2014-12-04 21:20:28 +11:00
Ben Noordhuis
29d7fd6bb8 src: move debug agent from deps/ to src/
There is not much point in keeping it a separate project because it
doesn't build standalone, plus it makes applying changes to core more
difficult because of the implicit dependency on header files in src/.
2014-11-03 12:08:04 +01:00
Fedor Indutny
50839a042e v8_platform: provide default v8::Platform impl
Provide default Platform implementation for v8's purposes.
2014-10-12 02:05:02 +04:00
Ben Noordhuis
4fae2356d1 freebsd,linux,sunos: make stack non-executable
Link with -z,noexecstack to make stack memory non-executable.  Makes
shellcode injection through buffer overflows more difficult.

Fixes: https://github.com/joyent/node/issues/7542
PR-URL: https://github.com/node-forward/node/pull/8
Reviewed-By: Trevor Norris <trevnorris@gmail.com>
2014-10-09 23:33:00 +02:00
Fedor Indutny
7a0cfe9b11 deps: re-implement debugger-agent
Reviewed-By: Trevor Norris <trevnorris@gmail.com>
PR-URL: https://github.com/joyent/node/pull/8476
2014-10-08 15:44:40 +04:00
Fedor Indutny
6a610a0f67 deps: re-implement debugger-agent
Reviewed-By: Trevor Norris <trevnorris@gmail.com>
PR-URL: https://github.com/joyent/node/pull/8476
2014-10-08 15:36:08 +04:00
Steven R. Loomis
ac2857b12c build, i18n: improve Intl build, add "--with-intl"
The two main goals of this change are:
 - To make it easier to build the Intl option using ICU (particularly,
   using a newer ICU than v8/Chromium's version)
 - To enable a much smaller ICU build with only English support The goal
   here is to get node.js binaries built this way by default so that the
   Intl API can be used. Additional data can be added at execution time
   (see Readme and wiki)

More details are at https://github.com/joyent/node/pull/7719

In particular, this change adds the "--with-intl=" configure option to
provide more ways of building "Intl":
 - "full-icu" picks up an ICU from deps/icu
 - "small-icu" is similar, but builds only English
 - "system-icu" uses pkg-config to find an installed ICU
 - "none" does nothing (no Intl)

For Windows builds, the "full-icu" or "small-icu" options are added to
vcbuild.bat.

Note that the existing "--with-icu-path" option is not removed from
configure, but may not be used alongside the new option.

Wiki changes have already been made on
 https://github.com/joyent/node/wiki/Installation
and a new page created at
 https://github.com/joyent/node/wiki/Intl
(marked as provisional until this change lands.)

Summary of changes:

* README.md : doc updates

* .gitignore : added "deps/icu" as this is the location where ICU is
  unpacked to.

* Makefile : added the tools/icu/* files to cpplint, but excluded a
  problematic file.

* configure : added the "--with-intl" option mentioned above.
  Calculate at config time the list of ICU source files to use and data
  packaging options.

* node.gyp : add the new files src/node_i18n.cc/.h as well as ICU
  linkage.

* src/node.cc : add call into
  node::i18n::InitializeICUDirectory(icu_data_dir) as well as new
  --icu-data-dir option and NODE_ICU_DATA env variable to configure ICU
  data loading. This loading is only relevant in the "small"
  configuration.

* src/node_i18n.cc : new source file for the above Initialize..
  function, to setup ICU as needed.

* tools/icu : new directory with some tools needed for this build.

* tools/icu/icu-generic.gyp : new .gyp file that builds ICU in some new
  ways, both on unix/mac and windows.

* tools/icu/icu-system.gyp : new .gyp file to build node against a
  pkg-config detected ICU.

* tools/icu/icu_small.json : new config file for the "English-only" small
  build.

* tools/icu/icutrim.py : new tool for trimming down ICU data. Reads the
  above .json file.

* tools/icu/iculslocs.cc : new tool for repairing ICU data manifests
  after trim operation.

* tools/icu/no-op.cc : dummy file to force .gyp into using a C++ linker.

* vcbuild.bat : added small-icu and full-icu options, to call into
  configure.

* Fixed toolset dependencies, see
  https://github.com/joyent/node/pull/7719#issuecomment-54641687

Note that because of a bug in gyp {CC,CXX}_host must also be set.
Otherwise gcc/g++ will be used by default for part of the build.

Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
2014-10-01 12:16:51 -07:00
Alexis Campailla
03e93526e6 win: manifest node.exe for Windows 8.1
Adding a compatibility section to node.exe embedded manifest so that
Node is declared explicitly compatible with Windows 8.1. Required so
that os.release() can return the correct version on Windows 8.1.

See http://msdn.microsoft.com/en-us/library/windows/desktop/ms724451(v=vs.85).aspx

Reviewed-by: Trevor Norris <trev.norris@gmail.com>
2014-09-17 14:26:35 -07:00
Fedor Indutny
9134a3bf41 gyp: preserve v8dbg syms on freebsd too 2014-08-17 14:17:30 +04:00
Thorsten Lorenz
b1741ea1fa build: linking CoreFoundation framework for OSX
Linking CoreFoundation for OSX is needed for OSX debugging features to
function properly.

For instance Instruments cannot record Heap Allocations if the
CoreFoundation is not linked.

Reviewed-By: Fedor Indutny <fedor@indutny.com>
2014-08-08 18:03:04 +04:00
Timothy J Fontaine
a5778cdf01 Merge remote-tracking branch 'upstream/v0.10' into v0.12
Conflicts:
	ChangeLog
	Makefile
	deps/uv/ChangeLog
	deps/uv/build.mk
	deps/uv/src/unix/darwin.c
	deps/uv/src/unix/getaddrinfo.c
	deps/uv/src/version.c
	deps/v8/src/checks.h
	deps/v8/src/isolate.h
	lib/cluster.js
	lib/module.js
	lib/timers.js
	lib/tls.js
	src/node_version.h
2014-08-07 16:33:35 -07:00
Fedor Indutny
9f36c0d235 gyp: do not rm unused openssl syms on osx/linux
fix #8026

Reviewed-By: Fedor Indutny <fedor@indutny.com>
2014-07-31 11:52:01 +04:00
Fedor Indutny
f310c0f16b Merge remote-tracking branch 'origin/v0.10' into master
Conflicts:
	doc/api/buffer.markdown
	lib/_stream_readable.js
	lib/assert.js
	lib/buffer.js
	lib/child_process.js
	lib/http.js
	lib/string_decoder.js
	lib/zlib.js
	node.gyp
	test/simple/test-buffer.js
	test/simple/test-https-foafssl.js
	test/simple/test-stream2-compatibility.js
	test/simple/test-tls-server-verify.js
2014-07-29 12:51:27 +04:00
Fedor Indutny
93390ffc20 test: fix test-tls-server-verify
fix #7963
2014-07-23 23:51:14 +04:00
Fedor Indutny
4c48df5a35 gyp: fix post-mortem in v0.11
Expose missing constants and keep symbols on OSX.
2014-07-23 16:25:50 +04:00
Fedor Indutny
1d3d8c0e55 gyp: do not let v8dbg_ slip away on osx
Pass `-force_load` to linker when linking to `libv8_base` to preserve
`v8dbg_` symbols, which are useful for debugging.
2014-07-17 15:16:29 +04:00
Fedor Indutny
832d4db5f2 contextify: remove useless header file
fix #7910
2014-07-08 21:43:48 +03:00
Timothy J Fontaine
1a09da6ec2 Merge remote-tracking branch 'upstream/v0.10'
Conflicts:
	AUTHORS
	ChangeLog
	deps/v8/src/api.cc
	deps/v8/src/unicode-inl.h
	deps/v8/src/unicode.h
	lib/_stream_readable.js
	lib/http.js
	src/cares_wrap.cc
	src/node.cc
	src/node_crypto.cc
	src/node_dtrace.cc
	src/node_file.cc
	src/node_stat_watcher.cc
	src/node_version.h
	src/process_wrap.cc
	src/string_bytes.cc
	src/string_bytes.h
	src/udp_wrap.cc
	src/util.h
	test/simple/test-buffer.js
	test/simple/test-stream2-compatibility.js
2014-06-10 19:36:04 -04:00
Ben Noordhuis
490d5ab780 configure: make --v8-options switch more robust
Improve on commit b55c9d6 by not requiring that switches are comma
separated.  This commit makes `./configure --v8-options="--foo --bar"`
work and takes special care to properly escape quotes in the options
string.
2014-04-01 18:55:52 +04:00
Fedor Indutny
5d2aef17ee
crypto: move createCredentials to tls
Move `createCredentials` to `tls` module and rename it to
`createSecureContext`. Make it use default values from `tls` module:
`DEFAULT_CIPHERS` and `DEFAULT_ECDH_CURVE`.

fix #7249
2014-03-29 12:01:43 +04:00
Fedor Indutny
b55c9d68aa configure: --v8-options option
Introduce a way to set some v8 flags at compile time, the values should
be separated by comma.
2014-03-29 11:51:41 +04:00
Ben Noordhuis
7989f42f86 build: fix g++ 4.8 build, disable -Werror
Turn off -Werror when building V8, it hits -Werror=unused-local-typedefs
with g++ 4.8.  The warning itself is harmless so don't abort the build.

This was originally implemented in commit d2ab314e back in 2011 but the
build process has gone through a few iterations since then, that change
no longer works.
2014-03-23 16:11:08 -07:00
Fedor Indutny
78d245f5b2 Merge remote-tracking branch 'origin/v0.10'
Conflicts:
	configure
	lib/_stream_readable.js
	lib/http.js
	src/node_dtrace.cc
2014-03-02 23:54:19 +04:00
Fedor Indutny
b940e0fd86 gyp: specialize node.d for freebsd
`node.d` should use `psinfo.d` instead of `procfs.d` and have statically
defined architecture on FreeBSD.
2014-02-21 00:46:26 +04:00
Bert Belder
fa4eb47caa bindings: add spawn_sync bindings
This implements a nested event loop that makes it possible to control
a child process, while blocking the main loop until the process exits.
2014-02-10 21:22:06 +01:00
Ben Noordhuis
010222d39f src: add tracing.v8.on('gc') statistics hooks
Add a new 'tracing' module with a v8 property that lets the user
register listeners for gc events.  The listeners are invoked after
every garbage collection cycle with 'before' and 'after' statistics.
Useful for monitoring tools that want to keep track of memory usage.
2014-02-05 11:49:01 -08:00
Keith M Wesolowski
76b98462e5 node: register modules from DSO constructors
Built-in modules should be automatically registered, replacing the
static module list.  Add-on modules should also be automatically
registered via DSO constructors.  This improves flexibility in adding
built-in modules and is also a prerequisite to pure-C addon modules.
2014-01-27 15:52:50 -08:00
Timothy J Fontaine
c1b1f31203 Merge remote-tracking branch 'upstream/v0.10'
Conflicts:
	AUTHORS
	ChangeLog
	deps/uv/AUTHORS
	deps/uv/ChangeLog
	deps/uv/src/unix/process.c
	deps/uv/src/version.c
	lib/net.js
	node.gyp
	src/node_version.h
2014-01-24 19:13:50 -08:00
Fedor Indutny
61c0d571bf gyp: fix ninja build on linux
fix #6679
2014-01-16 17:11:04 +00:00
Ben Noordhuis
f057c7049e build: unconditionally disable -Werror
Forcibly disable -Werror, the old { 'werror': '' } hack in node.gyp
no longer works with newer versions of V8.

We support a wide range of compilers, it's simply not feasible to
squelch all warnings, never mind that the libraries in deps/ are
not under our control.

Fixes #6817.
2014-01-07 23:35:04 +04:00
Fedor Indutny
6f3d60388e gyp: build openssl-cli tool and use it in tests
fix #6663
2013-12-11 21:21:10 +04:00
Fedor Indutny
1e066e4a4a Merge branch 'v0.10'
Conflicts:
	lib/tls.js
	src/node_crypto.cc
	src/node_crypto.h
2013-12-10 23:06:56 +04:00