Skip to content

Seg fault in Arc #12504

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

Closed
manuels opened this issue Feb 23, 2014 · 4 comments
Closed

Seg fault in Arc #12504

manuels opened this issue Feb 23, 2014 · 4 comments

Comments

@manuels
Copy link

manuels commented Feb 23, 2014

I get a segmentation fault in https://github.com/mozilla/rust/blob/a88654977234d18b57e2a1842549941397ab0d59/src/libstd/sync/arc.rs#L83 in my program. (Find the full (complex and not really productive) program here)

I'm pretty new to rust.
How can I try to debug this segmentation fault?

@alexcrichton
Copy link
Member

Your program appears to have been removed, could you add it back up again?

A common reason for this is moving out of a capture variable multiple times in a loop, the compiler sadly doesn't currently prevent that. (#12041)

@manuels
Copy link
Author

manuels commented Feb 23, 2014

Second try: https://gist.github.com/manuels/9178144
Probably the issue you mentioned is present here.

@alexcrichton
Copy link
Member

Aha indeed, https://gist.github.com/manuels/9178144#file-gistfile1-txt-L41 is a location where you're moving out in a loop (and there may be more).

Closing as a dupe of #12041

@manuels
Copy link
Author

manuels commented Feb 24, 2014

ok, thanks @alexcrichton! and sorry for the messy code. I was playing around with rust...

bors added a commit to rust-lang-ci/rust that referenced this issue Jul 25, 2022
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