Don't segfault on header replay#14191
Conversation
|
src/core/lib/surface/call.cc
Outdated
There was a problem hiding this comment.
What is the point of this log line?
There was a problem hiding this comment.
Do we want to test other cases?
For example:
- PFX_STR HEADER_STR PAYLOAD_STR(no EOS) HEADER_STR
- Duplicate HEADERS does not contain reserved keys
There was a problem hiding this comment.
It is also interesting to see 3 HEADERS will cause what... if that is not too much...
There was a problem hiding this comment.
That's not a bad idea.
There was a problem hiding this comment.
Also, if at all possible, it'd be nice to inject that into the fuzzer's corpus, so it can further try and discover bugs around this.
There was a problem hiding this comment.
I've added the 3 leading headers to the test. I can add more variants into the fuzzer's corpus.
(FWIW, PFX_STR HEADER_STR PAYLOAD_STR(no EOS) HEADER_STR doesnt segfault, but cq->next returns an unsuccessful event)
There was a problem hiding this comment.
That can be further investigated without blocking this fix.
|
|
I think you wanted to open that PR against 1.8, and not master. |
|
Right and I can't just change the base, it will otherwise try to bring all of master into 1.8. |
|
LGTM if the 3 headers case pass |
|
|
I've addressed comments and rebased to 1.8.x |
|
|
|
| static void publish_app_metadata(grpc_call* call, grpc_metadata_batch* b, | ||
| int is_trailing) { | ||
| if (b->list.count == 0) return; | ||
| if (is_trailing && call->buffered_metadata[1] == nullptr) return; |
There was a problem hiding this comment.
It'd be better to find a fix in chttp2: fixes at this layer are more likely to break with efforts to remove this layer entirely in the c++ stack.
There was a problem hiding this comment.
Right, this is a temporary bandaid. We want to actually return a 400 from within chttp2, but "stop the bleeding first".
Once approved will backport fix to 1.8/1.9
Fixes #14175