ID:               23122
 Comment by:       kostyal at realeastnetworks dot com
 Reported By:      1413 at blargh dot com
 Status:           Closed
 Bug Type:         GD related
 Operating System: Debian Linux
 PHP Version:      4.3.2-RC
 New Comment:

Is problem still actual in PHP 4.3.3 RC2 (built: Oct 18 2003
19:02:26)?
I tried above script ant it caused segmentation fault. (Actually, the
script was executed, but error message was written to error log).


Previous Comments:
------------------------------------------------------------------------

[2003-04-30 12:15:05] [EMAIL PROTECTED]

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.



------------------------------------------------------------------------

[2003-04-30 12:06:50] [EMAIL PROTECTED]

Works for me now, no more segfaults.


------------------------------------------------------------------------

[2003-04-30 11:44:03] [EMAIL PROTECTED]

I think I just fixed this issue.  The bt doesn't look the same, but the
fact that it only happens on the second request would indicate that it
was getting a bogus cache pointer which is what I fixed.  Someone
please verify that this doesn't happen under current CVS.

------------------------------------------------------------------------

[2003-04-25 05:48:34] [EMAIL PROTECTED]

Note: This happens on the 2nd run on same apache child.


------------------------------------------------------------------------

[2003-04-25 05:47:23] [EMAIL PROTECTED]

Reproduced with latest stable CVS:

(gdb) bt
#0  0x40442b0b in gdCacheGet (head=0x8409648, keydata=0xbfffca48) at
/usr/src/web/php/php4/ext/gd/libgd/gdcache.c:101
#1  0x40441c1a in gdImageStringFTEx (im=0x83faf24, brect=0xbfffcbbc,
fg=1, 
    fontlist=0x84034a4 "/usr/share/fonts/default/TrueType/arialbd.ttf",
ptsize=10, angle=1.5707963267948966, x=11, 
    y=150, string=0x8400524 "foobar", strex=0x0) at
/usr/src/web/php/php4/ext/gd/libgd/gdft.c:825
#2  0x40441a6b in gdImageStringFT (im=0x83faf24, brect=0xbfffcbbc,
fg=1, 
    fontlist=0x84034a4 "/usr/share/fonts/default/TrueType/arialbd.ttf",
ptsize=10, angle=1.5707963267948966, x=11, 
    y=150, string=0x8400524 "foobar") at
/usr/src/web/php/php4/ext/gd/libgd/gdft.c:767
#3  0x4042d36a in php_imagettftext_common (ht=8,
return_value=0x8403504, this_ptr=0x0, return_value_used=0, mode=0, 
    extended=0) at /usr/src/web/php/php4/ext/gd/gd.c:3058
#4  0x4042c822 in zif_imagettftext (ht=8, return_value=0x8403504,
this_ptr=0x0, return_value_used=0)
    at /usr/src/web/php/php4/ext/gd/gd.c:2947
#5  0x405f5492 in execute (op_array=0x83fac7c) at
/usr/src/web/php/php4/Zend/zend_execute.c:1606
#6  0x405e1f64 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /usr/src/web/php/php4/Zend/zend.c:864
#7  0x405a56b7 in php_execute_script (primary_file=0xbffff284) at
/usr/src/web/php/php4/main/main.c:1637
#8  0x405faa50 in apache_php_module_main (r=0x82e532c,
display_source_mode=0)
    at /usr/src/web/php/php4/sapi/apache/sapi_apache.c:55
#9  0x405fbb78 in send_php (r=0x82e532c, display_source_mode=0,
filename=0x82e742c "/www/apache/htdocs/t.php")
    at /usr/src/web/php/php4/sapi/apache/mod_php4.c:617
#10 0x405fbc02 in send_parsed_php (r=0x82e532c) at
/usr/src/web/php/php4/sapi/apache/mod_php4.c:632
#11 0x8054f09 in ap_invoke_handler () at md4.c:255
#12 0x806b0cf in process_request_internal () at md4.c:255
#13 0x806b13a in ap_process_request () at md4.c:255
#14 0x8061916 in child_main () at md4.c:255
#15 0x8061af5 in make_child () at md4.c:255
#16 0x8061c76 in startup_children () at md4.c:255
#17 0x806230d in standalone_main () at md4.c:255
#18 0x8062b9c in main () at md4.c:255
#19 0x4016c9cb in __libc_start_main (main=0x80627d8 <main>, argc=3,
argv=0xbffff694, init=0x804ed2c <_init>, 
    fini=0x8082e64 <_fini>, rtld_fini=0x4000aea0 <_dl_fini>,
stack_end=0xbffff68c)
    at ../sysdeps/generic/libc-start.c:92
(gdb) list
96      {
97        int i = 0;
98        gdCache_element_t *elem, *prev = NULL, *prevprev = NULL;
99        void *userdata;
100     
101       elem = head->mru;
102       while (elem)
103         {
104           if ((*(head->gdCacheTest)) (elem->userdata, keydata))
105             {


------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/23122

-- 
Edit this bug report at http://bugs.php.net/?id=23122&edit=1

Reply via email to