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

assertion failed: key != 0 #19567

Closed
aidancully opened this issue Dec 5, 2014 · 2 comments
Closed

assertion failed: key != 0 #19567

aidancully opened this issue Dec 5, 2014 · 2 comments
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@aidancully
Copy link
Contributor

while re-building rust on a FreeBSD 9.2 box; command line (from ps output):

x86_64-unknown-freebsd/stage1/bin/rustc --cfg stage1 -O --cfg rtopt --cfg debug -C prefer-dynamic --target=x86_64-unknown-freebsd -D warnings -L x86_64-unknown-freebsd/rt -L /usr/home/aidan/rust/rust/x86_64-unknown-freebsd/llvm/Release+Asserts/lib -L --out-dir x86_64-unknown-freebsd/stage1/lib/rustlib/x86_64-unknown-freebsd/lib -C extra-filename=-4e7c5e5c /usr/home/aidan/rust/src/libcore/lib.rs

Error output:

rustc: x86_64-unknown-freebsd/stage1/lib/rustlib/x86_64-unknown-freebsd/lib/libcore
task 'rustc' panicked at 'assertion failed: key != 0', /usr/home/aidan/rust/rust/src/libstd/sys/common/thread_local.rs:189
stack backtrace:
   1:        0x805a1c760 - <unknown>
   2:        0x805a1e890 - <unknown>
   3:        0x805e97e40 - <unknown>
   4:        0x8059a82c0 - <unknown>
   5:        0x805a1c460 - <unknown>
   6:        0x8059dbf10 - <unknown>
   7:        0x8059dbdc0 - <unknown>
   8:        0x8059dc130 - <unknown>
   9:        0x8059f7410 - <unknown>
  10:        0x805e96730 - <unknown>
  11:        0x805eee930 - <unknown>
  12:        0x805eee920 - <unknown>
  13:        0x805e96630 - <unknown>
  14:        0x805e96390 - <unknown>
  15:        0x805e974b0 - <unknown>
  16:        0x80618cc30 - <unknown>
  17:                0x0 - <unknown>
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
@aidancully
Copy link
Contributor Author

This was introduced in a9c1152.

Note that the pthread specification does not require that the key created by pthread_key_create is non-0. I think, therefore, that the assertion is incorrect, but the absence of any guaranteed sentinel value in the standard (or is there one?) makes it hard for me to see how lazy pthread_key creation can work in this form without some hack.

@huonw huonw added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Dec 6, 2014
alexcrichton added a commit to alexcrichton/rust that referenced this issue Dec 9, 2014
pthread_key_create can be 0.
addresses issue rust-lang#19567.
@emberian
Copy link
Member

Associated PR was merged.

In the future, if you write "Closes X", "Fixes X", etc github will close the issue automatically when the commit is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

3 participants