shutdown of resources BUG in unified_odbc an others!
| From: | Thies C. Arntzen | Date: | Mon, 31 May 1999 12:03:25 +0000 |
| Subject: | shutdown of resources BUG in unified_odbc an others! | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-6323@lists.php.net to get a copy of this message | ||
unified_odbc.c
line 315:
UODBC_GLOBAL(PHP3_UODBC_MODULE).le_conn =
register_list_destructors(_close_connection, NULL);
static void _close_connection(UODBC_CONNECTION *conn)
{
/* FIXME
* Closing a connection will fail if there are
* pending transactions
*/
UODBC_TLS_VARS;
conn->open = 0;
_php3_hash_apply(UODBC_GLOBAL(PHP3_UODBC_MODULE).resource_list,
(int (*)(void *))_results_cleanup);
SQLDisconnect(conn->hdbc);
SQLFreeConnect(conn->hdbc);
efree(conn);
UODBC_GLOBAL(PHP3_UODBC_MODULE).num_links--;
}
the _php3_hash_apply will try to traverse a hashtable that is in the process of "dying"!
this will cause crashes as _php3_hash_destroy will get called for "list" and
_php3_hash_apply will walk free memory.
i found the same behaviour in oracle.c!
does anybody have a good solution for this?
tc
Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!"
Digital Collections Phone +49 40 235350 Fax +49 40 23535180
Hammerbrookstr. 93 20097 Hamburg / Germany
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net