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