This is an automated email from the ASF dual-hosted git repository.
maskit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 7b84ec5c03 Fix an assertion failure on QPACK (#11054)
7b84ec5c03 is described below
commit 7b84ec5c0319cc6dad0ffe220bc543e949e3c82c
Author: Masakazu Kitajo <[email protected]>
AuthorDate: Wed Feb 7 13:13:43 2024 -0700
Fix an assertion failure on QPACK (#11054)
* Fix an assertion failure on QPACK
* Fix a logic error in the previous commit
---
src/proxy/hdrs/XPACK.cc | 1 +
src/proxy/http3/QPACK.cc | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/proxy/hdrs/XPACK.cc b/src/proxy/hdrs/XPACK.cc
index 6cb775c097..e5eb070bd5 100644
--- a/src/proxy/hdrs/XPACK.cc
+++ b/src/proxy/hdrs/XPACK.cc
@@ -453,6 +453,7 @@ XpackDynamicTable::is_empty() const
uint32_t
XpackDynamicTable::largest_index() const
{
+ // This function can return a meaningful value only if there is at least one
entry on the table.
ink_assert(!this->is_empty());
return this->_entries_inserted - 1;
}
diff --git a/src/proxy/http3/QPACK.cc b/src/proxy/http3/QPACK.cc
index 1d316b10e0..dc32d7a171 100644
--- a/src/proxy/http3/QPACK.cc
+++ b/src/proxy/http3/QPACK.cc
@@ -267,7 +267,7 @@ QPACK::decode(uint64_t stream_id, const uint8_t
*header_block, size_t header_blo
}
uint16_t largest_reference = tmp;
- if (this->_dynamic_table.largest_index() < largest_reference) {
+ if (this->_dynamic_table.is_empty() || this->_dynamic_table.largest_index()
< largest_reference) {
// Blocked
if (this->_add_to_blocked_list(
new DecodeRequest(largest_reference, thread, cont, stream_id,
header_block, header_block_len, hdr))) {