|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59277 Calling event_del cause segfault under 5.2.x and libevent 1.4.11-stable1
Submitted: 2010-06-21 22:34 UTC Modified: 2010-06-22 04:01 UTC
From: b at turbulent dot ca Assigned:
Status: Closed Package: libevent (PECL)
PHP Version: 5.2.10 OS: ubuntu karmic
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
46 + 36 = ?
Subscribe to this entry?

 [2010-06-21 22:34 UTC] b at turbulent dot ca
Simply moving the ZVAL_TO_EVENT conversion before the base 
check in the code will fix the issue.

Enclosed patch:

--- libevent.c.orig	2010-06-22 02:31:54.000000000 +0000
+++ libevent.c	2010-06-22 02:32:12.000000000 +0000
@@ -657,12 +657,13 @@
+	ZVAL_TO_EVENT(zevent, event);
 	if (!event->base) {
 		php_error_docref(NULL TSRMLS_CC, E_WARNING, 
"Unable to delete event without an event base");
-	ZVAL_TO_EVENT(zevent, event);
 	if (event_del(event->event) == 0) {

Reproduce code:
Not required, patch included.

Expected result:
Not required, patch included.

Actual result:
Not required, patch included.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-06-22 04:01 UTC] tony at daylessday dot org
This bug has been fixed in SVN.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on

In case this was a website problem, the change will show
up on the website in short time.
Thank you for the report, and for helping us make PECL better.

Yes, thanks, I've fixed that in SVN 3 weeks ago.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 15 20:01:29 2024 UTC