-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Negate find_object GetConservativeGC logic. #39905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
Negate find_object GetConservativeGC logic.
- Loading branch information
commit 0817d28826614e31ec3bb2fe3bb2a2262c4f08c7
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this effects the path we take here in the default CoreCLR config. CoreCLR has
FEATURE_CONSERVATIVE_GCdefined andGCConfig::GetConservativeGCdefaults to false.It means that this was effectively
if (seg && interior <= heap_segment_allocated(seg))before this change in the default CoreCLR config, and it is justif (seg)after this change.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these checks for
GetConservativeGCseem suspicious to me - I dunno who added them but the impl seems questionable... the idea, if I had to guess, was probably that if we are in conservative mode (ie the config is set), we can tolerate an interior pointer that's > heap_segment_allocated but all we do is we return 0 there - the only case where we could return a non zero value is if an interior pointer is >= heap_segment_mem and < heap_segment_allocated, regardless of whether the conservative config is set. so the code should just beand the assert can be deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we want to be more complete, we could do
meaning that if we find a valid seg for it, we tolerate it if conservative config is set and inteiror is > heap_segment_allocated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the comments. I believe I have updated as per the last comment. I tried the Wasm Generics test in a loop 100 times and it completed without errors, so this fix looks good for CoreRT/Wasm. I'm sure you experts will advise if I have it wrong.