Skip to content

http2: empty trailers lead to ASAN failures #8720

@junr03

Description

@junr03

Description: currently the http2 codec submits trailers to nghttp2 with this function call:

nghttp2_submit_trailer(parent_.session_, stream_id_, &final_headers[0], final_headers.size());
. In the case that the passed in HeaderMap& is empty, that function call reports ASAN failures: reference binding to null pointer of type 'nghttp2_nv'.

nghttp2 checks for length of the vector before dereferencing, so the code behaves correctly. However, we should clean up trailer submission so that empty trailers don't create ASAN failures.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions