bug77632.phpt 424 B

12345678910111213141516171819202122
  1. --TEST--
  2. Bug #77632 (FFI Segfaults When Called With Variadics)
  3. --EXTENSIONS--
  4. ffi
  5. --SKIPIF--
  6. <?php
  7. try {
  8. $libc = FFI::cdef("int printf(const char *format, ...);", "libc.so.6");
  9. } catch (Throwable $_) {
  10. die('skip libc.so.6 not available');
  11. }
  12. ?>
  13. --INI--
  14. ffi.enable=1
  15. --FILE--
  16. <?php
  17. $libc = FFI::cdef("int printf(const char *format, ...);", "libc.so.6");
  18. $args = ["test\n"];
  19. $libc->printf(...$args);
  20. ?>
  21. --EXPECT--
  22. test