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

Reductions shouldn't overflow for LinearSlow arrays #13809

Merged
merged 1 commit into from
Oct 28, 2015
Merged

Conversation

timholy
Copy link
Member

@timholy timholy commented Oct 28, 2015

Talk about embarrassing:

julia> A = reshape(map(UInt8, 101:109), (3,3))
3x3 Array{UInt8,2}:                                                                                                                                                                                                                                                            
 0x65  0x68  0x6b                                                                                                                                                                                                                                                              
 0x66  0x69  0x6c                                                                                                                                                                                                                                                              
 0x67  0x6a  0x6d                                                                                                                                                                                                                                                              

julia> sum(A)
0x00000000000003b1                                                                                                                                                                                                                                                             

julia> sum(sub(A, 1:3, 1:3))
0xb1

I can't believe no one (first and foremost, myself) has caught this; we've had it since #8420 was merged. As someone who has been writing/prodding at related code for quite a while, I am ashamed.

timholy added a commit that referenced this pull request Oct 28, 2015
Reductions shouldn't overflow for LinearSlow arrays
@timholy timholy merged commit 00ea197 into master Oct 28, 2015
@timholy timholy deleted the teh/fix_reductions branch October 28, 2015 22:25
@timholy
Copy link
Member Author

timholy commented Oct 28, 2015

@tkelman, we should let this run through PkgEvaluator, but assuming all is well this is a pretty high priority backport (especially with the tagging of the new FixedPointNumbers, which is how it got revealed). Let me know if there's anything you want me to do to help.

@tkelman
Copy link
Contributor

tkelman commented Oct 29, 2015

I'll be starting work on a backport branch within the next week, so thanks for the heads-up. What will certainly save me the most time is a few other people trying to run PackageEvaluator locally and seeing if anyone other than me hits the issue described in #13718 (comment) - getting to the bottom of and fixing that will reduce the number of times I have to repeatedly run PkgEval.

timholy added a commit that referenced this pull request Oct 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants