Replace csched sampling asserts with defensive checks...
@@ -1330,16 +1330,23 @@ sp3_prune_trees(struct sp3 *sp)
sp3_log_samp_one_tree(tree);
sp3_log_samp_overall(sp);
+#ifdef HSE_BUILD_DEBUG
assert(sp->samp.i_alen >= tree->ct_samp.i_alen);
assert(sp->samp.r_alen >= tree->ct_samp.r_alen);
assert(sp->samp.r_wlen >= tree->ct_samp.r_wlen);
assert(sp->samp.l_alen >= tree->ct_samp.l_alen);
assert(sp->samp.l_good >= tree->ct_samp.l_good);
+#endif
+ if (sp->samp.i_alen >= tree->ct_samp.i_alen)
sp->samp.i_alen -= tree->ct_samp.i_alen;
+ if (sp->samp.r_alen >= tree->ct_samp.r_alen)
sp->samp.r_alen -= tree->ct_samp.r_alen;
+ if (sp->samp.r_wlen >= tree->ct_samp.r_wlen)
sp->samp.r_wlen -= tree->ct_samp.r_wlen;
+ if (sp->samp.l_alen >= tree->ct_samp.l_alen)
sp->samp.l_alen -= tree->ct_samp.l_alen;
+ if (sp->samp.l_good >= tree->ct_samp.l_good)
sp->samp.l_good -= tree->ct_samp.l_good;
sp3_log_samp_overall(sp);
