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

Miri complains about stacked borrow #1178

Closed
mulimoen opened this issue Jul 3, 2022 · 2 comments
Closed

Miri complains about stacked borrow #1178

mulimoen opened this issue Jul 3, 2022 · 2 comments

Comments

@mulimoen
Copy link

mulimoen commented Jul 3, 2022

The following snippet fails when executing with miri on the latest nightly

use ndarray::*;

fn main() {
    let a1 = arr2(&[[1.0, 2.0], [3.0, 4.0]]);
    let a2 = arr2(&[[2.0, 3.0], [4.0, 5.0]]);
    
    a1.dot(&a2);
}

and results in error: Undefined Behavior: attempting a read access using <16389> at alloc6883[0x48], but that tag does not exist in the borrow stack for this location

I am not sure whether this is a bug in ndarray or a false positive in miri

Playground link

@akern40
Copy link
Collaborator

akern40 commented Oct 24, 2024

This SB violation does not reproduce on 0.16.1; closing in favor of resolving all Miri issues in #1372 via #1446.

@akern40 akern40 closed this as completed Oct 24, 2024
@akern40
Copy link
Collaborator

akern40 commented Oct 24, 2024

But thank you for raising the issue!

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

2 participants