Bug #79128 [Com]: Preloading segfaults if preload_user is used
| From: | dotbox at gmail dot com | Date: | Fri, 24 Jan 2020 15:58:14 +0000 |
| Subject: | Bug #79128 [Com]: Preloading segfaults if preload_user is used | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-225107@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=79128&edit=1
ID: 79128
Comment by: dotbox at gmail dot com
Reported by: dotbox at gmail dot com
Summary: Preloading segfaults if preload_user is used
Status: Closed
Type: Bug
Package: opcache
Operating System: Debian Buster
PHP Version: 7.4.2
Assigned To: nikic
Block user comment: N
Private report: N
New Comment:
I can confirm this works. You ROCK! :-D
Previous Comments:
------------------------------------------------------------------------
[2020-01-24 15:24:54] nikic@php.net
Related To: Bug #79043
------------------------------------------------------------------------
[2020-01-24 15:20:37] nikic@php.net
Automatic comment on behalf of nikita.ppv@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=3291891408556cb412bf1093a6112951dec1421e
Log: Fixed bug #79128
------------------------------------------------------------------------
[2020-01-24 15:10:19] nikic@php.net
Here is the valgrind trace:
==375== Invalid write of size 8
==375== at 0x126BA2AA: _zend_hash_append_ex (zend_hash.h:1126)
==375== by 0x126C5EEE: preload_load (ZendAccelerator.c:4217)
==375== by 0x126C7906: accel_finish_startup (ZendAccelerator.c:4657)
==375== by 0x126C1FBD: accel_post_startup (ZendAccelerator.c:3032)
==375== by 0x93BE3F: zend_post_startup (zend.c:1002)
==375== by 0x89F166: php_module_startup (main.c:2356)
==375== by 0xA1C48F: php_cli_startup (php_cli.c:407)
==375== by 0xA1E62A: main (php_cli.c:1319)
==375== Address 0x115818a0 is 0 bytes after a block of size 10,240 alloc'd
==375== at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==375== by 0x903A4E: __zend_malloc (zend_alloc.c:2975)
==375== by 0x9540EE: zend_hash_do_resize (zend_hash.c:1160)
==375== by 0x952D91: _zend_hash_add_or_update_i (zend_hash.c:772)
==375== by 0x953345: zend_hash_update (zend_hash.c:879)
==375== by 0x93E9C0: zend_hash_update_ptr (zend_hash.h:647)
==375== by 0x94928F: do_register_internal_class (zend_API.c:2713)
==375== by 0x94943D: zend_register_internal_class (zend_API.c:2757)
==375== by 0x6BB2C9: spl_register_std_class (spl_functions.c:44)
==375== by 0x6DB4C6: zm_startup_spl_observer (spl_observer.c:1338)
==375== by 0x6BAFDA: zm_startup_spl (php_spl.c:1008)
==375== by 0x945EFA: zend_startup_module_ex (zend_API.c:1860)
------------------------------------------------------------------------
[2020-01-24 14:46:49] nikic@php.net
I was able to reproduce this issue outside Docker using "sudo !! -d
opcache.preload_user=root".
------------------------------------------------------------------------
[2020-01-24 11:12:49] dotbox at gmail dot com
As PHP 7.4.2 was released, although the changes between 7.4.2rc1 and 7.4.2 are minimal, I gave it a
try with the new docker images available and I have the exact same segfault.
------------------------------------------------------------------------
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=79128
--
Edit this bug report at https://bugs.php.net/bug.php?id=79128&edit=1