From: Ondřej Surý Date: Fri, 5 Sep 2025 16:49:19 +0000 (+0200) Subject: Add debugging for the crash X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2F5507-debug-branch;p=thirdparty%2Fbind9.git Add debugging for the crash --- diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index 26204bde100..a9e53aa3182 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -1544,6 +1544,30 @@ fctx_sendevents(fetchctx_t *fctx, isc_result_t result) { resp->result = result; } + if (!(resp->result != ISC_R_SUCCESS || + dns_rdataset_isassociated(resp->rdataset) || + dns_rdatatype_ismulti(fctx->type))) + { + char namebuf[DNS_NAME_FORMATSIZE + 1]; + dns_name_format(fctx->name, namebuf, + sizeof(namebuf) - 1); + fprintf(stderr, "%s:fctx->name is %s\n", __func__, + namebuf); + + char typebuf[DNS_RDATATYPE_FORMATSIZE]; + dns_rdatatype_format(fctx->type, typebuf, + sizeof(typebuf)); + fprintf(stderr, "%s:fctx->type is %s\n", __func__, + typebuf); + + fprintf(stderr, "%s:result = %s\n", __func__, + isc_result_totext(resp->result)); + fprintf(stderr, "%s:rdataset is %sassociated", __func__, + dns_rdataset_isassociated(resp->rdataset) + ? "" + : "not "); + } + INSIST(resp->result != ISC_R_SUCCESS || dns_rdataset_isassociated(resp->rdataset) || dns_rdatatype_ismulti(fctx->type));