Bug #61186 [NEW]: valgrind complain of invalid reading
| From: | laruence@php.net | Date: | Sun, 26 Feb 2012 15:12:05 +0000 |
| Subject: | Bug #61186 [NEW]: valgrind complain of invalid reading | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-167853@lists.php.net to get a copy of this message | ||
From: laruence
Operating system:
PHP version: 5.3.10
Package: Scripting Engine problem
Bug Type: Bug
Bug description:valgrind complain of invalid reading
Description:
------------
while use valgrind exam PHP 5.3, it complain of invalid reading.
Test script:
---------------
<?php
echo 2;
?>
#run
$USE_ZEND_ALLOC=0 valgrind php53 above.php
Expected result:
----------------
no complaint
Actual result:
--------------
==11759== Memcheck, a memory error detector
==11759== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==11759== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright
info
==11759== Command: php above.php
==11759==
==11759== Invalid read of size 1
==11759== at 0x8F4D95: lex_scan (zend_language_scanner.c:1028)
==11759== by 0x932C91: zendlex (zend_compile.c:4975)
==11759== by 0x8EA7E3: zendparse (zend_language_parser.c:2948)
==11759== by 0x8F240B: compile_file (zend_language_scanner.l:364)
==11759== by 0x6CA931: phar_compile_file (phar.c:3393)
==11759== by 0x94DD0E: zend_execute_scripts (zend.c:1228)
==11759== by 0x8B5E33: php_execute_script (main.c:2308)
==11759== by 0xA430C4: main (php_cli.c:1184)
==11759== Address 0x87ec132 is 0 bytes after a block of size 18 alloc'd
==11759== at 0x490514E: malloc (vg_replace_malloc.c:195)
==11759== by 0x91DC2D: _emalloc (zend_alloc.c:2348)
==11759== by 0x8F1E36: open_file_for_scanning
(zend_language_scanner.l:288)
==11759== by 0x8F2343: compile_file (zend_language_scanner.l:352)
==11759== by 0x6CA931: phar_compile_file (phar.c:3393)
==11759== by 0x94DD0E: zend_execute_scripts (zend.c:1228)
==11759== by 0x8B5E33: php_execute_script (main.c:2308)
==11759== by 0xA430C4: main (php_cli.c:1184)
==11759==
2==11759==
==11759== HEAP SUMMARY:
==11759== in use at exit: 46,688 bytes in 1,586 blocks
==11759== total heap usage: 29,304 allocs, 27,718 frees, 4,549,300 bytes
allocated
==11759==
==11759== LEAK SUMMARY:
==11759== definitely lost: 0 bytes in 0 blocks
==11759== indirectly lost: 0 bytes in 0 blocks
==11759== possibly lost: 0 bytes in 0 blocks
==11759== still reachable: 46,688 bytes in 1,586 blocks
==11759== suppressed: 0 bytes in 0 blocks
==11759== Rerun with --leak-check=full to see details of leaked memory
==11759==
==11759== For counts of detected and suppressed errors, rerun with: -v
==11759== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 4 from 4)
--
Edit bug report at https://bugs.php.net/bug.php?id=61186&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=61186&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=61186&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=61186&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=61186&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=61186&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=61186&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=61186&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=61186&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=61186&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=61186&r=support
Expected behavior: https://bugs.php.net/fix.php?id=61186&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=61186&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=61186&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=61186&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=61186&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=61186&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=61186&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=61186&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=61186&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=61186&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=61186&r=mysqlcfg