View Issue Details

IDProjectCategoryView StatusLast Update
0002019XdebugUncategorizedpublic2021-10-04 09:29
Reporterpatrickallaert Assigned Toderick  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
PlatformDockerOSAlpine 
Product Version3.0.4 
Target Version3.1devFixed in Version3.1.0 
Summary0002019: Xdebug crash because of uninitialized memory
Description

On Alpine (using musl), memory is not zeroed when allocated.

As of commit 9437d03a496fe11d0da0dbfa94ede3690bcbaace, XG_BASE(stack) is not initialized anymore.

It may cause crashes because of invalid if (XG_BASE(stack)) tests.

Steps To Reproduce

Develop an extension that is using zend_compile_file/zend_compile_string as part of RINIT and load it with xdebug on Alpine with PHP compiled with ZTS.

Running PHP with that extension and xdebug will result in:

#0 0x00007fbfa37d55ad in memset () from /lib/ld-musl-x86_64.so.1
#1 0x00007fbfa2fb5905 in xdebug_add_stack_frame ()
from /usr/local/lib/php/extensions/no-debug-zts-20190902/xdebug.so
0000002 0x00007fbfa2fb6260 in xdebug_execute_ex ()
from /usr/local/lib/php/extensions/no-debug-zts-20190902/xdebug.so
0000003 0x000055f560de680b in zend_execute ()
0000004 0x00007fbfa2f67c5e in zm_activate_dummyext (type=<optimized out>, module_number=<optimized out>)
0000005 0x000055f560d5e660 in zend_activate_modules ()
0000006 0x000055f560cef11c in php_request_startup ()

TagsNo tags attached.
Operating System
PHP Version8.0.0-8.0.4

Activities

Issue History

Date Modified Username Field Change
2021-09-16 18:32 patrickallaert New Issue
2021-09-21 07:51 derick Fixed in Version => 3.1dev
2021-09-21 07:51 derick Target Version => 3.1dev
2021-09-21 07:51 derick Assigned To => derick
2021-09-21 07:51 derick Status new => closed
2021-09-21 07:51 derick Resolution open => fixed
2021-09-21 07:51 derick Note Added: 0006021
2021-10-04 09:29 derick Fixed in Version 3.1dev => 3.1.0