Commits on Oct 16, 2012
  1. windows: don't run signal tests

    They are dummy tests on windows, running them is misleading.
    Also remove duplicate 'test-signal.c' entry from uv.gyp.
    piscisaureus committed Oct 11, 2012
Commits on Oct 15, 2012
  1. test: change 10e8 to 1e9

    It is clearer and used everywhere else.
    hnakamur committed with bnoordhuis Oct 15, 2012
Commits on Oct 14, 2012
  1. unix: remove always_inline attribute

    Fixes the following gcc 4.7+ warning:
      ../src/unix/internal.h:105:13: warning: always_inline function might not be
      inlinable [-Wattributes]
    gcc wants the always_inline function to be annotated with the 'inline' keyword
    which we can't do because we compile in C89 mode.
    Using __inline is not an option because that makes clang generate warnings when
    -Wlanguage-extension-token is enabled.
    Therefore, remove the always_inline attribute altogether and hope that the
    compiler is smart enough to inline the functions.
    bnoordhuis committed Oct 14, 2012
Commits on Oct 11, 2012
Commits on Oct 10, 2012
  1. darwin: work around concurrent write() kernel bug

    Simultaneously writing from multiple threads to the same file descriptor is not
    safe on OS X. We already serialized all pwrite() system calls, apply the same
    workaround to the write() system call.
    Fixes a node.js test, test/simple/test-fs-sir-writes-alot.js, that was failing
    because parts of the output file got filled with nul bytes.
    bnoordhuis committed Oct 10, 2012
Commits on Oct 9, 2012
  1. unix: remove unnecessary pthread_join ESRCH check

    ESRCH means the thread never got started but we guard against that now.
    bnoordhuis committed Oct 9, 2012
  2. uv.h: move gid and uid to the end of the uv_process_t struct

    uv_gid_t and uv_uid_t have different sizes on different platforms.
    Moving them to the end of the struct is easier for bindings that use
    txdv committed with piscisaureus Oct 5, 2012
Commits on Oct 7, 2012
  1. unix: don't reap threads if none were started

    Fixes a segmentation fault on 32 bits linux with glibc 2.15.
    Thanks to Johan Bergström (@jbergstroem) for reporting the issue and testing
    out the patch.
    bnoordhuis committed Oct 7, 2012
Commits on Oct 6, 2012
  1. unix: don't abort() on EINVAL in threadpool.c

    The FreeBSD implementation of pthread_join() returns EINVAL when a thread has
    already quit, not ESRCH.
    bnoordhuis committed Oct 6, 2012
  2. unix: fix scandir filter prototype again

    The only platforms where the dirent argument is non-const are OS X, OpenBSD
    and older versions of FreeBSD (but not FreeBSD 9). Accommodate the first two.
    bnoordhuis committed Oct 6, 2012
  3. freebsd, openbsd: don't use fdatasync()

    The fdatasync() system call does not exist on either FreeBSD or OpenBSD, fall
    back to fsync().
    bnoordhuis committed Oct 6, 2012
Commits on Oct 5, 2012
Commits on Oct 3, 2012
  1. windows: make uv_rwlock_init initialize libuv

    Without this patch, the fallback implementation would be used if
    uv_rwlock_init were to be called before a loop was created or
    uv_default_loop() was called.
    piscisaureus committed Oct 3, 2012
  2. test, windows: fix duplicated windows.h

    including windows.h before winsock2.h cause build error
    shigeki committed with piscisaureus Oct 3, 2012
Commits on Oct 2, 2012
  1. test: fix windows #include bug

    Fixes a "'AF_IPX' : macro redefinition" warning when compiling test/runner.c.
    bnoordhuis committed Oct 2, 2012
  2. test: fix uninitialized memory warning, use calloc

    Fixes the following valgrind warning:
      ==29019== Syscall param writev(vector[...]) points to uninitialised byte(s)
      ==29019==    at 0x584270B: writev (writev.c:51)
      ==29019==    by 0x449BB2: uv__write (stream.c:733)
      ==29019==    by 0x44AE91: uv_write2 (stream.c:1159)
      ==29019==    by 0x44AF25: uv_write (stream.c:1180)
      ==29019==    by 0x42CCAA: connect_cb (test-tcp-writealot.c:129)
      ==29019==    by 0x44AC05: uv__stream_connect (stream.c:1097)
      ==29019==    by 0x44AA25: uv__stream_io (stream.c:1050)
      ==29019==    by 0x437430: uv__io_rw (core.c:539)
      ==29019==    by 0x43C3D9: ev_invoke_pending (ev.c:2145)
      ==29019==    by 0x436EC5: uv__poll (core.c:260)
      ==29019==    by 0x436F0F: uv__run (core.c:269)
      ==29019==    by 0x436F6E: uv_run (core.c:277)
      ==29019==  Address 0x5f15040 is 0 bytes inside a block of size 94,371,840 alloc'd
      ==29019==    at 0x4C2C5EF: malloc (vg_replace_malloc.c:270)
      ==29019==    by 0x42CDED: run_test_tcp_writealot (test-tcp-writealot.c:148)
      ==29019==    by 0x406551: run_test_part (runner.c:302)
      ==29019==    by 0x405384: main (run-tests.c:57)
    bnoordhuis committed Oct 2, 2012
  3. unix: fix uninitialized memory read in uv__read()

    This commit fixes the following valgrind warning:
      ==26443== Conditional jump or move depends on uninitialised value(s)
      ==26443==    at 0x44AAFF: uv__read (stream.c:872)
      ==26443==    by 0x44ADD4: uv__stream_io (stream.c:1051)
      ==26443==    by 0x4377B8: uv__io_rw (core.c:539)
      ==26443==    by 0x43C761: ev_invoke_pending (ev.c:2145)
      ==26443==    by 0x43724D: uv__poll (core.c:260)
      ==26443==    by 0x437297: uv__run (core.c:269)
      ==26443==    by 0x4372F6: uv_run (core.c:277)
      ==26443==    by 0x42094B: run_test_pipe_ref4 (test-ref.c:334)
      ==26443==    by 0x406551: run_test_part (runner.c:302)
      ==26443==    by 0x405384: main (run-tests.c:57)
    bnoordhuis committed Oct 2, 2012
  4. unix: fix small race in fs.c

    Don't return req->result after posting the work request. It's possible (if
    unlikely) for a worker thread to process the request before the main thread
    reaches the return statement.
    bnoordhuis committed Oct 2, 2012
  5. unix: emulate sendfile if necessary

    Some platforms don't support sendfile() (netbsd, openbsd), others don't support
    arbitrary file descriptors (freebsd, darwin) and yet others have quirks in their
    implementation (sunos).
    Work around the quirks. If all else fails, fall back to sendfile() emulation.
    bnoordhuis committed Oct 2, 2012