libuv/src
Alex Crichton f166d6d705 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 15:54:08 +04:00
..
unix osx: Fix a possible segfault in uv__io_poll 2013-12-22 15:54:08 +04:00
win Merge branch 'v0.10' 2013-12-20 17:48:28 -08:00
fs-poll.c unix, windows: return error codes directly 2013-07-07 09:51:00 +02:00
inet.c unix, windows: return error codes directly 2013-07-07 09:51:00 +02:00
queue.h queue: strengthen type checks 2013-11-02 13:55:57 +01:00
uv-common.c unix, windows: detect errors in uv_ip4/6_addr 2013-12-13 09:27:28 +01:00
uv-common.h include: uv_udp_send{6} now takes sockaddr_in* 2013-09-01 08:02:20 +02:00
version.c Now working on v0.10.22 2013-12-18 15:37:33 -08:00