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

take_diag corrupts memory #14

Closed
wavepacket opened this issue Sep 23, 2014 · 1 comment
Closed

take_diag corrupts memory #14

wavepacket opened this issue Sep 23, 2014 · 1 comment

Comments

@wavepacket
Copy link

Just tried something along these lines:

RTensor matrix = ...
RTensor couplings = take_diag(matrix, 1);
RTensor frequencies = take_diag(matrix, 0, 1); // skip the first frequency

As soon as I add the last line, I get a memory corruption when exiting the context (i.e., when the matrices are deleted). This suggests some issue with take_diag() if you supply the start/end point.

@wavepacket
Copy link
Author

Just tried it again: Could not verify (assertion fails instead).
Besides I noticed that I used this incorrectly.

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