Comments (7)
Could you fork my repository, add some phpt unit tests files and make a pull request. Future migrations will be easier
from pecl-event-libevent.
Hi,
the bug comes from an allocation problem and the garbage collector, at the second pass, it destroys the event buffer BEFORE attaching it to the $ev.
After some investigations, it problably comes from a bad GC counter on the $base variable and an edge bug on php7.
I have no more time to work on this right now (I do this on my spare time), I'll come back on it maybe in a few weeks ...
from pecl-event-libevent.
solved this problem include case 1 and case 2. see also attached patch file.
And, confirm no memory leak with valgrind.
also, fixed compile error too. follow code has compile error.
-php_sock = (php_socket *)zend_fetch_resource_ex(fd, NULL, php_sockets_le_socket());
+php_sock = (php_socket *)zend_fetch_resource2_ex(fd, NULL, php_sockets_le_socket());
event_base_free__problems_no.3.diff.txt
P.S.
I have not yet accustomed github system. So instead of push, attach patch file. Thx.
The patch file has unix format(\n). On windows, use wordpad instead of notepad.
from pecl-event-libevent.
@Joungkyun thanks for the patch, it works, i've released the code and tests according but seems to have some leaks :
https://travis-ci.org/expressif/pecl-event-libevent/jobs/101288331
To work with github click on "fork" button on the top of this page, a fork project will be created on your own profile.
Checkout your fork, make changes commit & push, and when you are ready, create a pull request from the pull requests tab (on your fork project).
Thanks again for your help,
Best Regards,
Ioan
from pecl-event-libevent.
@ichiriac For libevent001 and libevent002, I think that PHP 7.1 environment seems to be the problem. Plez check again on PHP 7.0 environment.
And libevent003 seems there is a problem in event_base_free.
from pecl-event-libevent.
I'm actually using the master branch of PHP to run tests - it's in principle the 'stable' branch of latests release ... I've put an comment dirrectly on your pull request about the memory leaks, you can take a look at the travis logs.
By the way, thanks a lot helping me to solve this problem !
from pecl-event-libevent.
Is really master branch 'stable' branch of latests relelase? The master branch is PHP 7.1 stream and I know that PHP 7.1 stream is not stable. is the lastest stable stream PHP-7.0 branch?
from pecl-event-libevent.
Related Issues (17)
- _php_bufferevent_readcb segfult HOT 1
- _php_event_dtor makes segfault HOT 1
- libevent.c
- Memory Leaks HOT 2
- support voryx/Thruway with reactphp/event-loop's libevent backend HOT 17
- Segmentation fault HOT 4
- Outdated? HOT 1
- supplied resource is not a valid stream resource HOT 24
- how to install on windows HOT 1
- multi task request issue HOT 1
- Segmentation fault: 11 error HOT 6
- Prepare a stable release
- invalid file descriptor passed HOT 6
- warn and notice during compile HOT 1
- Segmentation fault where there is more than one timer event HOT 5
- [warn] sigaction: Invalid argument
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pecl-event-libevent.