|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61653 Segfault on event_free()
Submitted: 2012-04-06 15:40 UTC Modified: 2012-04-06 21:44 UTC
From: harvey dot robin at gmail dot com Assigned: tony2001 (profile)
Status: Closed Package: libevent (PECL)
PHP Version: Irrelevant OS: Linux, Ubuntu 11.10
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: harvey dot robin at gmail dot com
New email:
PHP Version: OS:


 [2012-04-06 15:40 UTC] harvey dot robin at gmail dot com
Reproducible segfault when using event_free()

Test script:

Expected result:
php test.php 
[http] Reads response (336):
HTTP/1.1 200 OK
[http] Reads response (417):
HTTP/1.1 301 Moved Permanently

Actual result:
Test script to reproduce:

robin@robin-desktop:php-libevent$ gdb /usr/bin/php
GNU gdb (Ubuntu/Linaro 7.3-0ubuntu2) 7.3-2011.08
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
Reading symbols from /usr/bin/php...Reading symbols from /usr/lib/debug/usr/bin/php5...done.
(gdb) run test.php
Starting program: /usr/bin/php test.php
[Thread debugging using libthread_db enabled]
[New Thread 0x7fffe94bc700 (LWP 23184)]
[Thread 0x7fffe94bc700 (LWP 23184) exited]
[http] Reads response (336):
HTTP/1.1 200 OK
[http] Reads response (484):
HTTP/1.1 301 Moved Permanently

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00007fffec582d3c in event_base_loop () from /usr/lib/
#2  0x00007fffec7be310 in zif_event_base_loop (ht=<optimized out>, return_value=0x110c2e0, return_value_ptr=<optimized out>, this_ptr=<optimized out>, 
    return_value_used=<optimized out>) at /tmp/pear/temp/libevent/libevent.c:405
#3  0x000000000070c72d in zend_do_fcall_common_helper_SPEC (execute_data=0x7ffff7ec6430) at /build/buildd/php5-5.3.6/Zend/zend_vm_execute.h:316
#4  0x00000000006bd51b in execute (op_array=0x110a610) at /build/buildd/php5-5.3.6/Zend/zend_vm_execute.h:107
#5  0x0000000000698b70 in zend_execute_scripts (type=1528496254, retval=0x87e363b32, file_count=3) at /build/buildd/php5-5.3.6/Zend/zend.c:1266
#6  0x0000000000645913 in php_execute_script (primary_file=0x7ffff7de9fe4) at /build/buildd/php5-5.3.6/main/main.c:2297
#7  0x000000000042c53e in main (argc=32767, argv=0x7fffffffe421) at /build/buildd/php5-5.3.6/sapi/cli/php_cli.c:1197


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-04-06 21:31 UTC]
Automatic comment from SVN on behalf of tony2001
Log: fix bug #61653 (Segfault on event_free())
 [2012-04-06 21:31 UTC]
-Status: Open +Status: Feedback
 [2012-04-06 21:31 UTC]
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at

 For Windows:
Thank you for the report, and for helping us make PHP better.

Please try this patch:
 [2012-04-06 21:44 UTC]
-Status: Feedback +Status: Closed -Assigned To: +Assigned To: tony2001
 [2013-05-22 11:09 UTC]
Automatic comment on behalf of
Log: fix bug #61653 (Segfault on event_free())
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 17 14:01:31 2024 UTC