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

_generic_matmatmul! calls conj! on potentially uninitialized arrays #812

Closed
fkastner opened this issue Feb 17, 2021 · 1 comment
Closed

Comments

@fkastner
Copy link
Contributor

Hi,

in _generic_matmatmul! there is a call to copyto! (Ref.):

copyto!(Btile, 1:mB, 1:nB, tB, B, 1:mB, 1:nB)

in which (Ref.)Btile will only be initialized in the range (1:mB, 1:nB) which is smaller than size(Btile). Afterwards conj!(Btile) is called which now also tries to conjugate also the uninitialized entries outside (1:mB, 1:nB).

This leads to problems with custom types since the uninitialized memory does not necessarily represent a valid object and conj could fail on invalid objects that violate certain assumptions.

Possibly conj! should only be called on B[1:mB, 1:nB]?

@fkastner
Copy link
Contributor Author

Fixed by JuliaLang/julia#40481.

@KristofferC KristofferC transferred this issue from JuliaLang/julia Nov 26, 2024
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

No branches or pull requests

1 participant