Comments (1)
Hi,
In my tests I was not using the optional argument ($id in the example).
The reason of the fail is explained on the phpng doc :
The main difference is that now we handle scalar and complex types differently. PHP doesn't allocate scalar values in heap but do it directly on VM stack, inside HashTables and object. They are not subjects for reference counting and garbage collection anymore. Scalar values don't have reference counter and don't support Z_ADDREF_(), Z_DELREF_(), Z_REFCOUNT_() and Z_SET_REFCOUNT_() macros anymore. In most cases you should check if zval supports these macros before calling them. Otherwise you'll get an assert() or crash.
- Z_ADDREF_P(zv)
+ if (Z_REFCOUNTED_P(zv)) {Z_ADDREF_P(zv);}
# or equivalently
+ Z_TRY_ADDREF_P(zv);
The reason of the crash is that the argument is a scalar (primitive) integer, and z_addref_p MUST not be used on scalars.
I will publish a patch and send a pull request on this ...
from pecl-event-libevent.
Related Issues (17)
- _php_event_dtor makes segfault HOT 1
- event_base_free problems HOT 7
- 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.