[php-src] Issue #12847: Segfault in dom extensionl
| From: | remicollet | Date: | Fri, 01 Dec 2023 12:17:00 +0000 |
| Subject: | [php-src] Issue #12847: Segfault in dom extensionl | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-245950@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/12847
Author: remicollet
### Description
Running [phpunit/php-code-coverage](https://github.com/sebastianbergmann/php-code-coverage) test
suite using **PHP -8.3.1-dev** (0e69329bb00eab193625c91a8dbd99ceee9e3165) and **libxml2-2.12.1**
```
$ gdb ../php-src/sapi/cli/php
(gdb) run vendor/bin/phpunit
PHPUnit 10.5.0 by Sebastian Bergmann and contributors.
Runtime: PHP 8.3.1-dev
Configuration: /home/remi/php-code-coverage/phpunit.xml
SSSSSS............SSSSSSSSSSSSSSSSSSS.......................... 63 / 120 ( 52%)
.............[Detaching after vfork from child process 164240]
...................
Program received signal SIGSEGV, Segmentation fault.
#0 0x00007ffff79ec04e in xmlDictOwns () from /usr/lib64/../lib64/libxml2.so.2
#1 0x00007ffff7a19449 in xmlFreeNodeList () from /usr/lib64/../lib64/libxml2.so.2
#2 0x00007ffff7a194ff in xmlFreeProp () from /usr/lib64/../lib64/libxml2.so.2
#3 0x00007ffff7a19604 in xmlFreePropList () from /usr/lib64/../lib64/libxml2.so.2
#4 0x00007ffff7a192f2 in xmlFreeNodeList () from /usr/lib64/../lib64/libxml2.so.2
#5 0x00007ffff7a14e78 in xmlFreeDoc () from /usr/lib64/../lib64/libxml2.so.2
#6 0x0000000000662472 in php_libxml_decrement_doc_ref (object=0x7fffe5cf8380) at
/home/remi/php-src/ext/libxml/libxml.c:1355
#7 0x0000000000662694 in php_libxml_node_decrement_resource (object=0x7fffe5cf8380) at
/home/remi/php-src/ext/libxml/libxml.c:1422
#8 0x0000000000731e5a in dom_objects_free_storage (object=0x7fffe5cf8398) at
/home/remi/php-src/ext/dom/php_dom.c:981
#9 0x0000000000c1e4e5 in zend_objects_store_del (object=0x7fffe5cf8398) at
/home/remi/php-src/Zend/zend_objects_API.c:200
#10 0x0000000000b2b1cd in rc_dtor_func (p=0x7fffe5cf8398) at
/home/remi/php-src/Zend/zend_variables.c:57
#11 0x0000000000c168d7 in i_zval_ptr_dtor (zval_ptr=0x7fffe4e50db8) at
/home/remi/php-src/Zend/zend_variables.h:44
#12 0x0000000000c16da9 in zend_object_std_dtor (object=0x7fffe4e50d80) at
/home/remi/php-src/Zend/zend_objects.c:73
#13 0x0000000000c1e4e5 in zend_objects_store_del (object=0x7fffe4e50d80) at
/home/remi/php-src/Zend/zend_objects_API.c:200
#14 0x0000000000b2b1cd in rc_dtor_func (p=0x7fffe4e50d80) at
/home/remi/php-src/Zend/zend_variables.c:57
#15 0x0000000000b5c7d8 in i_zval_ptr_dtor (zval_ptr=0x7ffff4819400) at
/home/remi/php-src/Zend/zend_variables.h:44
#16 0x0000000000b68008 in i_free_compiled_variables (execute_data=0x7ffff4819320) at
/home/remi/php-src/Zend/zend_execute.c:3880
#17 0x0000000000be3958 in execute_ex (ex=0x7ffff4816020) at
/home/remi/php-src/Zend/zend_vm_execute.h:57069
#18 0x0000000000be86f3 in zend_execute (op_array=0x7ffff4888000, return_value=0x0) at
/home/remi/php-src/Zend/zend_vm_execute.h:61598
#19 0x0000000000b2fa83 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at
/home/remi/php-src/Zend/zend.c:1881
#20 0x0000000000a8e551 in php_execute_script (primary_file=0x7fffffffde40) at
/home/remi/php-src/main/main.c:2501
#21 0x0000000000c9de25 in do_cli (argc=2, argv=0x1c31510) at
/home/remi/php-src/sapi/cli/php_cli.c:966
#22 0x0000000000c9e971 in main (argc=2, argv=0x1c31510) at
/home/remi/php-src/sapi/cli/php_cli.c:1340
```
### PHP Version
PHP 8.3.1-dev
### Operating System
Fedora Rawhide