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