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

Running any program on freebsd needs __cxa_thread_atexit_impl #3276

Closed
RalfJung opened this issue Jan 24, 2024 · 1 comment · Fixed by #3277
Closed

Running any program on freebsd needs __cxa_thread_atexit_impl #3276

RalfJung opened this issue Jan 24, 2024 · 1 comment · Fixed by #3277

Comments

@RalfJung
Copy link
Member

RalfJung commented Jan 24, 2024

Full error:

  error: unsupported operation: `extern` static `std::sys::pal::unix::thread_local_dtor::register_dtor::__cxa_thread_atexit_impl` from crate `std` is not supported by Miri
    --> /home/runner/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/sys/pal/unix/thread_local_dtor.rs:55:22
     |
  LL |     if let Some(f) = __cxa_thread_atexit_impl {
     |                      ^^^^^^^^^^^^^^^^^^^^^^^^ `extern` static `std::sys::pal::unix::thread_local_dtor::register_dtor::__cxa_thread_atexit_impl` from crate `std` is not supported by Miri
     |
     = help: this is likely not a bug in the program; it indicates that the program performed an operation that the interpreter does not support
     = note: BACKTRACE:
     = note: inside `std::sys::pal::unix::thread_local_dtor::register_dtor` at /home/runner/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/sys/pal/unix/thread_local_dtor.rs:55:22: 55:46
     = note: inside `std::thread::local_impl::Key::<std::sys_common::thread_info::ThreadInfo>::register_dtor` at /home/runner/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/sys/pal/common/thread_local/fast_local.rs:160:13: 160:35
     = note: inside `std::sys_common::thread_info::THREAD_INFO::__getit` at /home/runner/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/sys/pal/common/thread_local/fast_local.rs:56:25: 59:26
     = note: inside `std::thread::LocalKey::<std::sys_common::thread_info::ThreadInfo>::try_with::<{closure@std::sys_common::thread_info::set::{closure#0}}, ()>` at /home/runner/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/thread/local.rs:285:32: 285:50
     = note: inside `std::thread::LocalKey::<std::sys_common::thread_info::ThreadInfo>::with::<{closure@std::sys_common::thread_info::set::{closure#0}}, ()>` at /home/runner/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/thread/local.rs:262:9: 262:25
     = note: inside `std::sys_common::thread_info::set` at /home/runner/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/sys_common/thread_info.rs:44:5: 50:7
     = note: inside `std::rt::init` at /home/runner/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/rt.rs:105:9: 105:45
     = note: inside closure at /home/runner/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/rt.rs:147:42: 147:67
     = note: inside `std::panicking::r#try::do_call::<{closure@std::rt::lang_start_internal::{closure#1}}, ()>` at /home/runner/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/panicking.rs:554:40: 554:43
     = note: inside `std::panicking::r#try::<(), {closure@std::rt::lang_start_internal::{closure#1}}>` at /home/runner/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/panicking.rs:518:19: 518:81
     = note: inside `std::panic::catch_unwind::<{closure@std::rt::lang_start_internal::{closure#1}}, ()>` at /home/runner/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/panic.rs:142:14: 142:33
     = note: inside `std::rt::lang_start_internal` at /home/runner/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/rt.rs:147:5: 147:70
     = note: inside `std::rt::lang_start::<()>` at /home/runner/.rustup/toolchains/miri/lib/rustlib/src/rust/library/std/src/rt.rs:165:17: 170:6

This started somewhat recently; something must have changed in std that it now requires this extern. Regression range: rust-lang/rust@0011fac...f6ee4bf

@RalfJung
Copy link
Member Author

Probably caused by rust-lang/rust#120188

@bors bors closed this as completed in ebff47b Jan 24, 2024
RalfJung pushed a commit to RalfJung/rust that referenced this issue Jan 28, 2024
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

Successfully merging a pull request may close this issue.

1 participant