Skip to content
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

fix pointer for Memory by deleting incorrect method #51963

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

oscardssmith
Copy link
Member

The fallback method for AbstractArray was correct and the custom one for Memory wasn't.

@oscardssmith oscardssmith added the bugfix This change fixes an existing bug label Oct 31, 2023
Copy link
Sponsor Member

@vtjnash vtjnash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't the generic one fail to bounds check? (Not that bounds checking unsafe pointers really adds much in safety, it did catch several package bugs)

@oscardssmith
Copy link
Member Author

It does. Should it do the boundscheck for the abstract one? That seems pretty reasonable.

@oscardssmith
Copy link
Member Author

oscardssmith commented Oct 31, 2023

Actually current behavior is to not boundscheck any AbstractArray, including Array (since pointer is pretty inherently unsafe anyway), so IMO Memory shouldn't be boundschecked either.

@KristofferC KristofferC merged commit 7c74274 into master Nov 2, 2023
8 checks passed
@KristofferC KristofferC deleted the fix-Memory-pointer branch November 2, 2023 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants