xref: /PHP-8.1/ext/gd/tests/bug73161.phpt (revision 0aaad46c)
1--TEST--
2Bug #73161 (imagecreatefromgd2() may leak memory)
3--DESCRIPTION--
4We're testing for a memory leak that might not even show up with valgrind.
5--EXTENSIONS--
6gd
7--SKIPIF--
8<?php
9    if (!GD_BUNDLED && version_compare(GD_VERSION, '2.3.3', '>=')) {
10        die("skip test requires GD 2.3.2 or older");
11    }
12?>
13--FILE--
14<?php
15$im = imagecreatefromgd2(__DIR__ . DIRECTORY_SEPARATOR . 'bug73161.gd2');
16var_dump($im);
17?>
18--EXPECTF--
19Warning: imagecreatefromgd2(): "%s" is not a valid GD2 file in %s on line %d
20bool(false)
21