QGrpcHttp2Channel: drain the outgoing queue iteratively
Http2Handler::processQueue() dequeued a single message and sent it,
relying on the uploadFinished handler to call processQueue() again for
the next one. On a fast link sendDATA() completes synchronously and
emits uploadFinished from within the call, so a large backlog drained
through one deep recursion (processQueue -> sendDATA -> uploadFinished
-> processQueue -> ...), one stack frame per queued message.
Burst-writing more than ~10k small messages overflowed the stack and
crashed the client with SIGSEGV.
Flatten the drain into a loop guarded against re-entrancy: a re-entrant
processQueue() call flags and returns, while the active loop dequeues
the next message. This resolves the recursion.
[ChangeLog][QtGrpc][QGrpcHttp2Channel] Fixed a stack overflow that could
crash the client when burst-writing a very large number of messages on a
client-streaming or bidirectional RPC.
Fixes: QTBUG-148062
Task-number: QTBUG-147934
Pick-to: 6.12 6.11 6.8
Change-Id: I058a9e3428ea94aad663fdf392949624702f750a
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>