Bug #76510 [Opn]: file_exists() stopped working for phar:// in PHP 7.3

From: Date: Mon, 06 Aug 2018 19:01:33 +0000
Subject: Bug #76510 [Opn]: file_exists() stopped working for phar:// in PHP 7.3
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-216641@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76510&edit=1 ID: 76510 Updated by: sebastian@php.net Reported by: sebastian@php.net Summary: file_exists() stopped working for phar:// in PHP 7.3 Status: Open Type: Bug Package: PHAR related Operating System: Linux PHP Version: 7.3Git-2018-06-21 (Git) Block user comment: N Private report: N New Comment: $ USE_ZEND_ALLOC=0 valgrind --tool=memcheck --num-callers=30 --log-file=/tmp/valgrind.txt --track-origins=yes /usr/local/php-7.3/bin/php ../../../phpunit ==20559== Memcheck, a memory error detector ==20559== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==20559== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info ==20559== Command: /usr/local/php-7.3/bin/php ../../../phpunit ==20559== Parent PID: 19979 ==20559== ==20559== Conditional jump or move depends on uninitialised value(s) ==20559== at 0x4072122: ??? ==20559== by 0x1BEB2687: ??? ==20559== by 0x1BEB2687: ??? ==20559== by 0x1BEB26AC: ??? ==20559== by 0xEB577AF: ??? ==20559== by 0x1BEB2687: ??? ==20559== Uninitialised value was created by a heap allocation ==20559== at 0x4C2EBAB: malloc (vg_replace_malloc.c:299) ==20559== by 0x82D278: __zend_malloc (zend_alloc.c:2896) ==20559== by 0x7B0AC6: zend_string_alloc (zend_string.h:133) ==20559== by 0x7B0AC6: php_str_to_str_ex (string.c:3266) ==20559== by 0x7B6629: php_str_replace_in_subject.isra.4 (string.c:4409) ==20559== by 0x7B6D6E: php_str_replace_common (string.c:4478) ==20559== by 0x8D0007: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:690) ==20559== by 0x8D0007: execute_ex (zend_vm_execute.h:55462) ==20559== by 0x8466F5: zend_call_function (zend_execute_API.c:756) ==20559== by 0x86DCBC: zend_call_method (zend_interfaces.c:103) ==20559== by 0x7549D1: spl_filter_it_fetch (spl_iterators.c:1833) ==20559== by 0x7549D1: spl_filter_it_rewind (spl_iterators.c:1852) ==20559== by 0x7549D1: zim_spl_FilterIterator_rewind (spl_iterators.c:1872) ==20559== by 0x8465B1: zend_call_function (zend_execute_API.c:770) ==20559== by 0x86DCBC: zend_call_method (zend_interfaces.c:103) ==20559== by 0x86E1AA: zend_user_it_rewind (zend_interfaces.c:224) ==20559== by 0x755CD6: spl_dual_it_rewind (spl_iterators.c:1671) ==20559== by 0x755CD6: spl_append_it_next_iterator (spl_iterators.c:3319) ==20559== by 0x75606F: zim_spl_AppendIterator_append (spl_iterators.c:3376) ==20559== by 0x8D5667: ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:980) ==20559== by 0x8D5667: execute_ex (zend_vm_execute.h:55482) ==20559== by 0x8D5F41: zend_execute (zend_vm_execute.h:60882) ==20559== by 0x853963: zend_execute_scripts (zend.c:1562) ==20559== by 0x7F89FF: php_execute_script (main.c:2630) ==20559== by 0x8D83A5: do_cli (php_cli.c:997) ==20559== by 0x47AB55: main (php_cli.c:1390) ==20559== ==20559== Conditional jump or move depends on uninitialised value(s) ==20559== at 0x4072122: ??? ==20559== by 0x1BEB6A57: ??? ==20559== by 0x1BEB6A57: ??? ==20559== by 0x1BEB6A7C: ??? ==20559== by 0xEB577AF: ??? ==20559== by 0x1BEB6A57: ??? ==20559== Uninitialised value was created by a heap allocation ==20559== at 0x4C2EBAB: malloc (vg_replace_malloc.c:299) ==20559== by 0x82D278: __zend_malloc (zend_alloc.c:2896) ==20559== by 0x7B0AC6: zend_string_alloc (zend_string.h:133) ==20559== by 0x7B0AC6: php_str_to_str_ex (string.c:3266) ==20559== by 0x7B6629: php_str_replace_in_subject.isra.4 (string.c:4409) ==20559== by 0x7B6D6E: php_str_replace_common (string.c:4478) ==20559== by 0x8D0007: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:690) ==20559== by 0x8D0007: execute_ex (zend_vm_execute.h:55462) ==20559== by 0x8466F5: zend_call_function (zend_execute_API.c:756) ==20559== by 0x86DCBC: zend_call_method (zend_interfaces.c:103) ==20559== by 0x7549D1: spl_filter_it_fetch (spl_iterators.c:1833) ==20559== by 0x7549D1: spl_filter_it_rewind (spl_iterators.c:1852) ==20559== by 0x7549D1: zim_spl_FilterIterator_rewind (spl_iterators.c:1872) ==20559== by 0x8465B1: zend_call_function (zend_execute_API.c:770) ==20559== by 0x86DCBC: zend_call_method (zend_interfaces.c:103) ==20559== by 0x86E1AA: zend_user_it_rewind (zend_interfaces.c:224) ==20559== by 0x755CD6: spl_dual_it_rewind (spl_iterators.c:1671) ==20559== by 0x755CD6: spl_append_it_next_iterator (spl_iterators.c:3319) ==20559== by 0x7560ED: zim_spl_AppendIterator_rewind (spl_iterators.c:3417) ==20559== by 0x8465B1: zend_call_function (zend_execute_API.c:770) ==20559== by 0x86DCBC: zend_call_method (zend_interfaces.c:103) ==20559== by 0x86E1AA: zend_user_it_rewind (zend_interfaces.c:224) ==20559== by 0x8902E1: zend_fe_reset_iterator (zend_execute.c:3256) ==20559== by 0x8B4D72: ZEND_FE_RESET_R_SPEC_CV_HANDLER (zend_vm_execute.h:37768) ==20559== by 0x8CD993: execute_ex (zend_vm_execute.h:59386) ==20559== by 0x8D5F41: zend_execute (zend_vm_execute.h:60882) ==20559== by 0x853963: zend_execute_scripts (zend.c:1562) ==20559== by 0x7F89FF: php_execute_script (main.c:2630) ==20559== by 0x8D83A5: do_cli (php_cli.c:997) ==20559== by 0x47AB55: main (php_cli.c:1390) ==20559== ==20559== Conditional jump or move depends on uninitialised value(s) ==20559== at 0x4072122: ??? ==20559== by 0x1BF75907: ??? ==20559== by 0x1BF75907: ??? ==20559== by 0x1BF75913: ??? ==20559== by 0xEB577AF: ??? ==20559== by 0x1BF75907: ??? ==20559== Uninitialised value was created by a heap allocation ==20559== at 0x4C2EBAB: malloc (vg_replace_malloc.c:299) ==20559== by 0x82D278: __zend_malloc (zend_alloc.c:2896) ==20559== by 0x7B0AC6: zend_string_alloc (zend_string.h:133) ==20559== by 0x7B0AC6: php_str_to_str_ex (string.c:3266) ==20559== by 0x7B6629: php_str_replace_in_subject.isra.4 (string.c:4409) ==20559== by 0x7B6D6E: php_str_replace_common (string.c:4478) ==20559== by 0x8D0007: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:690) ==20559== by 0x8D0007: execute_ex (zend_vm_execute.h:55462) ==20559== by 0x8466F5: zend_call_function (zend_execute_API.c:756) ==20559== by 0x86DCBC: zend_call_method (zend_interfaces.c:103) ==20559== by 0x7549D1: spl_filter_it_fetch (spl_iterators.c:1833) ==20559== by 0x7549D1: spl_filter_it_rewind (spl_iterators.c:1852) ==20559== by 0x7549D1: zim_spl_FilterIterator_rewind (spl_iterators.c:1872) ==20559== by 0x8465B1: zend_call_function (zend_execute_API.c:770) ==20559== by 0x86DCBC: zend_call_method (zend_interfaces.c:103) ==20559== by 0x86E1AA: zend_user_it_rewind (zend_interfaces.c:224) ==20559== by 0x755CD6: spl_dual_it_rewind (spl_iterators.c:1671) ==20559== by 0x755CD6: spl_append_it_next_iterator (spl_iterators.c:3319) ==20559== by 0x75606F: zim_spl_AppendIterator_append (spl_iterators.c:3376) ==20559== by 0x8D5667: ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:980) ==20559== by 0x8D5667: execute_ex (zend_vm_execute.h:55482) ==20559== by 0x8D5F41: zend_execute (zend_vm_execute.h:60882) ==20559== by 0x853963: zend_execute_scripts (zend.c:1562) ==20559== by 0x7F89FF: php_execute_script (main.c:2630) ==20559== by 0x8D83A5: do_cli (php_cli.c:997) ==20559== by 0x47AB55: main (php_cli.c:1390) ==20559== ==20559== Conditional jump or move depends on uninitialised value(s) ==20559== at 0x4072122: ??? ==20559== by 0x1BF77587: ??? ==20559== by 0x1BF77587: ??? ==20559== by 0x1BF77593: ??? ==20559== by 0xEB577AF: ??? ==20559== by 0x1BF77587: ??? ==20559== Uninitialised value was created by a heap allocation ==20559== at 0x4C2EBAB: malloc (vg_replace_malloc.c:299) ==20559== by 0x82D278: __zend_malloc (zend_alloc.c:2896) ==20559== by 0x7B0AC6: zend_string_alloc (zend_string.h:133) ==20559== by 0x7B0AC6: php_str_to_str_ex (string.c:3266) ==20559== by 0x7B6629: php_str_replace_in_subject.isra.4 (string.c:4409) ==20559== by 0x7B6D6E: php_str_replace_common (string.c:4478) ==20559== by 0x8D0007: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:690) ==20559== by 0x8D0007: execute_ex (zend_vm_execute.h:55462) ==20559== by 0x8466F5: zend_call_function (zend_execute_API.c:756) ==20559== by 0x86DCBC: zend_call_method (zend_interfaces.c:103) ==20559== by 0x7549D1: spl_filter_it_fetch (spl_iterators.c:1833) ==20559== by 0x7549D1: spl_filter_it_rewind (spl_iterators.c:1852) ==20559== by 0x7549D1: zim_spl_FilterIterator_rewind (spl_iterators.c:1872) ==20559== by 0x8465B1: zend_call_function (zend_execute_API.c:770) ==20559== by 0x86DCBC: zend_call_method (zend_interfaces.c:103) ==20559== by 0x86E1AA: zend_user_it_rewind (zend_interfaces.c:224) ==20559== by 0x755CD6: spl_dual_it_rewind (spl_iterators.c:1671) ==20559== by 0x755CD6: spl_append_it_next_iterator (spl_iterators.c:3319) ==20559== by 0x7560ED: zim_spl_AppendIterator_rewind (spl_iterators.c:3417) ==20559== by 0x8465B1: zend_call_function (zend_execute_API.c:770) ==20559== by 0x86DCBC: zend_call_method (zend_interfaces.c:103) ==20559== by 0x86E1AA: zend_user_it_rewind (zend_interfaces.c:224) ==20559== by 0x8902E1: zend_fe_reset_iterator (zend_execute.c:3256) ==20559== by 0x8B4D72: ZEND_FE_RESET_R_SPEC_CV_HANDLER (zend_vm_execute.h:37768) ==20559== by 0x8CD993: execute_ex (zend_vm_execute.h:59386) ==20559== by 0x8D5F41: zend_execute (zend_vm_execute.h:60882) ==20559== by 0x853963: zend_execute_scripts (zend.c:1562) ==20559== by 0x7F89FF: php_execute_script (main.c:2630) ==20559== by 0x8D83A5: do_cli (php_cli.c:997) ==20559== by 0x47AB55: main (php_cli.c:1390) ==20559== ==20559== Invalid read of size 1 ==20559== at 0x848DF7: zend_string_release_ex (zend_string.h:284) ==20559== by 0x848DF7: destroy_zend_class (zend_opcode.c:241) ==20559== by 0x8459F3: shutdown_executor (zend_execute_API.c:345) ==20559== by 0x853677: zend_deactivate (zend.c:1104) ==20559== by 0x7F761A: php_request_shutdown (main.c:1926) ==20559== by 0x8D77D5: do_cli (php_cli.c:1164) ==20559== by 0x47AB55: main (php_cli.c:1390) ==20559== Address 0x1ba482f4 is 4 bytes inside a block of size 56 free'd ==20559== at 0x4C2FDAC: free (vg_replace_malloc.c:530) ==20559== by 0x848E05: zend_string_release_ex (zend_string.h:291) ==20559== by 0x848E05: destroy_zend_class (zend_opcode.c:241) ==20559== by 0x8459F3: shutdown_executor (zend_execute_API.c:345) ==20559== by 0x853677: zend_deactivate (zend.c:1104) ==20559== by 0x7F761A: php_request_shutdown (main.c:1926) ==20559== by 0x8D77D5: do_cli (php_cli.c:1164) ==20559== by 0x47AB55: main (php_cli.c:1390) ==20559== Block was alloc'd at ==20559== at 0x4C2EBAB: malloc (vg_replace_malloc.c:299) ==20559== by 0x82D278: __zend_malloc (zend_alloc.c:2896) ==20559== by 0x822E2A: zend_string_alloc (zend_string.h:133) ==20559== by 0x822E2A: zend_string_init (zend_string.h:155) ==20559== by 0x822E2A: lex_scan (zend_language_scanner.l:2109) ==20559== by 0x836668: zendlex (zend_compile.c:1693) ==20559== by 0x81C3DD: zendparse (zend_language_parser.c:4211) ==20559== by 0x81E7C2: zend_compile (zend_language_scanner.l:586) ==20559== by 0x81FEE1: compile_file (zend_language_scanner.l:636) ==20559== by 0x6E85F1: phar_compile_file (phar.c:3335) ==20559== by 0x81FF68: compile_filename (zend_language_scanner.l:661) ==20559== by 0x893864: zend_include_or_eval (zend_execute.c:3182) ==20559== by 0x8C8AA9: ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER (zend_vm_execute.h:37674) ==20559== by 0x8CD99E: execute_ex (zend_vm_execute.h:59382) ==20559== by 0x8466F5: zend_call_function (zend_execute_API.c:756) ==20559== by 0x74B54D: zif_spl_autoload_call (php_spl.c:448) ==20559== by 0x8465B1: zend_call_function (zend_execute_API.c:770) ==20559== by 0x846A57: zend_lookup_class_ex (zend_execute_API.c:926) ==20559== by 0x847397: zend_fetch_class_by_name (zend_execute_API.c:1361) ==20559== by 0x89BA8A: ZEND_DECLARE_INHERITED_CLASS_SPEC_CONST_CONST_HANDLER (zend_vm_execute.h:5837) ==20559== by 0x8CF616: execute_ex (zend_vm_execute.h:56000) ==20559== by 0x8466F5: zend_call_function (zend_execute_API.c:756) ==20559== by 0x74B54D: zif_spl_autoload_call (php_spl.c:448) ==20559== by 0x8465B1: zend_call_function (zend_execute_API.c:770) ==20559== by 0x846A57: zend_lookup_class_ex (zend_execute_API.c:926) ==20559== by 0x847397: zend_fetch_class_by_name (zend_execute_API.c:1361) ==20559== by 0x89BA8A: ZEND_DECLARE_INHERITED_CLASS_SPEC_CONST_CONST_HANDLER (zend_vm_execute.h:5837) ==20559== by 0x8CF616: execute_ex (zend_vm_execute.h:56000) ==20559== by 0x8D5F41: zend_execute (zend_vm_execute.h:60882) ==20559== by 0x853963: zend_execute_scripts (zend.c:1562) ==20559== by 0x7F89FF: php_execute_script (main.c:2630) ==20559== by 0x8D83A5: do_cli (php_cli.c:997) ==20559== ==20559== Invalid read of size 4 ==20559== at 0x848DFD: zend_gc_delref (zend_types.h:988) ==20559== by 0x848DFD: zend_string_release_ex (zend_string.h:285) ==20559== by 0x848DFD: destroy_zend_class (zend_opcode.c:241) ==20559== by 0x8459F3: shutdown_executor (zend_execute_API.c:345) ==20559== by 0x853677: zend_deactivate (zend.c:1104) ==20559== by 0x7F761A: php_request_shutdown (main.c:1926) ==20559== by 0x8D77D5: do_cli (php_cli.c:1164) ==20559== by 0x47AB55: main (php_cli.c:1390) ==20559== Address 0x1ba482f0 is 0 bytes inside a block of size 56 free'd ==20559== at 0x4C2FDAC: free (vg_replace_malloc.c:530) ==20559== by 0x848E05: zend_string_release_ex (zend_string.h:291) ==20559== by 0x848E05: destroy_zend_class (zend_opcode.c:241) ==20559== by 0x8459F3: shutdown_executor (zend_execute_API.c:345) ==20559== by 0x853677: zend_deactivate (zend.c:1104) ==20559== by 0x7F761A: php_request_shutdown (main.c:1926) ==20559== by 0x8D77D5: do_cli (php_cli.c:1164) ==20559== by 0x47AB55: main (php_cli.c:1390) ==20559== Block was alloc'd at ==20559== at 0x4C2EBAB: malloc (vg_replace_malloc.c:299) ==20559== by 0x82D278: __zend_malloc (zend_alloc.c:2896) ==20559== by 0x822E2A: zend_string_alloc (zend_string.h:133) ==20559== by 0x822E2A: zend_string_init (zend_string.h:155) ==20559== by 0x822E2A: lex_scan (zend_language_scanner.l:2109) ==20559== by 0x836668: zendlex (zend_compile.c:1693) ==20559== by 0x81C3DD: zendparse (zend_language_parser.c:4211) ==20559== by 0x81E7C2: zend_compile (zend_language_scanner.l:586) ==20559== by 0x81FEE1: compile_file (zend_language_scanner.l:636) ==20559== by 0x6E85F1: phar_compile_file (phar.c:3335) ==20559== by 0x81FF68: compile_filename (zend_language_scanner.l:661) ==20559== by 0x893864: zend_include_or_eval (zend_execute.c:3182) ==20559== by 0x8C8AA9: ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER (zend_vm_execute.h:37674) ==20559== by 0x8CD99E: execute_ex (zend_vm_execute.h:59382) ==20559== by 0x8466F5: zend_call_function (zend_execute_API.c:756) ==20559== by 0x74B54D: zif_spl_autoload_call (php_spl.c:448) ==20559== by 0x8465B1: zend_call_function (zend_execute_API.c:770) ==20559== by 0x846A57: zend_lookup_class_ex (zend_execute_API.c:926) ==20559== by 0x847397: zend_fetch_class_by_name (zend_execute_API.c:1361) ==20559== by 0x89BA8A: ZEND_DECLARE_INHERITED_CLASS_SPEC_CONST_CONST_HANDLER (zend_vm_execute.h:5837) ==20559== by 0x8CF616: execute_ex (zend_vm_execute.h:56000) ==20559== by 0x8466F5: zend_call_function (zend_execute_API.c:756) ==20559== by 0x74B54D: zif_spl_autoload_call (php_spl.c:448) ==20559== by 0x8465B1: zend_call_function (zend_execute_API.c:770) ==20559== by 0x846A57: zend_lookup_class_ex (zend_execute_API.c:926) ==20559== by 0x847397: zend_fetch_class_by_name (zend_execute_API.c:1361) ==20559== by 0x89BA8A: ZEND_DECLARE_INHERITED_CLASS_SPEC_CONST_CONST_HANDLER (zend_vm_execute.h:5837) ==20559== by 0x8CF616: execute_ex (zend_vm_execute.h:56000) ==20559== by 0x8D5F41: zend_execute (zend_vm_execute.h:60882) ==20559== by 0x853963: zend_execute_scripts (zend.c:1562) ==20559== by 0x7F89FF: php_execute_script (main.c:2630) ==20559== by 0x8D83A5: do_cli (php_cli.c:997) ==20559== ==20559== ==20559== HEAP SUMMARY: ==20559== in use at exit: 9,484 bytes in 70 blocks ==20559== total heap usage: 57,170 allocs, 57,100 frees, 10,884,542 bytes allocated ==20559== ==20559== LEAK SUMMARY: ==20559== definitely lost: 2,648 bytes in 21 blocks ==20559== indirectly lost: 5,142 bytes in 26 blocks ==20559== possibly lost: 640 bytes in 1 blocks ==20559== still reachable: 1,054 bytes in 22 blocks ==20559== suppressed: 0 bytes in 0 blocks ==20559== Rerun with --leak-check=full to see details of leaked memory ==20559== ==20559== For counts of detected and suppressed errors, rerun with: -v ==20559== ERROR SUMMARY: 10 errors from 6 contexts (suppressed: 0 from 0) Previous Comments: ------------------------------------------------------------------------ [2018-08-06 15:59:03] cmb@php.net Please run that again with valgrind --track-origins=yes. ------------------------------------------------------------------------ [2018-08-06 15:16:17] sebastian@php.net As requested by Nikita on the mailinglist, here is the Valgrind logfile: ==21544== Memcheck, a memory error detector ==21544== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==21544== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info ==21544== Command: /usr/local/php-7.3/bin/php ../../../phpunit ==21544== Parent PID: 19592 ==21544== ==21544== Conditional jump or move depends on uninitialised value(s) ==21544== at 0x4072122: ??? ==21544== by 0x1BEB2267: ??? ==21544== by 0x1BEB2267: ??? ==21544== by 0x1BEB228C: ??? ==21544== by 0xEB577AF: ??? ==21544== by 0x1BEB2267: ??? ==21544== ==21544== Conditional jump or move depends on uninitialised value(s) ==21544== at 0x4072122: ??? ==21544== by 0x1BEB6637: ??? ==21544== by 0x1BEB6637: ??? ==21544== by 0x1BEB665C: ??? ==21544== by 0xEB577AF: ??? ==21544== by 0x1BEB6637: ??? ==21544== ==21544== Conditional jump or move depends on uninitialised value(s) ==21544== at 0x4072122: ??? ==21544== by 0x1BF754E7: ??? ==21544== by 0x1BF754E7: ??? ==21544== by 0x1BF754F3: ??? ==21544== by 0xEB577AF: ??? ==21544== by 0x1BF754E7: ??? ==21544== ==21544== Conditional jump or move depends on uninitialised value(s) ==21544== at 0x4072122: ??? ==21544== by 0x1BF77167: ??? ==21544== by 0x1BF77167: ??? ==21544== by 0x1BF77173: ??? ==21544== by 0xEB577AF: ??? ==21544== by 0x1BF77167: ??? ==21544== ==21544== Invalid read of size 1 ==21544== at 0x848DF7: destroy_zend_class (in /usr/local/php-7.3/bin/php) ==21544== by 0x8459F3: shutdown_executor (in /usr/local/php-7.3/bin/php) ==21544== by 0x853677: zend_deactivate (in /usr/local/php-7.3/bin/php) ==21544== by 0x7F761A: php_request_shutdown (in /usr/local/php-7.3/bin/php) ==21544== by 0x8D77D5: do_cli (in /usr/local/php-7.3/bin/php) ==21544== by 0x47AB55: main (in /usr/local/php-7.3/bin/php) ==21544== Address 0x1ba482f4 is 4 bytes inside a block of size 56 free'd ==21544== at 0x4C2FDAC: free (vg_replace_malloc.c:530) ==21544== by 0x848E05: destroy_zend_class (in /usr/local/php-7.3/bin/php) ==21544== by 0x8459F3: shutdown_executor (in /usr/local/php-7.3/bin/php) ==21544== by 0x853677: zend_deactivate (in /usr/local/php-7.3/bin/php) ==21544== by 0x7F761A: php_request_shutdown (in /usr/local/php-7.3/bin/php) ==21544== by 0x8D77D5: do_cli (in /usr/local/php-7.3/bin/php) ==21544== by 0x47AB55: main (in /usr/local/php-7.3/bin/php) ==21544== Block was alloc'd at ==21544== at 0x4C2EBAB: malloc (vg_replace_malloc.c:299) ==21544== by 0x82D278: __zend_malloc (in /usr/local/php-7.3/bin/php) ==21544== by 0x822E2A: lex_scan (in /usr/local/php-7.3/bin/php) ==21544== by 0x836668: zendlex (in /usr/local/php-7.3/bin/php) ==21544== by 0x81C3DD: zendparse (in /usr/local/php-7.3/bin/php) ==21544== by 0x81E7C2: zend_compile (in /usr/local/php-7.3/bin/php) ==21544== by 0x81FEE1: compile_file (in /usr/local/php-7.3/bin/php) ==21544== by 0x6E85F1: phar_compile_file (in /usr/local/php-7.3/bin/php) ==21544== by 0x81FF68: compile_filename (in /usr/local/php-7.3/bin/php) ==21544== by 0x893864: zend_include_or_eval (in /usr/local/php-7.3/bin/php) ==21544== by 0x8C8AA9: ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER (in /usr/local/php-7.3/bin/php) ==21544== by 0x8CD99E: execute_ex (in /usr/local/php-7.3/bin/php) ==21544== by 0x8466F5: zend_call_function (in /usr/local/php-7.3/bin/php) ==21544== by 0x74B54D: zif_spl_autoload_call (in /usr/local/php-7.3/bin/php) ==21544== by 0x8465B1: zend_call_function (in /usr/local/php-7.3/bin/php) ==21544== by 0x846A57: zend_lookup_class_ex (in /usr/local/php-7.3/bin/php) ==21544== by 0x847397: zend_fetch_class_by_name (in /usr/local/php-7.3/bin/php) ==21544== by 0x89BA8A: ZEND_DECLARE_INHERITED_CLASS_SPEC_CONST_CONST_HANDLER (in /usr/local/php-7.3/bin/php) ==21544== by 0x8CF616: execute_ex (in /usr/local/php-7.3/bin/php) ==21544== by 0x8466F5: zend_call_function (in /usr/local/php-7.3/bin/php) ==21544== by 0x74B54D: zif_spl_autoload_call (in /usr/local/php-7.3/bin/php) ==21544== by 0x8465B1: zend_call_function (in /usr/local/php-7.3/bin/php) ==21544== by 0x846A57: zend_lookup_class_ex (in /usr/local/php-7.3/bin/php) ==21544== by 0x847397: zend_fetch_class_by_name (in /usr/local/php-7.3/bin/php) ==21544== by 0x89BA8A: ZEND_DECLARE_INHERITED_CLASS_SPEC_CONST_CONST_HANDLER (in /usr/local/php-7.3/bin/php) ==21544== by 0x8CF616: execute_ex (in /usr/local/php-7.3/bin/php) ==21544== by 0x8D5F41: zend_execute (in /usr/local/php-7.3/bin/php) ==21544== by 0x853963: zend_execute_scripts (in /usr/local/php-7.3/bin/php) ==21544== by 0x7F89FF: php_execute_script (in /usr/local/php-7.3/bin/php) ==21544== by 0x8D83A5: do_cli (in /usr/local/php-7.3/bin/php) ==21544== ==21544== Invalid read of size 4 ==21544== at 0x848DFD: destroy_zend_class (in /usr/local/php-7.3/bin/php) ==21544== by 0x8459F3: shutdown_executor (in /usr/local/php-7.3/bin/php) ==21544== by 0x853677: zend_deactivate (in /usr/local/php-7.3/bin/php) ==21544== by 0x7F761A: php_request_shutdown (in /usr/local/php-7.3/bin/php) ==21544== by 0x8D77D5: do_cli (in /usr/local/php-7.3/bin/php) ==21544== by 0x47AB55: main (in /usr/local/php-7.3/bin/php) ==21544== Address 0x1ba482f0 is 0 bytes inside a block of size 56 free'd ==21544== at 0x4C2FDAC: free (vg_replace_malloc.c:530) ==21544== by 0x848E05: destroy_zend_class (in /usr/local/php-7.3/bin/php) ==21544== by 0x8459F3: shutdown_executor (in /usr/local/php-7.3/bin/php) ==21544== by 0x853677: zend_deactivate (in /usr/local/php-7.3/bin/php) ==21544== by 0x7F761A: php_request_shutdown (in /usr/local/php-7.3/bin/php) ==21544== by 0x8D77D5: do_cli (in /usr/local/php-7.3/bin/php) ==21544== by 0x47AB55: main (in /usr/local/php-7.3/bin/php) ==21544== Block was alloc'd at ==21544== at 0x4C2EBAB: malloc (vg_replace_malloc.c:299) ==21544== by 0x82D278: __zend_malloc (in /usr/local/php-7.3/bin/php) ==21544== by 0x822E2A: lex_scan (in /usr/local/php-7.3/bin/php) ==21544== by 0x836668: zendlex (in /usr/local/php-7.3/bin/php) ==21544== by 0x81C3DD: zendparse (in /usr/local/php-7.3/bin/php) ==21544== by 0x81E7C2: zend_compile (in /usr/local/php-7.3/bin/php) ==21544== by 0x81FEE1: compile_file (in /usr/local/php-7.3/bin/php) ==21544== by 0x6E85F1: phar_compile_file (in /usr/local/php-7.3/bin/php) ==21544== by 0x81FF68: compile_filename (in /usr/local/php-7.3/bin/php) ==21544== by 0x893864: zend_include_or_eval (in /usr/local/php-7.3/bin/php) ==21544== by 0x8C8AA9: ZEND_INCLUDE_OR_EVAL_SPEC_CV_HANDLER (in /usr/local/php-7.3/bin/php) ==21544== by 0x8CD99E: execute_ex (in /usr/local/php-7.3/bin/php) ==21544== by 0x8466F5: zend_call_function (in /usr/local/php-7.3/bin/php) ==21544== by 0x74B54D: zif_spl_autoload_call (in /usr/local/php-7.3/bin/php) ==21544== by 0x8465B1: zend_call_function (in /usr/local/php-7.3/bin/php) ==21544== by 0x846A57: zend_lookup_class_ex (in /usr/local/php-7.3/bin/php) ==21544== by 0x847397: zend_fetch_class_by_name (in /usr/local/php-7.3/bin/php) ==21544== by 0x89BA8A: ZEND_DECLARE_INHERITED_CLASS_SPEC_CONST_CONST_HANDLER (in /usr/local/php-7.3/bin/php) ==21544== by 0x8CF616: execute_ex (in /usr/local/php-7.3/bin/php) ==21544== by 0x8466F5: zend_call_function (in /usr/local/php-7.3/bin/php) ==21544== by 0x74B54D: zif_spl_autoload_call (in /usr/local/php-7.3/bin/php) ==21544== by 0x8465B1: zend_call_function (in /usr/local/php-7.3/bin/php) ==21544== by 0x846A57: zend_lookup_class_ex (in /usr/local/php-7.3/bin/php) ==21544== by 0x847397: zend_fetch_class_by_name (in /usr/local/php-7.3/bin/php) ==21544== by 0x89BA8A: ZEND_DECLARE_INHERITED_CLASS_SPEC_CONST_CONST_HANDLER (in /usr/local/php-7.3/bin/php) ==21544== by 0x8CF616: execute_ex (in /usr/local/php-7.3/bin/php) ==21544== by 0x8D5F41: zend_execute (in /usr/local/php-7.3/bin/php) ==21544== by 0x853963: zend_execute_scripts (in /usr/local/php-7.3/bin/php) ==21544== by 0x7F89FF: php_execute_script (in /usr/local/php-7.3/bin/php) ==21544== by 0x8D83A5: do_cli (in /usr/local/php-7.3/bin/php) ==21544== ==21544== ==21544== HEAP SUMMARY: ==21544== in use at exit: 9,484 bytes in 70 blocks ==21544== total heap usage: 57,160 allocs, 57,090 frees, 10,884,126 bytes allocated ==21544== ==21544== LEAK SUMMARY: ==21544== definitely lost: 2,648 bytes in 21 blocks ==21544== indirectly lost: 5,142 bytes in 26 blocks ==21544== possibly lost: 640 bytes in 1 blocks ==21544== still reachable: 1,054 bytes in 22 blocks ==21544== suppressed: 0 bytes in 0 blocks ==21544== Rerun with --leak-check=full to see details of leaked memory ==21544== ==21544== For counts of detected and suppressed errors, rerun with: -v ==21544== Use --track-origins=yes to see where uninitialised values come from ==21544== ERROR SUMMARY: 10 errors from 6 contexts (suppressed: 0 from 0) Not sure how useful this is, though, as I cannot compile PHP with --enable-debug as that overrides "-O2" with "-O0". ------------------------------------------------------------------------ [2018-08-05 14:11:33] cmb@php.net > What I find weird is that you were able to reproduce the issue > initially but now you no longer can while I am still seeing it. Initially, I've built PHP “incrementally”, i.e. I started with a minimal build, and did config.nice … && make to add the required extensions. That let the test fail. If I build with exactly the same configure options in one go, the test succeeds. gcc (Debian 6.3.0-18) 6.3.0 20170516 ------------------------------------------------------------------------ [2018-08-04 06:37:06] sebastian@php.net I can confirm that compiling PHP with -fno-optimize-strlen solves the problem for me. ------------------------------------------------------------------------ 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 https://bugs.php.net/bug.php?id=76510 -- Edit this bug report at https://bugs.php.net/bug.php?id=76510&edit=1

« previous php.bugs (#216641) next »