Jens-G opened a new pull request, #3676:
URL: https://github.com/apache/thrift/pull/3676
`testbinaryprotocol` currently fails on master:
```
ERROR:lib/c_glib/test/testbinaryprotocol.c:726:thrift_server_complex_types:
assertion failed: (thrift_binary_protocol_read_message_begin (...) > 0)
```
`test_read_and_write_complex_types` covers the case where the leading int32
of a
message is non-negative. The client wrote a bare `int32` for it and the
server
asserted that `read_message_begin` returned success — which it did, because
the
function had no branch for the old-style (non-versioned) header and returned
without consuming a name, message type or sequence id.
Since 280d9778d that branch exists, so the call now reads those three fields.
The four bytes the test wrote are no longer a complete message, the read
fails,
and everything after it in the shared socket stream is misaligned, which is
why
the failure shows up twice (once in the server child, once in the parent's
`status == 0` assertion).
This sends a complete old-style header for that case — name length + name,
message type, sequence id — and verifies what the server read back, so the
case
now exercises the branch it is named after and the stream stays in sync.
Verified with the c_glib suite via cmake in `thrift:jammy`: 20/20 pass, where
master is 19/20.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]