Hi!

Event stores (c/typemap.c) a private pointer in mg_obj. This causes perl to
crash (or, worse, silent memory corruption) whenever perl tries to duplicate
the magic (e.g. when creating a thread, or forking under windows), as perl
calls either sv_dup or sv_dup_inc on mg_obj, which in this case is not a
valid SV *.

Fixing c/typemap.c by replacing all (both) occurrences of mg_obj by the
corretc mg_ptr fixes this problem, and seems to work (although I have not
given this issue much testing or verification once I identified it, this
is likely all thats required, as other uses of magic in Event seem safe).

Joshua: in case you lack the time for a fix, my offer to maintain Event still
stands (and I woudl certainly give the fix more thought then :), but I
happily see that you seem to be quite active in the last months *g*.

PS: thanks for wrapping everything into typemap.c instead of sprinkling it
randomly around :)

-- 
                The choice of a
      -----==-     _GNU_
      ----==-- _       generation     Marc Lehmann
      ---==---(_)__  __ ____  __      [EMAIL PROTECTED]
      --==---/ / _ \/ // /\ \/ /      http://schmorp.de/
      -=====/_/_//_/\_,_/ /_/\_\      XX11-RIPE

Reply via email to