libuv/src/unix
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
..
aix.c windows, unix: remove dead code 2013-04-10 15:50:39 +02:00
async.c linux: use eventfds for async handles 2013-02-25 02:55:24 +01:00
core.c core: fix fake watcher list and count preservation 2013-11-12 15:24:33 +04:00
cygwin.c cygwin: remove unused variable 2013-04-10 18:30:37 +02:00
darwin-proctitle.c darwin: avoid calling GetCurrentProcess 2013-10-28 20:51:50 +04:00
darwin.c unix: unbreak bsd build after bbccafb 2013-11-13 12:20:09 +01:00
dl.c unix: assume that dlopen() clobbers dlerror() 2012-06-28 01:54:02 +02:00
error.c unix: add mapping for ENETDOWN 2013-05-20 20:05:33 +02:00
freebsd.c unix: use uv__hrtime() internally 2013-01-06 17:35:34 +01:00
fs.c unix: fix a possible memory leak in uv_fs_readdir 2013-12-18 12:05:47 +04:00
fsevents.c fsevents: support japaneese characters in path 2013-11-02 05:00:50 +04:00
getaddrinfo.c unix: fix up #if defined checks 2013-01-06 22:31:47 +01:00
internal.h unix: fix reopened fd bug 2013-11-12 15:02:59 +04:00
kqueue.c osx: Fix a possible segfault in uv__io_poll 2013-12-22 03:53:49 -08:00
linux-core.c unix: fix reopened fd bug 2013-11-12 15:02:59 +04:00
linux-inotify.c linux: move files out of src/unix/linux 2013-01-29 17:07:41 +01:00
linux-syscalls.c linux: move files out of src/unix/linux 2013-01-29 17:07:41 +01:00
linux-syscalls.h linux: fix O_CLOEXEC/O_NONBLOCK defines 2013-02-12 16:18:38 +01:00
loop-watcher.c prepare/idle/check: don't allow NULL callback 2012-12-24 17:05:01 +01:00
loop.c unix, windows: add uv_stop, stop running event loop 2013-02-25 16:21:37 +01:00
netbsd.c unix: use uv__hrtime() internally 2013-01-06 17:35:34 +01:00
openbsd.c unix: use uv__hrtime() internally 2013-01-06 17:35:34 +01:00
pipe.c Revert "unix: set O_NONBLOCK in uv_pipe_open()" 2013-09-28 20:50:45 +02:00
poll.c unix: rename UV__IO_* constants 2012-11-16 17:33:29 +01:00
process.c unix: don't close inherited fds on uv_spawn() fail 2013-10-02 11:17:20 +02:00
proctitle.c linux, darwin: don't touch environ in uv_setup_args 2013-02-26 20:28:47 +01:00
signal.c unix: fix non-synchronized access in signal.c 2013-10-18 17:10:04 +02:00
stream.c doc: Removed use of gendered pronouns 2013-11-29 16:25:01 -08:00
sunos.c unix: fix reopened fd bug 2013-11-12 15:02:59 +04:00
tcp.c unix: fix uv_tcp_simultaneous_accepts() logic 2013-03-12 12:39:37 +01:00
thread.c unix: fix build when !defined(PTHREAD_MUTEX_ERRORCHECK) 2013-07-05 12:15:08 +02:00
threadpool.c unix: please valgrind, free memory in threadpool.c 2013-03-07 01:57:30 +01:00
timer.c unix: make timers handle large timeouts 2013-03-21 14:54:36 +01:00
tty.c stream: run try_select only for pipes and ttys 2013-03-16 23:29:24 +01:00
udp.c linux: fix up SO_REUSEPORT back-port 2013-11-25 16:18:01 +01:00
uv-dtrace.d unix: dtrace probes for tick-start and tick-stop 2013-04-10 14:10:05 +02:00