-
Notifications
You must be signed in to change notification settings - Fork 7.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libphp.so: oci8.php_oci_cleanup_global_handles segfaults at second call #7765
Comments
It seems to me that the problem is the use of the |
We must not use the TSRM accessor macros in GINIT and GSHUTDOWN, but rather use the passed pointers directly. For simplicity, we inline `php_oci_cleanup_global_handles()`, and also the `PHP_OCI_CALL()` macros; the latter are unlikely to be needed here, but don't hurt.
* PHP-8.0: Fix GH-7765: php_oci_cleanup_global_handles segfaults at second call
* PHP-8.1: Fix GH-7765: php_oci_cleanup_global_handles segfaults at second call
@cmb69 Well, for the first glance I cannot find the check for |
So far so good. |
Description
When
httpd
is terminating, functionoci8
.php_oci_cleanup_global_handles
is sometimes called twice. It symbolZTS
is defined, the second call fails, as the thread specific data-area has already been freed by that time.Suggested change for
php_oci8_int.h
before:
after:
Suggested change for
oci8.c
before:
after:
or perhaps:
PHP Version
all with ZTS defined
Operating System
All having pthread
The text was updated successfully, but these errors were encountered: