fix(q): validate handles and wire protocol frames - #10
protocolstardust merged 3 commits into
Conversation
…warning After a timed-out sync send the event-loop path deregisters the handle (#8), and .q.close on a handle that is not open is now an error (#10), so 06_errors.rfl closes the slow connection under try: still open on the blocking path, already gone on the --poll path. The codec selftest's handshake_done label preceded a declaration, a C23 extension that clang warns about; end the label with an empty statement.
|
Reviewed and merged (e08ab96). This also carries #9. Wire hardening, all sound
Builtin validation Fixed in a follow-up (2593c94) Pre-existing, not from this PR, but the new Conflicted with #7 in |
What changes for users
Invalid Q client arguments now fail before touching the socket:
.q.connectrejects malformed credential/timeout/port values,.q.sendand.q.closereject values that are not live non-negative i64 handles, and invalid close handles return an error instead of silently succeeding.Malformed or hostile wire input is rejected safely: invalid table markers, unsupported handshake capability bytes, oversized compressed frames, and unknown message types no longer get accepted or evaluated.
Validation
make recheck RAYFORCE_LOCAL_PATH=/home/athuser/rayforce-build/rayforce-core-Wall -Wextra -WerrorAll checks pass.