PERFORCE change 1047924 for review
Jonathan Anderson
jonathan at FreeBSD.org
Fri Oct 11 18:41:58 UTC 2013
http://p4web.freebsd.org/@@1047924?ac=10
Change 1047924 by jonathan at jonathan-on-zenith on 2013/10/11 18:41:21
The fix is in?
Affected files ...
.. //depot/projects/ctsrd/tesla/src/sys/contrib/tesla/libtesla/tesla_internal.h#16 edit
.. //depot/projects/ctsrd/tesla/src/sys/contrib/tesla/libtesla/tesla_update.c#15 edit
Differences ...
==== //depot/projects/ctsrd/tesla/src/sys/contrib/tesla/libtesla/tesla_internal.h#16 (text+ko) ====
@@ -89,7 +89,7 @@
struct tesla_lifetime_event tls_end;
/** A place to register a few classes that share this lifetime. */
- struct tesla_class* tls_classes[4];
+ struct tesla_class* tls_classes[32];
/** A place to register more classes that share this lifetime. */
struct tesla_class* *tls_dyn_classes;
==== //depot/projects/ctsrd/tesla/src/sys/contrib/tesla/libtesla/tesla_update.c#15 (text+ko) ====
@@ -120,6 +120,8 @@
class->tc_automaton->ta_cleanup_symbol, &empty_key);
}
+ bzero(ls->tls_classes, sizeof(ls->tls_classes));
+
const size_t dynamic_classes = ls->tls_dyn_count;
for (size_t i = 0; i < dynamic_classes; i++) {
tesla_class *class = ls->tls_dyn_classes[i];
@@ -129,6 +131,8 @@
tesla_update_class_state(class, store,
class->tc_automaton->ta_cleanup_symbol, &empty_key);
}
+
+ //bzero(ls->tls_dyn_classes, ls->tls_dyn_count * sizeof(ls->tls_classes[0]));
}
@@ -252,7 +256,7 @@
* when we know it's safe.
*/
ev_err(autom, symbol, TESLA_ERROR_ENOMEM,
- "out of dynamic registration space in lifetime");
+ "out of static registration space in lifetime");
#else
static size_t unit_size =
sizeof(ls->tls_dyn_classes[0]);
More information about the p4-projects
mailing list