Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exception-free, branch-free PageCursor bounds-checks.
Performing an out-of-bounds memory access to a page via a page cursor now no longer throws an exception. The reason is that we might have an inconsistent read that fools decoding logic computing wrong offsets for data, or to try and read more data than can fit on a page. Previously, such out-of-bounds accesses would cause the PageCursor to throw an exception, but this is inconsiderate - it is not the fault of the decoding logic that it was fed wrong data and tricked into an out-of-bounds access. So instead we now raise a boolean flag the cursor has experienced and out-of-bounds access, and this flag can then be checked after the decoder has checked that its read was consistent. Then it is up to the decoder to make a decision about how to handle the fact that it did an out-of-bounds access. At present, the record formats (where the decoding logic is) don't do anything, but this is just because this change is not yet complete. I will make them do something in the next commit.
- Loading branch information
Showing
13 changed files
with
499 additions
and
330 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.