php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79457 Valgrind errors during PHP initialization
Submitted: 2020-04-07 20:45 UTC Modified: 2021-08-22 04:22 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: maxsem dot wiki at gmail dot com Assigned:
Status: No Feedback Package: Scripting Engine problem
PHP Version: master OS: Debian 10
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: maxsem dot wiki at gmail dot com
New email:
PHP Version: OS:

 

 [2020-04-07 20:45 UTC] maxsem dot wiki at gmail dot com
Description:
------------
Running php compiled from git master, revision 4e69970fb746970655a865cee116c91b7b09d36b

$ valgrind php -r 'echo "foo";'
==17149== Memcheck, a memory error detector
==17149== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==17149== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info
==17149== Command: php -r echo\ "foo";
==17149== 
==17149== Conditional jump or move depends on uninitialised value(s)
==17149==    at 0x70DEB4: zend_string_equal_val (zend_string.c:403)
==17149==    by 0x6E3928: zend_string_equal_content (zend_string.h:310)
==17149==    by 0x6E5BDE: zend_hash_find_bucket (zend_hash.c:644)
==17149==    by 0x6EAE2D: zend_hash_find (zend_hash.c:2220)
==17149==    by 0x6523CB: cfg_get_entry_ex (php_ini.c:900)
==17149==    by 0x6470B3: php_get_configuration_directive_for_zend (main.c:1589)
==17149==    by 0x6D24E1: zend_get_configuration_directive (zend.c:1246)
==17149==    by 0x6F77BF: zend_register_ini_entries (zend_ini.c:245)
==17149==    by 0x64843A: php_module_startup (main.c:2239)
==17149==    by 0x7A38FF: php_cli_startup (php_cli.c:402)
==17149==    by 0x7A562A: main (php_cli.c:1318)
==17149== 
==17149== Conditional jump or move depends on uninitialised value(s)
==17149==    at 0x70DEB4: zend_string_equal_val (zend_string.c:403)
==17149==    by 0x70D2FB: zend_string_equal_content (zend_string.h:310)
==17149==    by 0x70D962: zend_interned_string_ht_lookup (zend_string.c:154)
==17149==    by 0x70DA7A: zend_new_interned_string_permanent (zend_string.c:194)
==17149==    by 0x6F7829: zend_register_ini_entries (zend_ini.c:248)
==17149==    by 0x64843A: php_module_startup (main.c:2239)
==17149==    by 0x7A38FF: php_cli_startup (php_cli.c:402)
==17149==    by 0x7A562A: main (php_cli.c:1318)
==17149== 
==17149== Conditional jump or move depends on uninitialised value(s)
==17149==    at 0x70DEB4: zend_string_equal_val (zend_string.c:403)
==17149==    by 0x6E3928: zend_string_equal_content (zend_string.h:310)
==17149==    by 0x6E818F: zend_hash_del (zend_hash.c:1361)
==17149==    by 0x6E0CE7: zend_declare_typed_property (zend_API.c:3588)
==17149==    by 0x6E1600: zend_declare_property_ex (zend_API.c:3775)
==17149==    by 0x6E1665: zend_declare_property (zend_API.c:3782)
==17149==    by 0x6E1761: zend_declare_property_long (zend_API.c:3811)
==17149==    by 0x3F6C48: zm_startup_dom (php_dom.c:589)
==17149==    by 0x6DA6F8: zend_startup_module_ex (zend_API.c:1751)
==17149==    by 0x6DA753: zend_startup_module_zval (zend_API.c:1766)
==17149==    by 0x6E992C: zend_hash_apply (zend_hash.c:1815)
==17149==    by 0x6DAD52: zend_startup_modules (zend_API.c:1877)
==17149== 
foo==17149== 
==17149== HEAP SUMMARY:
==17149==     in use at exit: 1,094 bytes in 20 blocks
==17149==   total heap usage: 12,317 allocs, 12,297 frees, 1,763,396 bytes allocated
==17149== 
==17149== LEAK SUMMARY:
==17149==    definitely lost: 0 bytes in 0 blocks
==17149==    indirectly lost: 0 bytes in 0 blocks
==17149==      possibly lost: 0 bytes in 0 blocks
==17149==    still reachable: 1,094 bytes in 20 blocks
==17149==         suppressed: 0 bytes in 0 blocks
==17149== Rerun with --leak-check=full to see details of leaked memory
==17149== 
==17149== For counts of detected and suppressed errors, rerun with: -v
==17149== Use --track-origins=yes to see where uninitialised values come from
==17149== ERROR SUMMARY: 262 errors from 3 contexts (suppressed: 0 from 0)



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-04-07 21:11 UTC] cmb@php.net
-Package: Testing related +Package: Scripting Engine problem -PHP Version: Next Major Version +PHP Version: master
 [2020-04-08 07:44 UTC] nikic@php.net
Please make sure that valgrind headers are available at configure time. You can also specify --with-valgrind to enforce this.
 [2020-04-08 15:38 UTC] maxsem dot wiki at gmail dot com
Tried, still see the errors:

$ php -i|grep configure
Configure Command =>  './configure'  '--enable-debug' '--with-readline' '--with-valgrind'
 [2021-08-12 11:08 UTC] nikic@php.net
-Status: Open +Status: Feedback
 [2021-08-12 11:08 UTC] nikic@php.net
Does this issue still occur? I can reproduce this with PHP 7.4 compiled without valgrind, but not when compiled with valgrind.

Since PHP 8.1, having valgrind available at compilation time is not necessary anymore, a valgrind-friendly implementation is automatically picked at runtime.
 [2021-08-22 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 02:01:30 2024 UTC