A rare crash in the DoH code caused by an assert
A rare issue was found while working on !5309 (merged). The unit test suite (doh_test
) revealed a situation when session->handle
got detached too early in the http_send_outgoing()
, the function which takes data from nghttp2 and sends it via the underlying connection.
As a result, when we have reached the call to isc_nm_send()
session->sending++;
isc_nm_send(session->handle, &send->data, http_writecb, send);
return (true);
}
the session->handle
was NULL
triggering an assert:
void
isc_nm_send(isc_nmhandle_t *handle, isc_region_t *region, isc_nm_cb_t cb,
void *cbarg) {
REQUIRE(VALID_NMHANDLE(handle));