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:
I have
$ rpm -q re2c
re2c-0.13.5-2m.mo7.x86_64
It may be causing it. What version are you using?
Previous Comments:
------------------------------------------------------------------------
[2011-11-02 12:05:33] [email protected]
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