Commit Graph

2339 Commits

Author SHA1 Message Date
Fedor Indutny
23d130b209 Revert "inet: allow scope in uv_inet_pton ip6 check"
This reverts commit d30e3ab65a, because it
is a new feature!
2014-04-14 15:13:20 +04:00
Fedor Indutny
d30e3ab65a inet: allow scope in uv_inet_pton ip6 check
Note that isn't actually parsing it, since the output value is a
`struct in6_addr`.

see https://github.com/joyent/node/issues/7395
2014-04-14 12:45:42 +04:00
Saúl Ibarra Corretgé
b9d5396a40 windows: fix console signal handler refcount
Backport of 0c726e7 from master
2014-04-12 10:09:40 +02:00
Fedor Indutny
6855205ba5
Now working on v0.10.27
Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-04-07 15:28:59 +04:00
Fedor Indutny
d864907611
2014.04.07, Version 0.10.26 (Stable)
Changes since version 0.10.25:

* process: don't close stdio fds during spawn (Tonis Tiigi)

* build, windows: do not fail on Windows SDK Prompt (Marc Schlaich)

* build, windows: fix x64 configuration issue (Marc Schlaich)

* win: fix buffer leak on error in pipe.c (Fedor Indutny)

* kqueue: invalidate fd in uv_fs_event_t (Fedor Indutny)

* linux: always deregister closing fds from epoll (Geoffry Song)

* error: add ENXIO for O_NONBLOCK FIFO open() (Fedor Indutny)

Signed-off-by: Fedor Indutny <fedor@indutny.com>
2014-04-07 15:26:30 +04:00
Fedor Indutny
295882ed32 error: add EMLINK mapping
fix joyent/node#7307
2014-04-03 16:37:25 +04:00
Tonis Tiigi
fd77a5d6c6 process: don't close stdio fds during spawn
This is needed when closed stdio fd is reused for uv_spawn pipe.
Fixes #1211
2014-03-26 20:35:08 +04:00
Marc Schlaich
cd6db8bbef build, windows: do not fail on Windows SDK Prompt
Backported from master 2f6d4b4
2014-03-20 23:15:06 +01:00
Marc Schlaich
aa2fbb364a build, windows: fixed x64 configuration issue
Backported from master 8010bf9
2014-03-20 23:11:11 +01:00
Fedor Indutny
4ac8c424ea win: fix buffer leak on error in pipe.c 2014-03-13 00:48:55 +04:00
Fedor Indutny
9b38c01b54 kqueue: invalidate fd in uv_fs_event_t
Invalidate file descriptor when closing `uv_fs_event_t` handle. Note
that `uv__io_stop` is just removing `fd` from `loop->watchers` and not
actually invalidating all consequent events in a `kevent()` results.

fix joyent/node#1101
2014-03-11 02:44:13 +04:00
Geoffry Song
84f305915f linux: always deregister closing fds from epoll
If the same file description is open in two different processes, then
closing the file descriptor is not sufficient to deregister it from the
epoll instance (as described in epoll(7)), resulting in spurious events
that cause the event loop to spin repeatedly. So always explicitly
deregister it.

Fixes #1099.

Conflicts:
	test/test-spawn.c
2014-03-10 17:27:36 +04:00
Fedor Indutny
4f72f2145b error: add ENXIO for O_NONBLOCK FIFO open()
When opening FIFO with `O_NONBLOCK` flag, `ENXIO` could be returned if
the readable side hasn't yet opened this FIFO.
2014-03-06 20:36:07 +04:00
Fedor Indutny
c0c9480e02 process: remove debug perror() prints
fix #1128
2014-03-03 21:04:52 +04:00
Saúl Ibarra Corretgé
6f98f4efd1 unix, windows: map ERANGE errno
This is a backport of 2f58bb6 from the master branch
2014-02-25 10:48:26 +01:00
Saúl Ibarra Corretgé
10f9120d78 errno: map EFBIG, ENOPROTOOPT and ETXTBSY
This is a backport of:
107be2bed3
4a023fc078
aaaefe32ca
2014-02-24 12:57:28 +01:00
Timothy J Fontaine
714bec14f6 Now working on v0.10.26 2014-02-18 13:01:54 -08:00
Timothy J Fontaine
d778dc5885 2014.02.19, Version 0.10.25 (Stable)
Changes since version 0.10.24:

* stream: start thread after assignments (Oguz Bastemur)

