Bug #77632 [NEW]: FFI Segfaults When Called With Variadics

From: Date: Mon, 18 Feb 2019 10:31:38 +0000
Subject: Bug #77632 [NEW]: FFI Segfaults When Called With Variadics
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-219624@lists.php.net to get a copy of this message
From: ircmaxell Operating system: Linux PHP version: Next Minor Version Package: *Extensibility Functions Bug Type: Bug Bug description:FFI Segfaults When Called With Variadics Description: ------------ FFI causes a segfault if called with variadics. Test script: --------------- <?php $libc = FFI::cdef("int printf(const char *format, ...);", "libc.so.6"); $args = ["test"]; $libc->printf(...$args); Expected result: ---------------- test Actual result: -------------- Segmentation fault: Program received signal SIGSEGV, Segmentation fault. 0x0000555555b0826a in zend_check_arg_send_type (zf=0x55555659b710 <executor_globals+1296>, arg_num=0, mask=3) at Zend/zend_compile.h:943 943 return UNEXPECTED((zf->common.arg_info[arg_num].pass_by_reference & mask) != 0); -- Edit bug report at https://bugs.php.net/bug.php?id=77632&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77632&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77632&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77632&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=77632&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=77632&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=77632&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=77632&r=needscript Try newer version: https://bugs.php.net/fix.php?id=77632&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=77632&r=support Expected behavior: https://bugs.php.net/fix.php?id=77632&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=77632&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=77632&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=77632&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77632&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=77632&r=dst IIS Stability: https://bugs.php.net/fix.php?id=77632&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=77632&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=77632&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=77632&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=77632&r=mysqlcfg

« previous php.bugs (#219624) next »