summaryrefslogtreecommitdiff
path: root/TSRM
diff options
context:
space:
mode:
authorMarcus Boerger <helly@php.net>2004-05-13 06:53:21 (GMT)
committerMarcus Boerger <helly@php.net>2004-05-13 06:53:21 (GMT)
commitfbb28b36b7946b0435997f516988ffb90fd1e144 (patch)
tree49efdfe93c25ba6d904ec3a8c1e93b9e57df3399 /TSRM
parentb30bc204c905f7f93791e3f0de54625bee2fa492 (diff)
downloadphp-fbb28b36b7946b0435997f516988ffb90fd1e144.tar.gz
- Once ts_free_id() will be used, we cannot call ctors for deleted ids
when creating new threads.
Diffstat (limited to 'TSRM')
-rw-r--r--TSRM/TSRM.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/TSRM/TSRM.c b/TSRM/TSRM.c
index 3369c5e..b107dcc 100644
--- a/TSRM/TSRM.c
+++ b/TSRM/TSRM.c
@@ -283,9 +283,16 @@ static void allocate_new_resource(tsrm_tls_entry **thread_resources_ptr, THREAD_
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);
+ }
}
}