* unix: correct error when calling uv_shutdown twice (Saúl Ibarra
  Corretgé)

* windows: freeze in uv_tcp_endgame (Alexis Campailla)

* sunos: handle rearm errors (Fedor Indutny)
2014-02-18 13:01:51 -08:00
Fedor Indutny
703a9e601e sunos: handle rearm errors
fix #1078
2014-02-19 00:14:13 +04:00
Alexis Campailla
4f913b669a windows: freeze in uv_tcp_endgame
The event_handle field of unused accept requests was not being
initialized properly. As a result, uv_tcp_endgame would try to close
an invalid handle and this could lead to unexpected behavior.

This fixes node.js test test-cluster-disconnect.js on Windows.
2014-02-18 19:16:47 +01:00
Saúl Ibarra Corretgé
6e2021ca11 unix: correct error when calling uv_shutdown twice
This is a backport of a284b90 for v0.10 branch
2014-02-15 16:55:06 +01:00
Oguz Bastemur
a6ff04d2c4 stream: start thread after assignments
Changed the order of the member assignments since the thread
may start before the parameters are assigned. This especially
happens when the osx scheduler is very busy.
2014-01-31 20:53:06 +04:00
Timothy J Fontaine
79ffe2fb95 Now working on v0.10.25 2014-01-29 09:41:41 -08:00
Timothy J Fontaine
aecd296b6b 2014.01.30, Version 0.10.24 (Stable)
Changes since version 0.10.23:

* linux: move sscanf() out of the assert() (Trevor Norris)

* linux: fix C99/C++ comment (Fedor Indutny)
2014-01-29 09:41:36 -08:00
Fedor Indutny
3e2446d18d linux: fix C99/C++ comment 2014-01-29 17:01:35 +04:00
Trevor Norris
7c8ff3bc25 linux: move sscanf() out of the assert()
If asserts are turned off then the sscanf() wouldn't have run, being
placed directly in the assert() itself.
2014-01-29 17:01:26 +04:00
Bert Belder
b8b6588dbe Now working on v0.10.24 2014-01-22 20:30:26 +01:00
Bert Belder
dbd218e699 2014.01.23, Version 0.10.23 (Stable)
Changes since version 0.10.22:

* linux: relax assumption on /proc/stat parsing (Luca Bruno)

* openbsd: fix obvious bug in uv_cpu_info (Fedor Indutny)

* process: close stdio after dup2'ing it (Fedor Indutny)
2014-01-22 20:30:14 +01:00
Fedor Indutny
e403a2c486 process: close stdio after dup2'ing it
Thus allow passing the same file descriptor as the source of multiple
stdios.

Committed with the help and code parts from:

  * Sam Roberts <sam@strongloop.com>

fix #1074
2014-01-22 22:39:08 +04:00
Fedor Indutny
8bc29b6f5f openbsd: fix obvious bug in uv_cpu_info
`int which[]` should not be static here, as the function itself is
changing it

fix joyent/node#6878
2014-01-21 15:06:30 +04:00
Luca Bruno
993151bc40 linux: relax assumption on /proc/stat parsing
CPU entries in /proc/stat are not guaranteed to be monotonically
increasing, asserting on this assumption can break in cases such
as the UltraSparc II machine shown in #1080.

Signed-off-by: Luca Bruno <lucab@debian.org>
2014-01-20 08:45:34 -08:00
Timothy J Fontaine
97eda7fd62 Now working on v0.10.23 2014-01-07 14:03:18 -08:00
Timothy J Fontaine
f526c90eef 2014.01.08, Version 0.10.22 (Stable)
Changes since version 0.10.21:

* windows: avoid assertion failure when pipe server is closed (Bert
  Belder)
2014-01-07 14:03:15 -08:00
Alex Crichton
f6422af80a osx: Fix a possible segfault in uv__io_poll
In our build infrastructure, I've seen a lot of segfaults recently that
were all only happening on OSX. Upon inspecting the coredumps, it
appearded that all segfaults happened at the same instruction, and upon
translating the assembly back to the source, I found that an array could
be indexed with a -1 index before the index was checked to be not -1.

As concrete evidence, here is the situation that I found caused the
segfault.  The instruction in question along with the relevant register
values was:

    mov    (%r8,%r15,8),%r12

    r8  = 0x7fb0ba800000
    r15 = 0xffffffffffffffff

    r8 + r15 * 8 == 0x7fb0ba7ffff8

