Skip to content

Instantly share code, notes, and snippets.

@olsonjeffery
Created February 21, 2012 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save olsonjeffery/1876920 to your computer and use it in GitHub Desktop.
Save olsonjeffery/1876920 to your computer and use it in GitHub Desktop.
// this is a hack to get libuv to cleanup a
// handle that was made to not prevent the loop
// from exiting via uv_unref().
uv_ref(op_handle->loop);
uv_close(op_handle, native_close_op_cb);
uv_run(op_handle->loop); // this should process the handle's
// close event and then return
==13341== Invalid read of size 8
==13341== at 0x50EFA6E: uv__next (core.c:297)
==13341== by 0x50F8A0E: ev_invoke_pending (ev.c:2149)
==13341== by 0x50FD123: ev_run (ev.c:2402)
==13341== by 0x50EFD81: uv_run (core.c:212)
==13341== by 0x50EEED8: ??? (in /home/jeff/src/rust/x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib/librustrt.so)
==13341== Address 0x6b9b978 is 216 bytes inside a block of size 720 free'd
==13341== at 0x4C282E0: free (vg_replace_malloc.c:366)
==13341== by 0x50EFA6D: uv__next (core.c:294)
==13341== by 0x50F8A0E: ev_invoke_pending (ev.c:2149)
==13341== by 0x50FD123: ev_run (ev.c:2402)
==13341== by 0x50EFD81: uv_run (core.c:212)
==13341== by 0x50EEED8: ??? (in /home/jeff/src/rust/x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib/librustrt.so)
==13341==
==13341== Invalid read of size 4
==13341== at 0x50FAB90: ev_unref (ev.c:2556)
==13341== by 0x50F8A0E: ev_invoke_pending (ev.c:2149)
==13341== by 0x50FD123: ev_run (ev.c:2402)
==13341== by 0x50EFD81: uv_run (core.c:212)
==13341== by 0x50EEED8: ??? (in /home/jeff/src/rust/x86_64-unknown-linux-gnu/stage1/lib/rustc/x86_64-unknown-linux-gnu/lib/librustrt.so
and on and on for twenty pages...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment