-
-
Notifications
You must be signed in to change notification settings - Fork 15.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix buffer composition where middle buffers have no readable bytes (#…
…12460) Motivation: Composite buffers are picky with how their internal buffers are structured. To cope, the buffer components are sanitised and trimmed to make internal offset calculations easier. We had an issue where buffer components without any readable bytes, were allowed to sit between components that did have readable bytes. This could cause an exception to be thrown, if a multi-byte access was striding over an empty buffer. Effectively, we were always expected such accesses to be able to reach at least one byte. Modification: Do more thorough component sanitation, such that we prevent buffer components with no readable bytes, from being placed in between components with readable bytes. This allows the turn accesses to continue to work as before. Result: No more exceptions from torn accesses that straddle across an empty buffer component.
- Loading branch information
Showing
4 changed files
with
191 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.