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 if (!function_exists("imageantialias")) die("skip requires bundled GD library\n"); 7?> 8--FILE-- 9<?php 10// 11// This script will generate a Seg Fault on Linux 12// 13$im = imagecreatetruecolor(300, 300); 14$w = imagecolorallocate($im, 255, 255, 255); 15$red = imagecolorallocate($im, 255, 0, 0); 16 17imagefilledrectangle($im,0,0,299,299,$w); 18 19imageantialias($im,true); 20imageline($im, 299, 299, 0, 299, $red); 21 22imagedestroy($im); 23 24echo "Alive\n"; 25?> 26--EXPECT-- 27Alive 28