Skip to content

Memory leak in PHP 8.3 #305

@realFlowControl

Description

@realFlowControl

ASAN in PHP 8.3 is failing due to a mem leak detected:
Seems to be related to upstream and code introduced in PHP 8.3.0, a fix has been proposed at php/php-src#14510

Direct leak of 152 byte(s) in 1 object(s) allocated from:
    #0 0xffff96b0a4b4 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    #1 0xffff9688ad30  (/lib/aarch64-linux-gnu/libc.so.6+0x7ad30)
    #2 0xffff9688b098 in pthread_attr_setaffinity_np (/lib/aarch64-linux-gnu/libc.so.6+0x7b098)
    #3 0xffff9688e7b0 in pthread_getattr_np (/lib/aarch64-linux-gnu/libc.so.6+0x7e7b0)
    #4 0xaaaabe8c9820 in zend_call_stack_get_linux_pthread /opt/src/php-src/Zend/zend_call_stack.c:120
    #5 0xaaaabe8c9e28 in zend_call_stack_get_linux /opt/src/php-src/Zend/zend_call_stack.c:239
    #6 0xaaaabe8c9e98 in zend_call_stack_get /opt/src/php-src/Zend/zend_call_stack.c:511
    #7 0xaaaabe8c9078 in zend_call_stack_init /opt/src/php-src/Zend/zend_call_stack.c:63
    #8 0xaaaabe9896d4 in zend_new_thread_end_handler /opt/src/php-src/Zend/zend.c:848
    #9 0xaaaabe75d030 in allocate_new_resource /opt/src/php-src/TSRM/TSRM.c:412
    #10 0xaaaabe75d39c in ts_resource_ex /opt/src/php-src/TSRM/TSRM.c:461
    #11 0xffff9377e1f8  (<unknown module>)
    #12 0xffff93780b88  (<unknown module>)
    #13 0xffff9688d5c4  (/lib/aarch64-linux-gnu/libc.so.6+0x7d5c4)
    #14 0xffff968f5ed8  (/lib/aarch64-linux-gnu/libc.so.6+0xe5ed8)

Indirect leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0xffff96b0a69c in __interceptor_realloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:164
    #1 0xffff9688b0bc in pthread_attr_setaffinity_np (/lib/aarch64-linux-gnu/libc.so.6+0x7b0bc)
    #2 0xffff9688e7b0 in pthread_getattr_np (/lib/aarch64-linux-gnu/libc.so.6+0x7e7b0)
    #3 0xaaaabe8c9820 in zend_call_stack_get_linux_pthread /opt/src/php-src/Zend/zend_call_stack.c:120
    #4 0xaaaabe8c9e28 in zend_call_stack_get_linux /opt/src/php-src/Zend/zend_call_stack.c:239
    #5 0xaaaabe8c9e98 in zend_call_stack_get /opt/src/php-src/Zend/zend_call_stack.c:511
    #6 0xaaaabe8c9078 in zend_call_stack_init /opt/src/php-src/Zend/zend_call_stack.c:63
    #7 0xaaaabe9896d4 in zend_new_thread_end_handler /opt/src/php-src/Zend/zend.c:848
    #8 0xaaaabe75d030 in allocate_new_resource /opt/src/php-src/TSRM/TSRM.c:412
    #9 0xaaaabe75d39c in ts_resource_ex /opt/src/php-src/TSRM/TSRM.c:461
    #10 0xffff9377e1f8  (<unknown module>)
    #11 0xffff93780b88  (<unknown module>)
    #12 0xffff9688d5c4  (/lib/aarch64-linux-gnu/libc.so.6+0x7d5c4)
    #13 0xffff968f5ed8  (/lib/aarch64-linux-gnu/libc.so.6+0xe5ed8)

SUMMARY: AddressSanitizer: 184 byte(s) leaked in 2 allocation(s).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions