[PHP-DEV] cleanups (destructors-functions MUST return a value) From: Thies C. Arntzen (thies <email protected>)
Date: 04/30/99

currently working on one of the sporadic crashes when using ora_**
calls.... (i'm sure there's more stuff like this in some other modules)...

1. is it right that ALL descructor functions don't need a to return a
value (stuff that gets registred with register_descructior)?? -> 'cause
hash_destroy will be called for them....

2. if you call _php3_hash_apply the supplied function MUST return a
value (not sure if this is the case in all current modules!!!)

3. you should NOT call _php3_hash_apply on the same HashTable if you're
already in the descructor function for that table!!!

#0 0x807e945 in _cursors_cleanup (le=0x5a5a5a5a)
    at ../php3/functions/oracle.c:186
#1 0x805adf7 in _php3_hash_apply (ht=0x80d5af4,
    destruct=0x807e93c <_cursors_cleanup>) at ../php3/php3_hash.c:664
#2 0x807e9d1 in _close_oraconn (conn=0x8108368)
    at ../php3/functions/oracle.c:211
#3 0x8062b30 in list_entry_destructor (ptr=0x8114d78) at ../php3/list.c:99
#4 0x805acd8 in _php3_hash_destroy (ht=0x80d5af4) at ../php3/php3_hash.c:637
#5 0x804ff05 in destroy_resource_list () at ../php3/language-parser.y:156
#6 0x80572e6 in php3_request_shutdown (dummy=0x0) at ../php3/main.c:767
#7 0x8058fe8 in main (argc=2, argv=0xbffff8f4) at ../php3/main.c:1865

watch: f#4 and f#1 work on the same HashTable!!!!

question: how can i influence the order in which HashTables get destructed
(cursors BEFORE connections etc) in a save way -> the way it's currently
done is NOT save as we can see from the gdb-trace!!

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 <email protected>
For help: php-dev-help <email protected>