ID:               19700
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Analyzed
 Bug Type:         GD related
 Operating System: all
 PHP Version:      4.2.3, 4.3.0-dev
 New Comment:

Good thing Wez knows the answer as I have been unable to get libpng
1.2.5 to compile on Jaguar.  They have some funky Makefile magic going
on, and I don't have the patience right now to figure out their code.


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

[2002-10-05 20:48:17] [EMAIL PROTECTED]

My girlfriend says that she will give everyone a hug if you fix this
bug and #19704. :-)

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

[2002-10-05 20:39:22] [EMAIL PROTECTED]

The problem is that the gd library assumes that the src
image is palette based if the destination is palette based.
That causes c to be set to the ARGB value instead of the palette index
into the color map array, and hence the segfault.


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

[2002-10-05 20:29:35] [EMAIL PROTECTED]

Silly Apple...

(gdb) p c
$1 = 1648905
(gdb) p i
$2 = 256
(gdb)

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

[2002-10-05 20:22:42] [EMAIL PROTECTED]

In your backtrace there, just after you type, "bt", type:
"p c" and then "p i".  As far as I can tell, PHP is not calling this
function incorrectly.  There must be some odd Mac-specific problem
here.


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

[2002-10-05 20:15:32] [EMAIL PROTECTED]

I recompiled PHP with libpng v1.0.15 and v1.2.5. I used
"--with-gd=/usr/local" and "--with-gd=php" (so I compiled 4 times
total). Same problem every time.

While I was at it I compiled a debug build of PHP (libpng v1.2.5 and
"--with-gd=php") and I got y'all a backtrace (if it helps much). There
were no extra errors in Apache's error_log.

Here ya go:
Program received signal EXC_BAD_ACCESS, Could not access memory.
0x007c5060 in gdImageCopy (dst=0x19e250, src=0x272a90, dstX=0, dstY=0,
srcX=0, srcY=0, w=800, h=600) at
/usr/local/php-cvs/php4-200210050600/ext/gd/libgd/gd.c:1757
1757              if (colorMap[c] == (-1))
(gdb) bt
#0  0x007c5060 in gdImageCopy (dst=0x19e250, src=0x272a90, dstX=0,
dstY=0, srcX=0, srcY=0, w=800, h=600) at
/usr/local/php-cvs/php4-200210050600/ext/gd/libgd/gd.c:1757
#1  0x007bd7cc in zif_imagecopy (ht=8, return_value=0x1b2dd8,
this_ptr=0x0, return_value_used=0) at
/usr/local/php-cvs/php4-200210050600/ext/gd/gd.c:2489
#2  0x00983f28 in execute (op_array=0x19b3d8) at
/usr/local/php-cvs/php4-200210050600/Zend/zend_execute.c:1597
#3  0x0096b8dc in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /usr/local/php-cvs/php4-200210050600/Zend/zend.c:834
#4  0x009218ec in php_execute_script (primary_file=0xbfffec60) at
/usr/local/php-cvs/php4-200210050600/main/main.c:1542
#5  0x00989cd0 in apache_php_module_main (r=0x193238,
display_source_mode=0) at
/usr/local/php-cvs/php4-200210050600/sapi/apache/sapi_apache.c:55
#6  0x0098aefc in send_php (r=0x193238, display_source_mode=0,
filename=0x194db8
"/Library/WebServer/Documents/riverdata/scripts/test.php") at
/usr/local/php-cvs/php4-200210050600/sapi/apache/mod_php4.c:564
#7  0x0098af7c in send_parsed_php (r=0x193238) at
/usr/local/php-cvs/php4-200210050600/sapi/apache/mod_php4.c:579
#8  0x0000c4b4 in ap_invoke_handler ()
#9  0x000160b4 in process_request_internal ()
#10 0x00016144 in ap_process_request ()
#11 0x00005b48 in child_main ()
#12 0x00005d08 in make_child ()
#13 0x00005e74 in startup_children ()
#14 0x00006470 in standalone_main ()
#15 0x00006ce8 in main ()
#16 0x00001bb0 in _start ()
#17 0x00001a30 in start ()
(gdb)

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

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/19700

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

Reply via email to