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

mitigate in-place reducedim alias bug #45821

Closed
wants to merge 12 commits into from
Closed

Conversation

Moelf
Copy link
Sponsor Contributor

@Moelf Moelf commented Jun 26, 2022

fix #39385

it doesn't fix it completely, but I think this fix the most common case.

If user is doing non-trivial viewing and passing part of the original array
into the mutating function, they should check what they are doing?

@brenhinkeller brenhinkeller added the kind:bugfix This change fixes an existing bug label Jul 25, 2022
@LilithHafner
Copy link
Member

Documenting that aliasing is prohibited is definitely necessary. Since this PR's creation, that documentation has been added to sum!, but not the other three.

The size equality check feels very much like a bandaid covering up for the lack of a solid aliasing story (#8087). I'm hesitant to merge a solution to the common case that leaves bugs present in more complex edge cases.

@LilithHafner
Copy link
Member

Test failures seem relevant.

@Moelf
Copy link
Sponsor Contributor Author

Moelf commented Aug 7, 2023

I'm hesitant to merge a solution to the common case that leaves bugs present in more complex edge cases.

so we should allow common bug that affects most people to keep being so while we search for a perfect solution that's gonna at least take another year or two to come by?

@Moelf Moelf closed this Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bugfix This change fixes an existing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sum!, prod!, any!, and all! may silently return incorrect results
4 participants