Windows: Handles - catch exception in handle iteration#1598
Merged
Conversation
718d439 to
38501f7
Compare
An `InvalidAddressException` can occur inside of `__iter__` when iterating over the handle table (the exact exception occurs when creating the subtype in `objects.Array.__getitem__`. This changes the handle code to do a manual iteration over the sequence using the array length and indexes, catch the exception, log the index, and continue. In the test sample that prompted this change, the exception occurred on the access of the very last item in the array. closes #1573
38501f7 to
1d1af69
Compare
gcmoreira
reviewed
Jan 31, 2025
ikelos
approved these changes
Feb 3, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An
InvalidAddressExceptioncan occur inside of__iter__wheniterating over the handle table (the exact exception occurs when
creating the subtype in
objects.Array.__getitem__. This changes thehandle code to do a manual iteration over the sequence using the array
length and indexes, catch the exception, log the index, and continue.
In the test sample that prompted this change, the exception occurred on
the access of the very last item in the array.
closes #1573