<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">Hi,<div><br></div><div>While executing libvirt_domain_interface_addresses() with the qemu-agent running in the guest as the source, the function causes PHP to segfault. If I change the source to either dhcp or arp, the function executes correctly.</div><div><br></div><div>Example:</div><div><br></div><div>$netdetails = libvirt_domain_interface_addresses($vmres, 0); <-- executes correctly (dhcp source)</div><div>$netdetails = libvirt_domain_interface_addresses($vmres, 1); <-- segfault (qemu agent source)</div><div>$netdetails = libvirt_domain_interface_addresses($vmres, 2); <-- executes correctly (arp source)</div><div><br></div><div>I tested the equivalent function using virsh against the same host and it executes correctly with any source.</div><div>I have a php-cgi core file that I can share if that may help on finding the problem.</div><div><br></div><div>gdb output:</div><div><br></div><div>GNU gdb (Debian 9.1-2) 9.1</div><div>Copyright (C) 2020 Free Software Foundation, Inc.</div><div>License GPLv3+: GNU GPL version 3 or later <<a href="http://gnu.org/licenses/gpl.html">http://gnu.org/licenses/gpl.html</a>></div><div>This is free software: you are free to change and redistribute it.</div><div>There is NO WARRANTY, to the extent permitted by law.</div><div>Type "show copying" and "show warranty" for details.</div><div>This GDB was configured as "x86_64-linux-gnu".</div><div>Type "show configuration" for configuration details.</div><div>For bug reporting instructions, please see:</div><div><<a href="http://www.gnu.org/software/gdb/bugs/">http://www.gnu.org/software/gdb/bugs/</a>>.</div><div>Find the GDB manual and other documentation resources online at:</div><div>    <<a href="http://www.gnu.org/software/gdb/documentation/">http://www.gnu.org/software/gdb/documentation/</a>>.</div><div><br></div><div>For help, type "help".</div><div>Type "apropos word" to search for commands related to "word"...</div><div>Reading symbols from /usr/bin/php-cgi...</div><div>(No debugging symbols found in /usr/bin/php-cgi)</div><div>[New LWP 2594]</div><div>[Thread debugging using libthread_db enabled]</div><div>Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".</div><div>Core was generated by `php-cgi index.php'.</div><div>Program terminated with signal SIGSEGV, Segmentation fault.</div><div>#0  __strlen_sse2 () at ../sysdeps/x86_64/multiarch/../strlen.S:85</div><div>85    ../sysdeps/x86_64/multiarch/../strlen.S: No such file or directory.</div><div>(gdb) bt</div><div>#0  __strlen_sse2 () at ../sysdeps/x86_64/multiarch/../strlen.S:85</div><div>#1  0x000055c6a4ceacd2 in add_assoc_string_ex ()</div><div>#2  0x00007f4d36175253 in ?? () from /usr/lib/php/20180731/libvirt-php.so</div><div>#3  0x000055c6a4d6b477 in execute_ex ()</div><div>#4  0x000055c6a4d705c7 in zend_execute ()</div><div>#5  0x000055c6a4ce8ed4 in zend_execute_scripts ()</div><div>#6  0x000055c6a4c8be38 in php_execute_script ()</div><div>#7  0x000055c6a4b53da8 in ?? ()</div><div>#8  0x00007f4d39efce0b in __libc_start_main (main=0x55c6a4b51cf0, argc=2, argv=0x7fff35718588, init=<optimized out>, fini=<optimized out>, </div><div>    rtld_fini=<optimized out>, stack_end=0x7fff35718578) at ../csu/libc-start.c:308</div><div>#9  0x000055c6a4b544ca in _start ()</div><div><br></div><div><br></div><div>System information:</div><div><br></div><div>OS: Debian Bullseye</div><div>PHP version (fast cgi): 7.3.15</div><div>Libvirt PHP version: 0.5.5</div><div>Libvirt version: 6.0.0</div><div><br></div><div>KVM host libvirt version: 5.9.0</div><div><br></div><div>If you need any other information please let me know.</div><div><br></div><div>Thanks.</div><div><br></div><div>Fernando</div>