-
Notifications
You must be signed in to change notification settings - Fork 877
Milestone
Description
As discussed offline it would be good to reduce the opportunities for bugs like #3771 to sneak in.
The idea is to add a 'frame' position (any backend message starts a frame with the size of length) to ReadBuffer, this will likely require adding a cumulative frame position to span read buffer resets.
Once we have this data we could do a few things:
- During read calls we could assert whether the asked for length makes any sense within the total frame size.
- Before processing a backend message we capture the current cumulative read position and after processing we check whether the current position is between that + frame length. If not we break the connector with a descriptive message in the spirit of "Lost sync somewhere after last message code: {messageCode}, read {diff} bytes out of frame bounds {length}, report a bug".
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels