Giter Club home page Giter Club logo

Comments (3)

Licenser avatar Licenser commented on June 12, 2024 1

Oh that's a good call!

You are right, this fails as well :) (I really shouldn't add a smiley here ... )

going down this rout I could reduce the failure to:

use std::sync::atomic::{AtomicUsize, Ordering};

static ID: AtomicUsize = AtomicUsize::new(0);

#[test]
fn test1() {
        ID.fetch_add(1, Ordering::Relaxed);
}

which quite clearly isn't a autocfg issue! I'll open a rust bug and close this one. Thank you for helping to track this down!

from autocfg.

Licenser avatar Licenser commented on June 12, 2024

looking at the debugger the calltracek looks like this:

* thread #1, name = 'autocfg-f01dc84', stop reason = signal SIGSTOP
    frame #0: 0x0000aaaaaaad6a98 autocfg-f01dc8476d25cc8c`core::sync::atomic::atomic_add::h46e986141843397d(dst=0x0000aaaaaab7a0c0, val=1, order=Relaxed) at atomic.rs:2387:24
(lldb) bt
error: need to add support for DW_TAG_base_type '()' encoded with DW_ATE = 0x7, bit_size = 0
* thread #1, name = 'autocfg-f01dc84', stop reason = signal SIGSTOP
  * frame #0: 0x0000aaaaaaad6a98 autocfg-f01dc8476d25cc8c`core::sync::atomic::atomic_add::h46e986141843397d(dst=0x0000aaaaaab7a0c0, val=1, order=Relaxed) at atomic.rs:2387:24
    frame #1: 0x0000aaaaaaacedf8 autocfg-f01dc8476d25cc8c`core::sync::atomic::AtomicUsize::fetch_add::hac95446173d992f0(self=0x0000aaaaaab7a0c0, val=1, order=Relaxed) at atomic.rs:1740:26
    frame #2: 0x0000aaaaaaacbc04 autocfg-f01dc8476d25cc8c`autocfg::AutoCfg::probe::h91d6d047b62c4170(self=0x0000ffffffffce80, code="") at lib.rs:233:18
    frame #3: 0x0000aaaaaaacb158 autocfg-f01dc8476d25cc8c`autocfg::AutoCfg::with_dir::h07af96618be0546c(dir="target") at lib.rs:203:13
    frame #4: 0x0000aaaaaaac4a54 autocfg-f01dc8476d25cc8c`autocfg::tests::_$LT$impl$u20$autocfg..AutoCfg$GT$::for_test::hf187392a572e307d at tests.rs:21:21
    frame #5: 0x0000aaaaaaacfd04 autocfg-f01dc8476d25cc8c`autocfg::tests::autocfg_version::hf8b96c6f0671e887 at tests.rs:28:14
    frame #6: 0x0000aaaaaaac34a8 autocfg-f01dc8476d25cc8c`autocfg::tests::autocfg_version::_$u7b$$u7b$closure$u7d$$u7d$::h513763c4192f38d2((null)=0x0000ffffffffd2fe) at tests.rs:27:1
    frame #7: 0x0000aaaaaaad5024 autocfg-f01dc8476d25cc8c`core::ops::function::FnOnce::call_once::h6da51f25e97b6c65((null)=closure-0 @ 0x0000ffffffffd2fe, (null)=<unavailable>) at function.rs:227:5
    frame #8: 0x0000aaaaaaaf9174 autocfg-f01dc8476d25cc8c`test::__rust_begin_short_backtrace::h5bcd9a25efe8d634 [inlined] core::ops::function::FnOnce::call_once::h0acf993ed6146b74 at function.rs:227:5
    frame #9: 0x0000aaaaaaaf9170 autocfg-f01dc8476d25cc8c`test::__rust_begin_short_backtrace::h5bcd9a25efe8d634 at lib.rs:577
    frame #10: 0x0000aaaaaaaf813c autocfg-f01dc8476d25cc8c`test::run_test::run_test_inner::_$u7b$$u7b$closure$u7d$$u7d$::h97753dd854620227 [inlined] _$LT$alloc..boxed..Box$LT$F$C$A$GT$$u20$as$u20$core..ops..function..FnOnce$LT$Args$GT$$GT$::call_once::h51f753c3873f5fa3 at boxed.rs:1575:9
    frame #11: 0x0000aaaaaaaf8130 autocfg-f01dc8476d25cc8c`test::run_test::run_test_inner::_$u7b$$u7b$closure$u7d$$u7d$::h97753dd854620227 [inlined] _$LT$std..panic..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::h5efc09572c3a7383 at panic.rs:347
    frame #12: 0x0000aaaaaaaf8130 autocfg-f01dc8476d25cc8c`test::run_test::run_test_inner::_$u7b$$u7b$closure$u7d$$u7d$::h97753dd854620227 [inlined] std::panicking::try::do_call::h3d93d2055ab96c94 at panicking.rs:401
    frame #13: 0x0000aaaaaaaf8130 autocfg-f01dc8476d25cc8c`test::run_test::run_test_inner::_$u7b$$u7b$closure$u7d$$u7d$::h97753dd854620227 [inlined] std::panicking::try::h62bb60c147376d5c at panicking.rs:365
    frame #14: 0x0000aaaaaaaf8130 autocfg-f01dc8476d25cc8c`test::run_test::run_test_inner::_$u7b$$u7b$closure$u7d$$u7d$::h97753dd854620227 [inlined] std::panic::catch_unwind::hb2faed6399cba22b at panic.rs:434
    frame #15: 0x0000aaaaaaaf8130 autocfg-f01dc8476d25cc8c`test::run_test::run_test_inner::_$u7b$$u7b$closure$u7d$$u7d$::h97753dd854620227 [inlined] test::run_test_in_process::hc72ce3f8a1782280 at lib.rs:600
    frame #16: 0x0000aaaaaaaf80ac autocfg-f01dc8476d25cc8c`test::run_test::run_test_inner::_$u7b$$u7b$closure$u7d$$u7d$::h97753dd854620227 at lib.rs:492
    frame #17: 0x0000aaaaaaaf7650 autocfg-f01dc8476d25cc8c`test::run_test::run_test_inner::h85a02fa0fb1b0fa4 at lib.rs:530:13
    frame #18: 0x0000aaaaaaaf6614 autocfg-f01dc8476d25cc8c`test::run_test::h8218e7b82137be72 at lib.rs:564:28
    frame #19: 0x0000aaaaaaaf1dbc autocfg-f01dc8476d25cc8c`test::run_tests::h7e5532b3f478e10b at lib.rs:305:17
    frame #20: 0x0000aaaaaaae5c2c autocfg-f01dc8476d25cc8c`test::console::run_tests_console::h7ce9800d0f5abe2a at console.rs:290:5
    frame #21: 0x0000aaaaaaaf0544 autocfg-f01dc8476d25cc8c`test::test_main::h8fa9ab6b79e5eccb at lib.rs:122:15
    frame #22: 0x0000aaaaaaaf1278 autocfg-f01dc8476d25cc8c`test::test_main_static::h9e81e219e9eef511 at lib.rs:141:5
    frame #23: 0x0000aaaaaaac505c autocfg-f01dc8476d25cc8c`autocfg::main::h902804c37733bec8 at lib.rs:1:1
    frame #24: 0x0000aaaaaaad534c autocfg-f01dc8476d25cc8c`core::ops::function::FnOnce::call_once::hca54486c9f7a668f((null)=(autocfg-f01dc8476d25cc8c`autocfg::main::h902804c37733bec8 at lib.rs:1), (null)=<unavailable>) at function.rs:227:5
    frame #25: 0x0000aaaaaaac2d5c autocfg-f01dc8476d25cc8c`std::sys_common::backtrace::__rust_begin_short_backtrace::h2dfc5cbea67a689d(f=(autocfg-f01dc8476d25cc8c`autocfg::main::h902804c37733bec8 at lib.rs:1)) at backtrace.rs:125:18
    frame #26: 0x0000aaaaaaac189c autocfg-f01dc8476d25cc8c`std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::h19a744862809308b at rt.rs:49:18
    frame #27: 0x0000aaaaaab1e0fc autocfg-f01dc8476d25cc8c`std::rt::lang_start_internal::hbc0bc990d09d4f94 [inlined] core::ops::function::impls::_$LT$impl$u20$core..ops..function..FnOnce$LT$A$GT$$u20$for$u20$$RF$F$GT$::call_once::h99be496e2711d3b7 at function.rs:259:13
    frame #28: 0x0000aaaaaab1e0f0 autocfg-f01dc8476d25cc8c`std::rt::lang_start_internal::hbc0bc990d09d4f94 [inlined] std::panicking::try::do_call::ha870bafb774bdd40 at panicking.rs:401
    frame #29: 0x0000aaaaaab1e0f0 autocfg-f01dc8476d25cc8c`std::rt::lang_start_internal::hbc0bc990d09d4f94 [inlined] std::panicking::try::h46a214daad8fddae at panicking.rs:365
    frame #30: 0x0000aaaaaab1e0f0 autocfg-f01dc8476d25cc8c`std::rt::lang_start_internal::hbc0bc990d09d4f94 [inlined] std::panic::catch_unwind::hc48118c52f11bbeb at panic.rs:434
    frame #31: 0x0000aaaaaab1e0f0 autocfg-f01dc8476d25cc8c`std::rt::lang_start_internal::hbc0bc990d09d4f94 at rt.rs:34
    frame #32: 0x0000aaaaaaac1874 autocfg-f01dc8476d25cc8c`std::rt::lang_start::he326385d099c7ebc(main=(autocfg-f01dc8476d25cc8c`autocfg::main::h902804c37733bec8 at lib.rs:1), argc=3, argv=0x0000fffffffff228) at rt.rs:48:5
    frame #33: 0x0000aaaaaaac508c autocfg-f01dc8476d25cc8c`main + 40
    frame #34: 0x0000fffff7e14090 libc.so.6`__libc_start_main + 232
    frame #35: 0x0000aaaaaaabf760 autocfg-f01dc8476d25cc8c`_start + 52

from autocfg.

cuviper avatar cuviper commented on June 12, 2024

If atomic_add is hanging, that seems like a compiler codegen issue. Can you reproduce this separately? Something like:

use std::sync::atomic::{AtomicUsize, Ordering};

static ID: AtomicUsize = AtomicUsize::new(0);

#[test]
fn test1() {
    for _ in 0..1_000_000 {
        ID.fetch_add(1, Ordering::Relaxed);
    }
}

#[test]
fn test2() {
    for _ in 0..1_000_000 {
        ID.fetch_add(1, Ordering::Relaxed);
    }
}

from autocfg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.