-
assigned issue to
Why does $fd in Event::__construct under PHP-7 only support resource type?
Issue #31
closed
When I tried to send an integer $fd to Event::__construct as I tried it under PHP-5.4, I got a core dump at Z_TRY_ADDREF
:
php7/classes/event.c@event_cb
} else if (e->stream_res) {
ZVAL_RES(&argv[0], e->stream_res);
Z_TRY_ADDREF(argv[0]);
Should I convert $fd to resource type or is there a bug here? I'm so confused.
Comments (5)
-
repo owner -
repo owner - changed status to resolved
Fix: issue
#31where numeric file descriptor caused segmentation fault→ <<cset 9a48c131ae7a>>
-
repo owner Actually, PHP5 version was also broken, because a numeric file descriptor was interpreted as a resource with id equal to the numeric fd. Both versions should be fixed by the above-mentioned commit.
-
reporter The patch works. Thank you very much.
-
reporter - changed status to closed
- Log in to comment