Bug #17584 Updated: segmentation fault with imagefill and tiles

From: Date: Wed, 05 Jun 2002 19:26:49 +0000
Subject: Bug #17584 Updated: segmentation fault with imagefill and tiles
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-9574@lists.php.net to get a copy of this message
ID: 17584 Updated by: sniper@php.net Reported By: ryan@kaneda.net -Status: Open +Status: Feedback Bug Type: GD related Operating System: FreeBSD 4.5-STABLE PHP Version: 4.2.1 New Comment: This looks like some other bug which turned out to be a bug in libpng (iirc). What version do you have there? (and did you link PHP with the same libpng??) I can't reproduce this with libpng 1.2.0 and GD 1.8.4. Previous Comments: ------------------------------------------------------------------------ [2002-06-05 15:21:25] ryan@kaneda.net okay, sorry about that. Here's the *real* bt: Program received signal SIGSEGV, Segmentation fault. 0x286c3df5 in gdImageSetPixel () from /usr/local/lib/libgd.so.4 (gdb) bt #0 0x286c3df5 in gdImageSetPixel () from /usr/local/lib/libgd.so.4 #1 0x286c3b06 in gdImageSetPixel () from /usr/local/lib/libgd.so.4 #2 0x286c528b in gdImageFilledRectangle () from /usr/local/lib/libgd.so.4 #3 0x284097f2 in zif_imagefilledrectangle (ht=6, return_value=0x81a6268, this_ptr=0x0, return_value_used=0, tsrm_ls=0x812ba30) at gd.c:2004 #4 0x283caaa3 in execute (op_array=0x8127c28, tsrm_ls=0x812ba30) at ./zend_execute.c:1598 #5 0x283db37a in zend_execute_scripts (type=8, tsrm_ls=0x812ba30, retval=0x0, file_count=3) at zend.c:810 #6 0x283eaac2 in php_execute_script (primary_file=0xbfbff8dc, tsrm_ls=0x812ba30) at main.c:1381 #7 0x283e6ea6 in php_output_filter (f=0x818d350, bb=0x818dd48) at sapi_apache2.c:401 (gdb) frame 4 #4 0x283caaa3 in execute (op_array=0x8127c28, tsrm_ls=0x812ba30) at ./zend_execute.c:1598 1598 ((zend_internal_function *) EX(function_state).function)->handler(EX(opline)->extended_value, EX(Ts)[EX(opline)->result.u.var].var.ptr, EX(object).ptr, return_value_used TSRMLS_CC); ---- Better? ------------------------------------------------------------------------ [2002-06-05 14:38:32] ryan@kaneda.net Oh crap... disregard that. That's on a non debug php build. Give me a second to redo the backtrace. heh. ------------------------------------------------------------------------ [2002-06-05 14:29:33] ryan@kaneda.net Okay, I hope this is what we're looking for: Program received signal SIGSEGV, Segmentation fault. 0x286b9df5 in gdImageSetPixel () from /usr/local/lib/libgd.so.4 (gdb) bt #0 0x286b9df5 in gdImageSetPixel () from /usr/local/lib/libgd.so.4 #1 0x286b9b06 in gdImageSetPixel () from /usr/local/lib/libgd.so.4 #2 0x286bb28b in gdImageFilledRectangle () from /usr/local/lib/libgd.so.4 #3 0x284049ad in ssl_expr_yytext () from /usr/local/libexec/apache2/libphp4.so #4 0x283cb0fd in ssl_expr_yytext () from /usr/local/libexec/apache2/libphp4.so #5 0x283da622 in ssl_expr_yytext () from /usr/local/libexec/apache2/libphp4.so #6 0x283e822a in ssl_expr_yytext () from /usr/local/libexec/apache2/libphp4.so #7 0x283e49b6 in ssl_expr_yytext () from /usr/local/libexec/apache2/libphp4.so #8 0x806dbb7 in ap_pass_brigade () #9 0x8073f18 in default_handler () #10 0x80646f4 in ap_run_handler () #11 0x8064b85 in ap_invoke_handler () #12 0x8062006 in ap_process_request () #13 0x805e13d in ap_process_http_connection () #14 0x806c278 in ap_run_process_connection () #15 0x806c4ff in ap_process_connection () #16 0x80633ab in child_main () #17 0x8063468 in make_child () #18 0x806355a in startup_children () #19 0x806388f in ap_mpm_run () #20 0x80686de in main () #21 0x805dd8d in _start () --- Am I mistaken, is this a gd library error and not a php error? The script executed was the same posted in the original report. Let me know if there's anything else needed. ------------------------------------------------------------------------ [2002-06-03 20:16:24] sniper@php.net Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. ------------------------------------------------------------------------ [2002-06-03 20:06:39] ryan@kaneda.net <?php $image=imageCreate(200,200); $tile1=imageCreateFromPNG('./images/stars.png'); $tile2=imageCreateFromgif('./images/temperate_1.gif'); imageSetTile($image,$tile1); imageFilledRectangle($image,0,0,200,200,IMG_COLOR_TILED); $polygon=array(10,10,190,100,10,190,100,100,10,10); imageSetTile($image,$tile2); imageFilledPolygon($image,$polygon,5,IMG_COLOR_TILED); imagePNG($image); imageDestroy($image); ?> Every time i would do an imagefill with IMG_COLOR_TILED set as the property color, Apache error reporting has this to say: [Mon Jun 03 16:28:29 2002] [notice] child pid 10678 exit signal Segmentation fault (11) Here are my configure options: './configure' '--with-apxs2=/usr/local/sbin/apxs' '--with-tsrm-pth' '--with-config-file-path=/usr/local/etc' '--enable-versioning' '--with-regex=system' '--without-gd' '--without-mysql' '--with-gd=/usr/local' '--enable-gd-native-ttf' '--with-freetype-dir=/usr/local' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr/local' '--with-zlib' '--with-bz2=/usr' '--with-mysql=/usr/local' '--with-openssl=/usr' '--enable-sockets' '--enable-trans-sid' '--prefix=/usr/local' 'i386-portbld-freebsd4.5' or, just look here: http://azazel.kaneda.net/phpinfo.php I'd have to rebuild php to get the gdb backtrace, but I'll do it if required. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17584&edit=1

« previous php.bugs (#9574) next »