It appears that the base of loop->watchers was page aligned, and by
going back one word I guess that the page wasn't mapped, causing our
segfaults.
2013-12-22 03:53:49 -08:00
Bert Belder
16c4b21e4d test: make test-pipe-server-close pass on linux
When a server and a client are both part of the same event loop, and
the client connects to the server, the order in which the connect
callback and the connection callback are called is unspecified.
Apparently on linux the connection callback sometimes happens first,
which is not a bug, and should not make this test fail.
2013-12-21 02:34:44 -08:00
Bert Belder
c66340d59b test: add pipe-server-close test
Add a regression test for the pipe server close issue on Windows, which
was reported in joyent/node#6749 and fixed in 7b16a3f.
2013-12-20 19:40:02 -08:00
Bert Belder
562d7a49ac code style: strip trailing whitespace 2013-12-20 19:38:37 -08:00
Bert Belder
7b16a3f508 windows: avoid assertion failure when pipe server is closed
When a pipe server is closed, all pending accept requests and their
associated HANDLEs are closed to force windows to cancel the
ConnectNamedPipe IRP. The returned request has the `pipeHandle` field
set to INVALID_HANDLE_VALUE, which trips an assert in
uv_pipe_process_accept_req. This patch fixes that.
2013-12-20 17:45:49 -08:00
Timothy J Fontaine
9d60214b3a Now working on v0.10.22 2013-12-18 15:37:33 -08:00
Timothy J Fontaine
375ebce068 2013.12.19, Version 0.10.21 (Stable)
Changes since version 0.10.20:

* unix: fix a possible memory leak in uv_fs_readdir (Alex Crichton)
2013-12-18 15:37:25 -08:00
Alex Crichton
7c6bddbe2a unix: fix a possible memory leak in uv_fs_readdir
Some scandir implementations allocate the dirent struct even if the
directory is empty, so if `scandir` returns 0 there may still be memory
that needs to get deallocated. I have altered uv__fs_readdir to go to
the "deallocation exit area" when 0 files are found in the directory
and continue to return early on a return value of -1.

I went to add a test for this functionality, but it appears that one
already exists (reading an empty directory), so I imagine that the
valgrind builds must only be happening on linux instead of OSX as well?
I have confirmed manually that a program without this fix will
infinitely leak memory, and with this fix the memory usage stays
constant.
2013-12-18 12:05:47 +04:00
Timothy J Fontaine
f3d311edc4 Now working on v0.10.21 2013-12-11 20:22:00 -08:00
Timothy J Fontaine
04141464dd 2013.12.13, Version 0.10.20 (Stable)
Changes since version 0.10.19:

* linux: fix up SO_REUSEPORT back-port (Ben Noordhuis)

* fs-event: fix invalid memory access (huxingyi)
2013-12-11 20:21:57 -08:00
huxingyi
da32344730 fs-event: fix invalid memory access
file_info->FileName is not null terminated.
2013-11-29 20:57:35 -08:00
Alex Gaynor
47d98b64c4 doc: Removed use of gendered pronouns 2013-11-29 16:25:01 -08:00
Ben Noordhuis
7bb7371fc5 build: make ./gyp_uv.py -f eclipse work
The eclipse backend (like the ninja backend) does not support the
--generator_output switch.
2013-11-27 17:28:03 +01:00
Ben Noordhuis
74457d08ba linux: fix up SO_REUSEPORT back-port
Commit 3d2c820 back-ports a patch from the master branch that disables
the use of SO_REUSEPORT on Linux for reasons mentioned in the commit
log.

Unfortunately, the back-port was incomplete; another setsockopt() call
site in src/unix/udp.c was overlooked.  This commit rectifies that.

Hat tip to Luca Bruno for helping troubleshoot the issue.
2013-11-25 16:18:01 +01:00
Marc Schlaich
c3e05bafa5 gitignore: ignore *.pyc files
The gyp build on Windows produces a *.pyc file as of commit 991409e.
2013-11-25 16:27:28 +01:00
Ben Noordhuis
a43537eead test: back-port EMFILE test from master branch
Back-port the test from commit 27795cf from the master branch ("unix:
fix accept() EMFILE error handling").
2013-11-25 12:58:39 +01:00
Ben Noordhuis
026241ca67 unix: unbreak bsd build after bbccafb
Unbreak the build on the BSDs after commit bbccafb.  Move the new
uv__platform_invalidate_fd() function from src/unix/darwin.c to
src/unix/kqueue.c.
2013-11-13 12:20:09 +01:00