mirror of
https://github.com/php/php-src.git
synced 2026-04-21 23:18:13 +02:00
75a04eac97
exit() is now internally implemented by throwing an exception, performing a normal stack unwind and a clean shutdown. This ensures that no persistent resource leaks occur. The exception is internal, cannot be caught and does not result in the execution of finally blocks. This may be relaxed in the future. Closes GH-5768.
40 lines
765 B
PHP
40 lines
765 B
PHP
--TEST--
|
|
Bug # #68937 (Segfault in curl_multi_exec)
|
|
--SKIPIF--
|
|
<?php
|
|
include 'skipif.inc';
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
include 'server.inc';
|
|
$host = curl_cli_server_start();
|
|
|
|
$url = "{$host}/get.inc";
|
|
|
|
$ch = curl_init($url);
|
|
curl_setopt_array($ch, array(
|
|
CURLOPT_HEADER => false,
|
|
CURLOPT_RETURNTRANSFER => true,
|
|
CURLOPT_POST => true,
|
|
CURLOPT_INFILESIZE => filesize(__FILE__),
|
|
CURLOPT_INFILE => fopen(__FILE__, 'r'),
|
|
CURLOPT_HTTPHEADER => array(
|
|
'Expect:',
|
|
'Content-Length: 1',
|
|
),
|
|
CURLOPT_READFUNCTION => 'curl_read',
|
|
CURLOPT_CONNECTTIMEOUT => 1,
|
|
CURLOPT_TIMEOUT => 1
|
|
));
|
|
|
|
function curl_read($ch, $fp, $len) {
|
|
var_dump($fp);
|
|
exit;
|
|
}
|
|
|
|
curl_exec($ch);
|
|
curl_close($ch);
|
|
?>
|
|
--EXPECTF--
|
|
resource(%d) of type (stream)
|