cvs: TSRM / TSRM.c
| From: | Marcus Boerger | Date: | Thu, 13 May 2004 06:53:22 +0000 |
| Subject: | cvs: TSRM / TSRM.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-2639@lists.php.net to get a copy of this message | ||
helly Thu May 13 02:53:22 2004 EDT
Modified files:
/TSRM TSRM.c
Log:
- Once ts_free_id() will be used, we cannot call ctors for deleted ids
when creating new threads.
http://cvs.php.net/diff.php/TSRM/TSRM.c?r1=1.59&r2=1.60&ty=u
Index: TSRM/TSRM.c
diff -u TSRM/TSRM.c:1.59 TSRM/TSRM.c:1.60
--- TSRM/TSRM.c:1.59 Wed May 12 18:28:28 2004
+++ TSRM/TSRM.c Thu May 13 02:53:21 2004
@@ -283,9 +283,16 @@
tsrm_new_thread_begin_handler(thread_id, &((*thread_resources_ptr)->storage));
}
for (i=0; i<id_count; i++) {
- (*thread_resources_ptr)->storage[i] = (void *) malloc(resource_types_table[i].size);
- if (resource_types_table[i].ctor) {
- resource_types_table[i].ctor((*thread_resources_ptr)->storage[i],
&(*thread_resources_ptr)->storage);
+#if MBO_0
+ if (resource_types_table[i].done) {
+ thread_resources_ptr)->storage[i] = NULL;
+ } else
+#endif
+ {
+ (*thread_resources_ptr)->storage[i] = (void *) malloc(resource_types_table[i].size);
+ if (resource_types_table[i].ctor) {
+ resource_types_table[i].ctor((*thread_resources_ptr)->storage[i],
&(*thread_resources_ptr)->storage);
+ }
}
}