]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add debugging for the crash 5507-debug-branch
authorOndřej Surý <ondrej@sury.org>
Fri, 5 Sep 2025 16:49:19 +0000 (18:49 +0200)
committerOndřej Surý <ondrej@sury.org>
Fri, 5 Sep 2025 16:49:19 +0000 (18:49 +0200)
lib/dns/resolver.c

index 26204bde1007559e908e21d2d4979573dcb23847..a9e53aa3182d82e5c988c19a477440fe9de5478b 100644 (file)
@@ -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));