Most easily triggered on XP (not Vista), maybe because of the
network stack encouraging large messages backlogs.
- change in debug statements.
+ - Fixed bug that could cause a crash if root prime failed when there
+ were message backlogs.
26 May 2009: Wouter
- Thanks again to Brett Carr, found an assertion that was not true.
verbose(VERB_ALGO, "Cannot prime due to lack of hints");
return 0;
}
- /* copy dp; to avoid messing up available list for other thr/queries */
- dp = delegpt_copy(dp, qstate->region);
- if(!dp) {
- log_err("out of memory priming root, copydp");
- return 0;
- }
/* Priming requests start at the QUERYTARGETS state, skipping
* the normal INIT state logic (which would cause an infloop). */
if(!generate_sub_request((uint8_t*)"\000", 1, LDNS_RR_TYPE_NS,
if(subq) {
struct iter_qstate* subiq =
(struct iter_qstate*)subq->minfo[id];
- /* Set the initial delegation point to the hint. */
- subiq->dp = dp;
+ /* Set the initial delegation point to the hint.
+ * copy dp, it is now part of the root prime query.
+ * dp was part of in the fixed hints structure. */
+ subiq->dp = delegpt_copy(dp, subq->region);
+ if(!subiq->dp) {
+ log_err("out of memory priming root, copydp");
+ fptr_ok(fptr_whitelist_modenv_kill_sub(
+ qstate->env->kill_sub));
+ (*qstate->env->kill_sub)(subq);
+ return 0;
+ }
/* there should not be any target queries. */
subiq->num_target_queries = 0;
subiq->dnssec_expected = iter_indicates_dnssec(
/* is it a noprime stub (always use) */
if(stub->noprime) {
+ /* copy the dp out of the fixed hints structure, so that
+ * it can be changed when servicing this query */
iq->dp = delegpt_copy(stub_dp, qstate->region);
if(!iq->dp) {
log_err("out of memory priming stub");