From:             [EMAIL PROTECTED]
Operating system: Linux Slackware 8.1
PHP version:      4.3.0RC3
PHP Bug Type:     GD related
Bug description:  imagepstext consistently crashes PHP

Like summary says, I'm unable to draw with t1lib. My configure line is

./configure --with-t1lib --with-imagick --with-freetype-dir=/usr/local
--with-apache=../test_apache_1.3.26 --with-png-dir=/usr/local
--with-openssl --enable-bcmath --enable-calendar --enable-ftp
--enable-gd-imgstrttf --with-gd --with-jpeg-dir=/usr/local --with-imap
--with-mysql=/usr/local --enable-sockets --with-zlib
--enable-inline-optimization --enable-track-vars --enable-gd-native-ttf
--with-freetype --with-gettext --with-gdbm

GDB output is below

> gdb php    
[version info snipped] GNU gdb 5.2
(gdb) set args bug.php
(gdb) run
Starting program: /usr/local/bin/php bug.php

Program received signal SIGSEGV, Segmentation fault.
T1_ScaleOutline (path=0x0, scale=2) at t1outline.c:480
480         if (ipath->type==LINETYPE){
(gdb) bt
#0  T1_ScaleOutline (path=0x0, scale=2) at t1outline.c:480
#1  0x400bb5df in T1_AAFillOutline (path=0x0, modflag=0) at
t1aaset.c:1494
#2  0x0809c78c in zif_imagepstext (ht=8, return_value=0x847d9dc,
this_ptr=0x0, return_value_used=0)
    at /usr/src/php-4.3.0RC3/ext/gd/gd.c:3312
#3  0x0816999a in execute (op_array=0x837422c) at
/usr/src/php-4.3.0RC3/Zend/zend_execute.c:1598
#4  0x0815a708 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /usr/src/php-4.3.0RC3/Zend/zend.c:864
#5  0x0813852f in php_execute_script (primary_file=0xbffff898) at
/usr/src/php-4.3.0RC3/main/main.c:1552
#6  0x08170454 in main (argc=2, argv=0xbffff914) at
/usr/src/php-4.3.0RC3/sapi/cli/php_cli.c:746
#7  0x401d517d in __libc_start_main (main=0x816fc80 <main>, argc=2,
ubp_av=0xbffff914, init=0x8081784 <_init>, 
    fini=0x8241f30 <_fini>, rtld_fini=0x4000a534 <_dl_fini>,
stack_end=0xbffff90c) at ../sysdeps/generic/libc-start.c:129

And the script is very simple:

<?

$text='Copydown (C) 2003 Example.com';
$fontsize=13;
$fontfile="bchb.pfb";

$im=imagecreatetruecolor(512,512);

$c_text=imagecolorresolve($im, 0, 0, 0);
$c_bg=imagecolorresolve($im, 104,104,255);

$font=imagepsloadfont($fontfile);
$bbox=imagepsbbox($text, $font, $size);

$startx=imagesx($im)-10-$bbox[2];
$starty=imagesy($im)-10-$bbox[1];

imagepstext($im, $text, $font, $size, $c_text, $c_bg, $startx, $starty);

header("Content-type: image/png");
imagepng($im);

?>

It crashes both from command line and from Apache.
-- 
Edit bug report at http://bugs.php.net/?id=20974&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=20974&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=20974&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=20974&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=20974&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=20974&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=20974&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=20974&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=20974&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=20974&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=20974&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20974&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=20974&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=20974&r=isapi

Reply via email to