|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2019-03-07 14:43 UTC] ircmaxell@php.net
-Assigned To:
+Assigned To: dmitry
[2019-03-11 12:46 UTC] dmitry@php.net
-Status: Assigned
+Status: Feedback
[2019-03-11 12:46 UTC] dmitry@php.net
[2019-03-24 04:22 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 06:00:02 2025 UTC |
Description: ------------ When attempting to create a closure from an FFI function, it results in a segfault when trying to call the closure. Test script: --------------- <?php $header = ' int printf(const char*, ...); '; $ffi = FFI::cdef($header, 'libc.so.6'); $cb = Closure::fromCallable([$ffi, 'printf']); $cb("Hello World\n"); Expected result: ---------------- Hello World Actual result: -------------- Program received signal SIGSEGV, Segmentation fault. 0x0000555555ae0c0d in zend_closure_call_magic (execute_data=0x7ffff3a13180, return_value=0x7ffff3a13100) at /.../Zend/zend_closures.c:249 249 EX(func)->internal_function.scope->__callstatic : EX(func)->internal_function.scope->__call;