Bug #73241 [Opn->Fbk]: php-cgi.exe is crashing while the script execution is being finalized

From: Date: Tue, 04 Oct 2016 15:34:27 +0000
Subject: Bug #73241 [Opn->Fbk]: php-cgi.exe is crashing while the script execution is being finalized
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-204446@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73241&edit=1 ID: 73241 Updated by: ab@php.net Reported by: petr dot maly at remotehost dot cz Summary: php-cgi.exe is crashing while the script execution is being finalized -Status: Open +Status: Feedback Type: Bug Package: COM related Operating System: Windows 10 PHP Version: 7.0.11 Block user comment: N Private report: N New Comment: Thanks for the report. Could you please check the latest snapshots from windows.php.net? If the issue is still there, please share a reproducer - some solution with a test class and php code. Or at least a process dump (you'll need the debug symbols). Thanks. Previous Comments: ------------------------------------------------------------------------ [2016-10-04 13:55:05] petr dot maly at remotehost dot cz Description: ------------ When the script uses COM object several times and all the statements are executed, php-cgi.exe crashes while it is shutting down. This causes that Apache returns error 5xx, the script code is executed correctly. The crashing happens randomly. I was inspecting the code of php_com_dotnet extension and I found that the php crashes while it is trying to call destructor on function object: com_handlers.c(237:246): static void function_dtor(zval *zv) { zend_internal_function *f = (zend_internal_function*)Z_PTR_P(zv); zend_string_release(f->function_name); if (f->arg_info) { efree(f->arg_info); } efree(f); } The destructor crashes because f->function_name is NULL (sometimes), therefore zend_string_release is unable to access member variables. Suggested fix: static void function_dtor(zval *zv) { zend_internal_function *f = (zend_internal_function*)Z_PTR_P(zv); if (f->function_name != NULL) { zend_string_release(f->function_name); } if (f->arg_info) { efree(f->arg_info); } efree(f); } Best Regards, Petr Maly ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=73241&edit=1

« previous php.bugs (#204446) next »