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

Unclear "Concurrent write accesses" with UnsafeCell #278

Open
kvark opened this issue Jun 6, 2022 · 0 comments
Open

Unclear "Concurrent write accesses" with UnsafeCell #278

kvark opened this issue Jun 6, 2022 · 0 comments

Comments

@kvark
Copy link
Contributor

kvark commented Jun 6, 2022

---- util::loom stdout ----
thread 'util::loom' panicked at '
Causality violation: Concurrent write accesses to UnsafeCell.
created: /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/ops/function.rs:150:5
write two: thread #1 @ src/util.rs:29:35
', /Users/kvark/Code/loom/src/rt/location.rs:115:9
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

I'm confused about the error message. It says there are concurrent write accesses, so I would expect callstacks from 2 writes. Instead, it points to how the cell was created, and points to one of the writes. Where is the other one?

Repro by doing cargo test --features loom on https://github.com/kvark/choir/tree/loom-unsafecell-error

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