Edit report at https://bugs.php.net/bug.php?id=60194&edit=1
ID: 60194 Comment by: yohgaki at ohgaki dot net Reported by: yohgaki at ohgaki dot net Summary: --with-zend-multibyte and --enable-debug reports LEAK with run-test.php Status: Feedback Type: Bug Package: Unknown/Other Function Operating System: Linux PHP Version: 5.3SVN-2011-11-01 (SVN) Block user comment: N Private report: N New Comment: BTW, I'm using rpm package but the spec is plain ./configure && make && make install. gcc is $ LC_ALL=C gcc -v Using built-in specs. Target: x86_64-momonga-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man -- infodir=/usr/share/info --with-bugurl=http://developer.momonga- linux.org/kagemai/ --enable-bootstrap --enable-shared --enable-threads=posix -- enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable- libunwind-exceptions --enable-gnu-unique-object --enable- languages=c,c++,objc,obj-c++,java,fortran --enable-java-awt=gtk --disable-dssi - -with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj- multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse- ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic - -with-arch_32=i686 --build=x86_64-momonga-linux Thread model: posix gcc version 4.4.4 20100630 (Momonga Linux 7 4.4.4-3m.mo7) (GCC) Previous Comments: ------------------------------------------------------------------------ [2011-11-02 23:07:56] yohgaki at ohgaki dot net I have $ rpm -q re2c re2c-0.13.5-2m.mo7.x86_64 It may be causing it. What version are you using? ------------------------------------------------------------------------ [2011-11-02 12:05:33] johan...@php.net I can't reproduce that. As this happens in lex_scan: Do you by chance have have re2c installed and are therefore running a different parser than what is committed in svn? anything else special on your system? ------------------------------------------------------------------------ [2011-11-01 18:54:03] yohgaki at ohgaki dot net Description: ------------ PHP 5.3 trunk reports LEAKS with --enable-zend-multibyte and --enable-debug with valgrind 3.6.1. I also tested rather old 5.3.5 and got the same result. Trunk (php-src) seems fine. php-src-5.3]$ cat config.nice #! /bin/sh # # Created by configure './configure' \ '--prefix=/usr/local/php5.3' \ '--without-pear' \ '--enable-zend-multibyte' \ '--enable-debug' \ "$@" php-src-5.3]$ TEST_PHP_EXECUTABLE=./sapi/cli/php ./run-tests.php -m -n ===================================================================== PHP : ./sapi/cli/php PHP_SAPI : cli PHP_VERSION : 5.3.9-dev ZEND_VERSION: 2.3.0 PHP_OS : Linux - Linux dev.inter.es-i.jp 2.6.35.14-2m.mo7.x86_64 #1 SMP Mon Sep 12 11:09:50 JST 2011 x86_64 INI actual : /home/yohgaki/ext/svn/oss/php.net/php-src-5.3 More .INIs : CWD : /home/yohgaki/ext/svn/oss/php.net/php-src-5.3 Extra dirs : VALGRIND : valgrind-3.6.1 ===================================================================== TIME START 2011-11-02 03:39:09 ===================================================================== LEAK EXPECT [tests/run-test/test001.phpt] LEAK EXPECTF [tests/run-test/test002.phpt] LEAK EXPECTREGEX [tests/run-test/test003.phpt] LEAK INI section allows '=' [tests/run-test/test004.phpt] LEAK Error message handling (without ZendOptimizer) [tests/run- test/test005.phpt] LEAK Error messages are shown [tests/run-test/test006.phpt] (CTRL-Ced, many test reports LEAK but not all of them) php-src-5.3]$ cat tests/run-test/test001.mem ==12385== Invalid read of size 1 ==12385== at 0x7A429F: lex_scan (zend_language_scanner.c:1026) ==12385== by 0x7D12D9: zendlex (zend_compile.c:4969) ==12385== by 0x79C62C: zendparse (zend_language_parser.c:3299) ==12385== by 0x7A2AB4: compile_file (zend_language_scanner.l:364) ==12385== by 0x5F9983: phar_compile_file (phar.c:3391) ==12385== by 0x7E7121: zend_execute_scripts (zend.c:1228) ==12385== by 0x76E731: php_execute_script (main.c:2301) ==12385== by 0x8D2F5F: main (php_cli.c:1184) ==12385== Address 0x5052f65 is 0 bytes after a block of size 5 alloc'd ==12385== at 0x4A05FDE: malloc (vg_replace_malloc.c:236) ==12385== by 0x7C1501: _emalloc (zend_alloc.c:2348) ==12385== by 0x7A2809: open_file_for_scanning (zend_language_scanner.l:288) ==12385== by 0x7A2A32: compile_file (zend_language_scanner.l:352) ==12385== by 0x5F9983: phar_compile_file (phar.c:3391) ==12385== by 0x7E7121: zend_execute_scripts (zend.c:1228) ==12385== by 0x76E731: php_execute_script (main.c:2301) ==12385== by 0x8D2F5F: main (php_cli.c:1184) ==12385== Test script: --------------- N/A Expected result: ---------------- Tests should pass w/o LEAK. Actual result: -------------- It reports lots of LEAKs. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=60194&edit=1