From: Operating system: Windows 7 x86 PHP version: 5.4.2 Package: GD related Bug Type: Bug Bug description:Crash in certain script using GD in Moodle
Description: ------------ PHP 5.4.1 and 5.4.2 crashes at a page of learning management system Moodle (http://moodle.org/) drawing a graph using GD. 1. Install Moodle. 2. Log in as admin and create at least one student user. 3. Create a course. 4. Enter edit mode and add a quiz to the course. 5. Log in as a student user, take the quiz just created. 6. Log in as admin, see the quiz report. Page URL is <moodle>/mod/quiz/report.php?id=<module id>&mode=overview. Embedded graph image is rendered by <moodle>/mod/quiz/report/overview/overviewgraph.php?id=<quiz id>. PHP 5.3.8 didn't have this issue. My environment: OS: Windows 7 x86 Home Premium Server package: XAMPP 1.7.7 (Apache 2.2.21, MySQL 5.5.16) PHP: replaced original 5.3.8 with 5.4.1 and 5.4.2 PHP extensions: php_gd2.dll, php_mysqli.dll Moodle: any of 1.9.14, 2.0.8, 2.2.2 Test script: --------------- Tried to reproduce by separating concerning library files only and copied the object properties by var_export but didn't reproduce (graph is displayed without crash). Actual result: -------------- php5ts.dll stops with APPCRASH c0000005. Access to both report page and graph only causes crash. Weirdly if I add "exit();" at the end of the script overviewgraph.php, it doesn't crash. Callgraph shown when debugging with Visual Studio: (è¡=line, ãã¤ã=byte) > php5ts.dll!zval_mark_grey(_zval_struct * pz, void * * * tsrm_ls) è¡ 425 C php5ts.dll!gc_mark_roots(void * * * tsrm_ls) è¡ 501 + 0x7 ãã¤ã C php5ts.dll!gc_collect_cycles(void * * * tsrm_ls) + 0x15c1a1 ãã¤ã C php5ts.dll!zend_deactivate(void * * * tsrm_ls) è¡ 944 + 0x6 ãã¤ã C php5ts.dll!php_request_shutdown(void * dummy) è¡ 1784 C php5apache2_2.dll!php_handler(request_rec * r) è¡ 680 C libhttpd.dll!6ff02515() [ä¸ã®ãã¬ã¼ã ã¯ééã£ã¦ããããã¾ãã¯è¦ã¤ããã¾ãããlibhttpd.dll ã«å¯¾ãã¦èªã¿è¾¼ã¾ããã·ã³ãã«ã¯ããã¾ããã] libhttpd.dll!6ff0297c() libhttpd.dll!6ff0ff7c() libhttpd.dll!6ff0b092() libhttpd.dll!6ff05305() libhttpd.dll!6ff055d2() libhttpd.dll!6ff1ea89() msvcr90.dll!6ffb3433() msvcr90.dll!6ffb34c7() kernel32.dll!7655ed6c() ntdll.dll!778f377b() ntdll.dll!778f374e() -- Edit bug report at https://bugs.php.net/bug.php?id=61968&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=61968&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=61968&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=61968&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=61968&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=61968&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=61968&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=61968&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=61968&r=needscript Try newer version: https://bugs.php.net/fix.php?id=61968&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=61968&r=support Expected behavior: https://bugs.php.net/fix.php?id=61968&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=61968&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=61968&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=61968&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=61968&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=61968&r=dst IIS Stability: https://bugs.php.net/fix.php?id=61968&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=61968&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=61968&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=61968&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=61968&r=mysqlcfg