xref: /PHP-7.3/ext/gd/tests/bug28147.phpt (revision d0f14a44)
1--TEST--
2Bug #28147 (Crash with anti-aliased line)
3--SKIPIF--
4<?php
5	if (!extension_loaded('gd')) die("skip gd extension not available\n");
6?>
7--FILE--
8<?php
9//
10// This script will generate a Seg Fault on Linux
11//
12$im  = imagecreatetruecolor(300, 300);
13$w  = imagecolorallocate($im, 255, 255, 255);
14$red = imagecolorallocate($im, 255, 0, 0);
15
16imagefilledrectangle($im,0,0,299,299,$w);
17
18imageantialias($im,true);
19imageline($im, 299, 299, 0, 299, $red);
20
21imagedestroy($im);
22
23echo "Alive\n";
24?>
25--EXPECT--
26Alive
27