Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_php_event_dtor makes segfault #2

Closed
Joungkyun opened this issue Jan 2, 2016 · 1 comment
Closed

_php_event_dtor makes segfault #2

Joungkyun opened this issue Jan 2, 2016 · 1 comment
Assignees

Comments

@Joungkyun
Copy link

Hi, reports bug again.

OS: Centos 7.2
PHP: php-7.0.1

code:

<?php
$base = event_base_new ();
$e = event_new();
?>

expected: no result
result: segfault

[root@an3 libevent]$ gdb php
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-80.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
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-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/php...(no debugging symbols found)...done.
(gdb) run a.php
Starting program: /bin/php a.php
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x0000000000739540 in zend_list_delete ()
Missing separate debuginfos, use: debuginfo-install php-cli-7.0.1-1.an3.x86_64
(gdb) bt
#0  0x0000000000739540 in zend_list_delete ()
#1  0x00007fffeb0d1b4d in _php_event_dtor (res=0x7fffffffcc50) at /root/rpmbuild/SOURCES/z/ext/libevent/libevent.c:174
#2  0x0000000000739341 in zend_resource_dtor ()
#3  0x00000000007393ca in list_entry_destructor ()
#4  0x0000000000735853 in zend_hash_index_del ()
#5  0x0000000000736733 in zend_hash_graceful_reverse_destroy ()
#6  0x0000000000715303 in shutdown_executor ()
#7  0x00000000007241da in zend_deactivate ()
#8  0x00000000006c3a31 in php_request_shutdown ()
#9  0x00000000007ab2c8 in do_cli ()
#10 0x0000000000440dcf in main ()
(gdb) f 1
#1  0x00007fffeb0d1b4d in _php_event_dtor (res=0x7fffffffcc50) at /root/rpmbuild/SOURCES/z/ext/libevent/libevent.c:174
174                     zend_list_delete(Z_RES_P(&event->stream_id));
(gdb) list
169             if (event->base) {
170                     base_id = event->base->rsrc_id;
171                     --event->base->events;
172             }
173             if (Z_TYPE_P(&event->stream_id) != IS_NULL) {
174                     zend_list_delete(Z_RES_P(&event->stream_id));
175             }
176             event_del(event->event);
177
178             _php_event_callback_free(event->callback);
(gdb)
@ichiriac ichiriac self-assigned this Jan 2, 2016
ichiriac added a commit that referenced this issue Jan 3, 2016
@ichiriac
Copy link

ichiriac commented Jan 3, 2016

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants