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

Crash (null ptr) in recv_opt #12360

Closed
gavinb opened this issue Feb 18, 2014 · 1 comment
Closed

Crash (null ptr) in recv_opt #12360

gavinb opened this issue Feb 18, 2014 · 1 comment
Labels
I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

Comments

@gavinb
Copy link
Contributor

gavinb commented Feb 18, 2014

A simple I/O test sending messages across channels between tasks causes a crash.

Tested on OS X 10.9 with rev c84890 (a very recent build from master).

Source here: https://gist.github.com/gavinb/9064658

The output is:

Sending...
Sending...
Joe 0
Ann 0
Receiving...
Receiving...

But it then crashes with:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
[Switching to process 3210 thread 0x1003]
0x0000000100001841 in sync::atomics::atomic_load::h0eb835f964245badDqa::v0.0 ()
(gdb) bt
#0  0x0000000100001841 in sync::atomics::atomic_load::h0eb835f964245badDqa::v0.0 ()
#1  0x00000001000a5b50 in io::stdio::println_args::closure ()
#2  0x00000001000017d4 in sync::atomics::AtomicUint::load::h630f72316818459ejqa::v0.0 ()
#3  0x0000000100014004 in sync::arc::UnsafeArc$LT$T$GT$::get::hcae23af7d89013bbIsc::v0.0 ()
#4  0x0000000100026de0 in comm::Port$LT$T$GT$::recv_opt::hdfac7690a2025dc4J3d::v0.0 ()
#5  0x0000000100026cc6 in comm::Port$LT$T$GT$::recv::h93835721c191a171gSe::v0.0 () at boring09.rs:55
#6  0x00000001000267e7 in fn4474 () at boring09.rs:55
#7  0x000000010011dcec in task::bootstrap_green_task::closure ()
#8  0x00000001000faa78 in rt::task::Task::run::closure ()
#9  0x000000010010479c in rust_try ()
#10 0x000000010011dba5 in task::bootstrap_green_task::h763de3b86e4a2837Sbc::v0.10.pre ()
@huonw huonw added the I-crash label Feb 18, 2014
@alexcrichton
Copy link
Member

Sadly this is just #12041 striking again, so closing as a dupe of that bug.

You're moving out of wait_chan and wait_port in a loop, and the compiler shouldn't let you do that.

bors added a commit to rust-lang-ci/rust that referenced this issue Jul 25, 2022
fix: Fix completions not working after attributes

Closes rust-lang/rust-analyzer#12259
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
Projects
None yet
Development

No branches or pull requests

3 participants