brbzull0 commented on code in PR #13636:
URL: https://github.com/apache/trafficserver/pull/13636#discussion_r3987169396
##########
src/proxy/http3/test/test_QPACK.cc:
##########
@@ -472,3 +472,65 @@ TEST_CASE("Decoding", "[qpack-decode]")
}
}
}
+
+// Decodes one Literal Header Field Without Name Reference. That is the field
+// representation whose name and value are both allocated out of QPACK's
+// per-connection arena and released again once the header is attached, so it
is
+// the path that cares about the order those releases happen in.
+TEST_CASE("Decoding a literal header field without name reference",
"[qpack-literal-decode]")
+{
+ QUICApplicationDriver driver;
+ QPACK *qpack = new QPACK(driver.get_connection(),
UINT32_MAX, 0, 0, MAX_FIELD_SIZE);
+ TestQPACKEventHandler *event_handler = new TestQPACKEventHandler();
+
Review Comment:
You were right and I was wrong on both counts. Rocky's LeakSanitizer run
reported exactly these two allocations, and the "same as `test_encode` /
`test_decode`" defence was empty: those never reach their `new` calls because
the QIF directories are absent, so their leaks never execute. This test does.
Fixed in 08ec6abf26. Both objects are RAII now, the handler on the stack and
`QPACK` in a `unique_ptr`. The lifetime concern was real, so instead of a
fixed
sleep the handler counts deliveries and each decode waits on that count,
bounded, before the header and the handler go out of scope. That also makes
the
test check that the completion event arrives at all.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]