ID: 50145 Updated by: fel...@php.net Reported By: srina...@php.net -Status: Open +Status: Closed Bug Type: Reproducible crash Operating System: solaris, linux PHP Version: 5.3.1RC3 -Assigned To: srinatar +Assigned To: felipe New Comment:
This bug has been fixed in SVN. 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/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2009-11-17 11:18:40] s...@php.net Automatic comment from SVN on behalf of felipe Revision: http://svn.php.net/viewvc/?view=revision&revision=290862 Log: - Fixed bug #50145 (crash while running bug35634.phpt) ------------------------------------------------------------------------ [2009-11-16 02:12:25] srina...@php.net as i expected, this is what valgrind reports.. ==8398== Memcheck, a memory error detector. ==8398== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al. ==8398== Using LibVEX rev 1658, a library for dynamic binary translation. ==8398== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP. ==8398== Using valgrind-3.2.1, a dynamic binary instrumentation framework. ==8398== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al. ==8398== For more details, rerun with: -v ==8398== ==8398== Invalid read of size 4 ==8398== at 0x82B0A73: _zend_mm_alloc_int (zend_alloc.c:1892) ==8398== by 0x82A17A7: open_file_for_scanning (zend_language_scanner.l:272) ==8398== by 0x82A1D2B: compile_file (zend_language_scanner.l:331) ==8398== by 0x82A18AD: compile_filename (zend_language_scanner.l:386) ==8398== by 0x830CE73: ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER (zend_vm_execute.h:1916) ==8398== by 0x82EEA67: execute (zend_vm_execute.h:104) ==8398== by 0x82C1F35: zend_call_function (zend_execute_API.c:942) ==8398== by 0x82C29B7: call_user_function_ex (zend_execute_API.c:734) ==8398== by 0x82CD76C: zend_error (zend.c:1101) ==8398== by 0x82BC0D3: zend_do_begin_function_declaration (zend_compile.c:1289) ==8398== by 0x829CD59: zendparse (zend_language_parser.y:517) ==8398== by 0x82A1D5E: compile_file (zend_language_scanner.l:343) ==8398== Address 0x66690A70 is not stack'd, malloc'd or (recently) free'd ==8398== ==8398== Process terminating with default action of signal 11 (SIGSEGV) ==8398== Access not within mapped region at address 0x66690A70 ==8398== at 0x82B0A73: _zend_mm_alloc_int (zend_alloc.c:1892) ==8398== by 0x82A17A7: open_file_for_scanning (zend_language_scanner.l:272) ==8398== by 0x82A1D2B: compile_file (zend_language_scanner.l:331) ==8398== by 0x82A18AD: compile_filename (zend_language_scanner.l:386) ==8398== by 0x830CE73: ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER (zend_vm_execute.h:1916) ==8398== by 0x82EEA67: execute (zend_vm_execute.h:104) ==8398== by 0x82C1F35: zend_call_function (zend_execute_API.c:942) ==8398== by 0x82C29B7: call_user_function_ex (zend_execute_API.c:734) ==8398== by 0x82CD76C: zend_error (zend.c:1101) ==8398== by 0x82BC0D3: zend_do_begin_function_declaration (zend_compile.c:1289) ==8398== by 0x829CD59: zendparse (zend_language_parser.y:517) ==8398== by 0x82A1D5E: compile_file (zend_language_scanner.l:343) ==8398== ==8398== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 25 from 1) ==8398== malloc/free: in use at exit: 1,475,924 bytes in 11,420 blocks. ==8398== malloc/free: 11,877 allocs, 457 frees, 1,767,115 bytes allocated. ==8398== For counts of detected errors, rerun with: -v ==8398== searching for pointers to 11,420 not-freed blocks. ==8398== checked 903,284 bytes. ==8398== ==8398== LEAK SUMMARY: ==8398== definitely lost: 0 bytes in 0 blocks. ==8398== possibly lost: 0 bytes in 0 blocks. ==8398== still reachable: 1,475,924 bytes in 11,420 blocks. ==8398== suppressed: 0 bytes in 0 blocks. ==8398== Reachable blocks (those to which a pointer was found) are not shown. ------------------------------------------------------------------------ [2009-11-16 02:08:53] srina...@php.net looking at the source of the crash and that it happens only when used with --enable-zend-multibyte , i think, this issue has nothing to do with phar is enabled or not. (yes, it happens even if it is disabled). i think, my gut feeling it that this issue has some thing to do how to memory is allocated / reallocated when the file is being parsed with zend-multi-byte mode is enabled. just a theory at this point. i need to debug more though. any useful pointers will be much appreciated .. with respect to the platform,if you notice closely, you will notice that the bug report mentions both solaris and linux. yes, i do luv and Linux and valgrind.. unfortunately, i didn't get time to look into this last thursday and friday as I had to deal with some urgent family matters but i hope to look into this more on monday (it is still sunday for me here .. :-) ) ------------------------------------------------------------------------ [2009-11-15 21:54:52] ka...@php.net Just wondering, does --disable-phar change anything here? How about on other systems than Solaris? ------------------------------------------------------------------------ [2009-11-11 08:33:23] srina...@php.net af course, this issue is not reproduced when used with USE_ZEND_ALLOC=0. this can be a temporary work around until this issue is further investigated. ------------------------------------------------------------------------ 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/50145 -- Edit this bug report at http://bugs.php.net/?id=50145&edit=1