Subject: | Segfault in do_callback on OpenBSD 3.9 |
I'm using Event-Lib-1.00 and perl-5.8.6 on i386-openbsd-3.9. This
problem seems to occur unpredictably when creating and deleting large
numbers of events. It looks like do_callback is calling event_pending on
an event that has already been freed.
Here's the ktrace output and gdb backtrace:
25365 perl CALL munmap(0x883f8000,0x1000)
25365 perl RET munmap 0
25365 perl PSIG SIGSEGV SIG_DFL code 1 addr=0x883f87d0 trapno=1
25365 perl NAMI "perl.core"
#0 event_pending (ev=0x883f8780, event=29560, tv=0x0)
at /usr/src/lib/libevent/event.c:509
#1 0x024d7084 in do_callback (fd=49, event=4, ev=0x85527a58) at Lib.xs:209
#2 0x02f186f4 in event_process_active (base=0x82962240)
at /usr/src/lib/libevent/event.c:261
#3 0x02f1895a in event_base_loop (base=0x82962240, flags=1)
at /usr/src/lib/libevent/event.c:375
#4 0x02f187e3 in event_loop (flags=1) at /usr/src/lib/libevent/event.c:310
#5 0x024d94aa in XS_Event__Lib_event_one_loop (cv=0x84f4e688) at Lib.xs:648
#6 0x08c8afe4 in Perl_pp_entersub () at
/usr/src/gnu/usr.bin/perl/pp_hot.c:2890
#7 0x08cecc29 in Perl_runops_standard () at
/usr/src/gnu/usr.bin/perl/run.c:37
#8 0x08cdb457 in S_run_body (oldscope=1) at
/usr/src/gnu/usr.bin/perl/perl.c:1936
#9 0x08cdb257 in perl_run (my_perl=0x7d553030)
at /usr/src/gnu/usr.bin/perl/perl.c:1855
#10 0x1c0012e6 in main ()