Skip to content

Commit 2b8798b

Browse files
authored
Release 4.9.2 (#668)
Fix regression in 4.9.1
1 parent 3e6f81d commit 2b8798b

5 files changed

Lines changed: 82 additions & 5 deletions

File tree

CHANGELOG

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
2026-07-26
2-
- 4.9.1
2+
- 4.9.2
33
- [FIX, SPEC] Require 3 uni streams for HTTP/3 connections
44
- [FIX] Abort connection when STOP_SENDING comes in for a critical stream
55
- [FIX] Fix unreadable HQ filter error state

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# The short X.Y version
2727
version = u'4.9'
2828
# The full version, including alpha/beta/rc tags
29-
release = u'4.9.1'
29+
release = u'4.9.2'
3030

3131

3232
# -- General configuration ---------------------------------------------------

include/lsquic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ extern "C" {
2727

2828
#define LSQUIC_MAJOR_VERSION 4
2929
#define LSQUIC_MINOR_VERSION 9
30-
#define LSQUIC_PATCH_VERSION 1
30+
#define LSQUIC_PATCH_VERSION 2
3131

3232
#define LSQUIC_QUOTE(x) #x
3333
#define LSQUIC_SVAL(v) LSQUIC_QUOTE(v)

src/liblsquic/lsquic_qdec_hdl.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,9 @@ lsquic_qdh_cancel_stream (struct qpack_dec_hdl *qdh,
844844

845845
qdh_maybe_destroy_hblock_ctx(qdh, stream);
846846

847+
if (!qdh->qdh_dec_sm_out)
848+
return;
849+
847850
nw = lsqpack_dec_cancel_stream(&qdh->qdh_decoder, stream, buf, sizeof(buf));
848851
if (nw > 0)
849852
{
@@ -872,6 +875,9 @@ lsquic_qdh_cancel_stream_id (struct qpack_dec_hdl *qdh,
872875
ssize_t nw;
873876
unsigned char buf[LSQPACK_LONGEST_CANCEL];
874877

878+
if (!qdh->qdh_dec_sm_out)
879+
return;
880+
875881
nw = lsqpack_dec_cancel_stream_id(&qdh->qdh_decoder, stream_id, buf,
876882
sizeof(buf));
877883
if (nw > 0)

tests/test_http_prio_header.c

Lines changed: 73 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,21 @@ struct test_xhdr
6969

7070
static struct network_path network_path;
7171
static struct http1x_ctor_ctx hsi_ctx = { .is_server = 1, };
72+
static unsigned n_header_sets_discarded;
73+
74+
75+
static void
76+
discard_header_set (void *hset)
77+
{
78+
++n_header_sets_discarded;
79+
lsquic_http1x_if->hsi_discard_header_set(hset);
80+
}
81+
82+
83+
static const struct lsquic_hset_if discard_count_hset_if =
84+
{
85+
.hsi_discard_header_set = discard_header_set,
86+
};
7287

7388

7489
static int
@@ -143,7 +158,8 @@ lsquic_engine_add_conn_to_tickable (struct lsquic_engine_public *enpub,
143158

144159

145160
static void
146-
init_test_objs (struct test_objs *tobjs)
161+
init_test_objs_with_qpack_capacity (struct test_objs *tobjs,
162+
unsigned qpack_capacity)
147163
{
148164
int s;
149165

@@ -179,11 +195,19 @@ init_test_objs (struct test_objs *tobjs)
179195
lsquic_qeh_init(&tobjs->qeh, &tobjs->lconn);
180196
s = lsquic_qeh_settings(&tobjs->qeh, 0, 0, 0, 0);
181197
assert(0 == s);
182-
lsquic_qdh_init(&tobjs->qdh, &tobjs->lconn, 1, tobjs->conn_pub.enpub, 0, 0);
198+
lsquic_qdh_init(&tobjs->qdh, &tobjs->lconn, 1, tobjs->conn_pub.enpub,
199+
qpack_capacity, 0);
183200
tobjs->conn_pub.u.ietf.qdh = &tobjs->qdh;
184201
}
185202

186203

204+
static void
205+
init_test_objs (struct test_objs *tobjs)
206+
{
207+
init_test_objs_with_qpack_capacity(tobjs, 0);
208+
}
209+
210+
187211
static void
188212
deinit_test_objs (struct test_objs *tobjs)
189213
{
@@ -424,6 +448,51 @@ test_priority_update_during_partial_header_decode_wins (void)
424448
}
425449

426450

451+
static void
452+
test_destroy_unfinished_stream_without_qpack_decoder_stream (void)
453+
{
454+
struct test_objs tobjs;
455+
struct lsquic_stream *stream;
456+
457+
init_test_objs_with_qpack_capacity(&tobjs, 0x100);
458+
assert(NULL == tobjs.qdh.qdh_dec_sm_out);
459+
460+
stream = new_http_prio_stream(&tobjs);
461+
lsquic_stream_destroy(stream);
462+
463+
deinit_test_objs(&tobjs);
464+
}
465+
466+
467+
static void
468+
test_destroy_partial_header_without_qpack_decoder_stream (void)
469+
{
470+
struct test_objs tobjs;
471+
struct lsquic_stream *stream;
472+
const unsigned char header_block[] = { 0, 0, };
473+
const unsigned char *buf;
474+
enum lsqpack_read_header_status rhs;
475+
476+
init_test_objs_with_qpack_capacity(&tobjs, 0x100);
477+
assert(NULL == tobjs.qdh.qdh_dec_sm_out);
478+
stream = new_http_prio_stream(&tobjs);
479+
480+
buf = header_block;
481+
rhs = lsquic_qdh_header_in_begin(&tobjs.qdh, stream,
482+
sizeof(header_block), &buf, 1);
483+
assert(LQRHS_NEED == rhs);
484+
assert(stream->sm_hblock_ctx);
485+
stream->sm_qflags |= SMQF_QPACK_DEC;
486+
487+
n_header_sets_discarded = 0;
488+
tobjs.eng_pub.enp_hsi_if = &discard_count_hset_if;
489+
lsquic_stream_destroy(stream);
490+
assert(1 == n_header_sets_discarded);
491+
492+
deinit_test_objs(&tobjs);
493+
}
494+
495+
427496
int
428497
main (void)
429498
{
@@ -432,6 +501,8 @@ main (void)
432501
test_split_priority_header_fields_are_one_dictionary();
433502
test_user_set_http_prio_does_not_block_priority_header();
434503
test_priority_update_during_partial_header_decode_wins();
504+
test_destroy_unfinished_stream_without_qpack_decoder_stream();
505+
test_destroy_partial_header_without_qpack_decoder_stream();
435506

436507
lsquic_global_cleanup();
437508
return 0;

0 commit comments

Comments
 (0)