xref: /PHP-8.1/ext/phar/tests/bug69958.phpt (revision 74859783)
1--TEST--
2Phar: bug #69958: Segfault in Phar::convertToData on invalid file
3--XFAIL--
4Still has memory leaks, see https://bugs.php.net/bug.php?id=70005
5--EXTENSIONS--
6phar
7--FILE--
8<?php
9$tarphar = new PharData(__DIR__.'/bug69958.tar');
10$phar = $tarphar->convertToData(Phar::TAR);
11?>
12--EXPECTF--
13Fatal error: Uncaught BadMethodCallException: phar "%s/bug69958.tar" exists and must be unlinked prior to conversion in %s/bug69958.php:%d
14Stack trace:
15#0 %s/bug69958.php(%d): PharData->convertToData(%d)
16#1 {main}
17  thrown in %s/bug69958.php on line %d
18