libuv/include/uv-private
Ben Noordhuis b7f38b1e53 Revert "unix: avoid iterating over all async handles"
This reverts commit 209abbab27.

Fixes the following SIGSEGV:

  (gdb) f 1
  #1  0x00007fc084683aec in uv__async_io (loop=0x7fc0848e0b40,
  handle=0x7fc0848e0c78, events=1) at src/unix/async.c:175
  175             ASYNC_CB(h)
  (gdb) list
  170
  171         /* If we need to sweep all handles anyway - skip this loop */
  172         if (!loop->async_sweep_needed) {
  173           for (i = 0; i < end; i += sizeof(h)) {
  174             h = *((uv_async_t**) (buf + i));
  175             ASYNC_CB(h)
  176           }
  177         }
  178
  179         bytes -= end;
  (gdb) print *h
  $1 = {close_cb = 0x184e1b0, data = 0x18d9520, loop = 0x7fc0848e0b40,
  type = 49, handle_queue = {prev = 0x18dae10, next = 0x7860c0}, flags = 32,
  next_closing = 0x1863b40, pending = 0, async_cb = 0x31,
  queue = {prev = 0x18dae50, next = 0x7860c0}}
  (gdb)

It looks like the async handle gets closed or otherwise becomes invalid before
the sweep is executed.

Fixes #603.
2012-10-24 14:58:49 +02:00
..
ev.h unix: fix event loop stall 2012-06-06 05:12:28 +02:00
ngx-queue.h include: make ngx_queue macros sanitary 2012-10-01 22:53:59 +02:00
stdint-msvc2008.h win: support compilation with Visual Studio 2008 2012-10-23 22:55:25 +02:00
tree.h Rename __unused to UV__UNUSED. 2012-04-03 17:41:50 +02:00
uv-bsd.h freebsd: fix build breakage introduced in 3b69c0f 2012-08-29 22:27:27 +02:00
uv-darwin.h darwin: emit relative path in fsevents 2012-09-18 00:29:29 +02:00
uv-linux.h unix: split up uv-unix.h 2012-08-17 16:42:31 +02:00
uv-sunos.h unix: split up uv-unix.h 2012-08-17 16:42:31 +02:00
uv-unix.h Revert "unix: avoid iterating over all async handles" 2012-10-24 14:58:49 +02:00
uv-win.h win: support compilation with Visual Studio 2008 2012-10-23 22:55:25 +02:00