php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67523 Crash when doing highlight_file on a large php file
Submitted: 2014-06-26 18:29 UTC Modified: 2014-07-04 11:40 UTC
From: bartv at thisnet dot nl Assigned:
Status: Closed Package: Reproducible crash
PHP Version: 5.6.0RC1 OS: Debian/Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
29 + 39 = ?
Subscribe to this entry?

 
 [2014-06-26 18:29 UTC] bartv at thisnet dot nl
Description:
------------
Calling highlight_file with a file with many classes (about 180). This is the classes cache file generated by a default installation of symfony2.

Actual result:
--------------
#0  _zend_mm_free_int (heap=0x7fffe00b63f8, p=0x7fffe00b6408) at /tmp/buildd/php5-5.6.0~rc1+dfsg/Zend/zend_alloc.c:2104
#1  0x00000000006c6ae8 in zend_highlight (syntax_highlighter_ini=syntax_highlighter_ini@entry=0x7fffffff52f0) at /tmp/buildd/php5-5.6.0~rc1+dfsg/Zend/zend_highlight.c:153
#2  0x000000000069d93b in highlight_file (filename=0x181ed78 "/home/bart/projects/symfonyapp/app/cache/dev/classes.php", syntax_highlighter_ini=syntax_highlighter_ini@entry=0x7fffffff52f0) at Zend/zend_language_scanner.l:795
#3  0x00000000005fafc1 in zif_highlight_file (ht=<optimized out>, return_value=0x18862b0, return_value_ptr=<optimized out>, this_ptr=<optimized out>, return_value_used=<optimized out>) at /tmp/buildd/php5-5.6.0~rc1+dfsg/ext/standard/basic_functions.c:5187
#4  0x00000000006c2e7a in dtrace_execute_internal (execute_data_ptr=<optimized out>, fci=<optimized out>, return_value_used=<optimized out>) at /tmp/buildd/php5-5.6.0~rc1+dfsg/Zend/zend_dtrace.c:97
#5  0x00007ffff3e24a46 in xdebug_execute_internal (current_execute_data=0x7ffff7f8af88, fci=0x0, return_value_used=1) at /build/xdebug-RIyDQR/xdebug-2.2.4/xdebug-2.2.4/xdebug.c:1551
#6  0x000000000077d158 in zend_do_fcall_common_helper_SPEC (execute_data=0x7ffff7f8af88) at /tmp/buildd/php5-5.6.0~rc1+dfsg/Zend/zend_vm_execute.h:560
#7  0x000000000070e660 in execute_ex (execute_data=0x7ffff7f8af88) at /tmp/buildd/php5-5.6.0~rc1+dfsg/Zend/zend_vm_execute.h:363
#8  0x00000000006c2d38 in dtrace_execute_ex (execute_data=0x7ffff7f8af88) at /tmp/buildd/php5-5.6.0~rc1+dfsg/Zend/zend_dtrace.c:73
#9  0x00007ffff3e23fcc in xdebug_execute_ex (execute_data=0x7ffff7f8af88) at /build/xdebug-RIyDQR/xdebug-2.2.4/xdebug-2.2.4/xdebug.c:1437
#10 0x000000000077d68e in zend_do_fcall_common_helper_SPEC (execute_data=0x7ffff7f8ae08) at /tmp/buildd/php5-5.6.0~rc1+dfsg/Zend/zend_vm_execute.h:592
#11 0x000000000070e660 in execute_ex (execute_data=0x7ffff7f8ae08) at /tmp/buildd/php5-5.6.0~rc1+dfsg/Zend/zend_vm_execute.h:363
#12 0x00000000006c2d38 in dtrace_execute_ex (execute_data=0x7ffff7f8ae08) at /tmp/buildd/php5-5.6.0~rc1+dfsg/Zend/zend_dtrace.c:73
#13 0x00007ffff3e23fcc in xdebug_execute_ex (execute_data=0x7ffff7f8ae08) at /build/xdebug-RIyDQR/xdebug-2.2.4/xdebug-2.2.4/xdebug.c:1437
#14 0x000000000077d68e in zend_do_fcall_common_helper_SPEC (execute_data=0x7ffff7f8ac98) at /tmp/buildd/php5-5.6.0~rc1+dfsg/Zend/zend_vm_execute.h:592
#15 0x000000000070e660 in execute_ex (execute_data=0x7ffff7f8ac98) at /tmp/buildd/php5-5.6.0~rc1+dfsg/Zend/zend_vm_execute.h:363
#16 0x00000000006c2d38 in dtrace_execute_ex (execute_data=0x7ffff7f8ac98) at /tmp/buildd/php5-5.6.0~rc1+dfsg/Zend/zend_dtrace.c:73
#17 0x00007ffff3e23fcc in xdebug_execute_ex (execute_data=0x7ffff7f8ac98) at /build/xdebug-RIyDQR/xdebug-2.2.4/xdebug-2.2.4/xdebug.c:1437
#18 0x000000000077d68e in zend_do_fcall_common_helper_SPEC (execute_data=0x7ffff7f8ab58) at /tmp/buildd/php5-5.6.0~rc1+dfsg/Zend/zend_vm_execute.h:592
#19 0x000000000070e660 in execute_ex (execute_data=0x7ffff7f8ab58) at /tmp/buildd/php5-5.6.0~rc1+dfsg/Zend/zend_vm_execute.h:363
#20 0x00000000006c2d38 in dtrace_execute_ex (execute_data=0x7ffff7f8ab58) at /tmp/buildd/php5-5.6.0~rc1+dfsg/Zend/zend_dtrace.c:73


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-06-29 23:39 UTC] tyrael@php.net
-Status: Open +Status: Feedback
 [2014-06-29 23:39 UTC] tyrael@php.net
any chance you could attach the file which produces the crash?
 [2014-07-01 19:28 UTC] bartv at thisnet dot nl
-Status: Feedback +Status: Open
 [2014-07-01 19:28 UTC] bartv at thisnet dot nl
The file can be found at http://owncloud.thisnet.nl/public.php?service=files&t=449b256bb9a78cb13e6435dad9c1efd8
 [2014-07-02 07:13 UTC] laruence@php.net
please disable xdebug then try again
 [2014-07-02 10:00 UTC] laruence@php.net
-Status: Open +Status: Feedback
 [2014-07-02 10:00 UTC] laruence@php.net
Please try using this snapshot:

  http://snaps.php.net/php-trunk-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2014-07-04 11:40 UTC] bartv at thisnet dot nl
-Status: Feedback +Status: Closed
 [2014-07-04 11:40 UTC] bartv at thisnet dot nl
Works now in 5.6.0RC2 and master
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 15:01:29 2024 UTC