Skip to content

Generates illegal instructions #500

Closed
@baskerville

Description

@baskerville

I get a systematic crash when I run cargo-edit 0.3.0 on an Intel Core 2 Duo E7600 CPU.

The lldb backtrace seems to indicate that SIMD is involved:

* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
  * frame #0: 0x00000001002e8db6 cargo-add`core::coresimd::x86::xsave::_xgetbv::h7da7479f591ed348 at xsave.rs:95 [opt]
    frame #1: 0x00000001002eaaeb cargo-add`std::stdsimd::arch::detect::os::detect_features::hcd1961e6f91cf102 at x86.rs:157 [opt]
    frame #2: 0x00000001002ea94a cargo-add`std::stdsimd::arch::detect::os::check_for::h494500e4a19a5d3c [inlined] core::ops::function::FnOnce::call_once::h731b82db5225b805 at function.rs:223 [opt]
    frame #3: 0x00000001002ea945 cargo-add`std::stdsimd::arch::detect::os::check_for::h494500e4a19a5d3c [inlined] std::stdsimd::arch::detect::cache::test::h9f743f59f6a54bc9 at cache.rs:149 [opt]
    frame #4: 0x00000001002ea938 cargo-add`std::stdsimd::arch::detect::os::check_for::h494500e4a19a5d3c at x86.rs:16 [opt]
    frame #5: 0x000000010027b854 cargo-add`regex::literal::Matcher::new::h9088e543805253af + 324
    frame #6: 0x000000010027a931 cargo-add`regex::literal::LiteralSearcher::prefixes::h2920ca55b2b79fe1 + 641
    frame #7: 0x0000000100269e5e cargo-add`regex::exec::ExecBuilder::build::h72257c20c98ecf31 + 6510
    frame #8: 0x0000000100266762 cargo-add`regex::re_builder::unicode::RegexBuilder::build::h12d55fa7c52e206b + 210
    frame #9: 0x000000010029ad4b cargo-add`regex::re_unicode::Regex::new::h134009fc29889184 + 219
    frame #10: 0x00000001002470cc cargo-add`std::sync::once::Once::call_once::_$u7b$$u7b$closure$u7d$$u7d$::h17d5ef8a5bc6025f + 60
    frame #11: 0x00000001002f3a2e cargo-add`std::sync::once::Once::call_inner::h897ebf125b2dcf3e at once.rs:340 [opt]
    frame #12: 0x0000000100234f35 cargo-add`docopt::parse::Parser::new::h29e507fb9dde54d3 + 565
    frame #13: 0x000000010000561c cargo-add`cargo_add::main::h12221ffe12ffa004 + 44
    frame #14: 0x0000000100002dd6 cargo-add`std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::hc5b18510be8e533e + 6
    frame #15: 0x00000001002f6b28 cargo-add`std::panicking::try::do_call::h780530fa434ed2ed [inlined] std::rt::lang_start_internal::_$u7b$$u7b$closure$u7d$$u7d$::hcfde3e1c19e6fa13 at rt.rs:59 [opt]
    frame #16: 0x00000001002f6b1c cargo-add`std::panicking::try::do_call::h780530fa434ed2ed at panicking.rs:310 [opt]
    frame #17: 0x00000001003028ff cargo-add`__rust_maybe_catch_panic at lib.rs:105 [opt]
    frame #18: 0x00000001002ea7a2 cargo-add`std::rt::lang_start_internal::h46f9f692ece7505b [inlined] std::panicking::try::h0c5a2273ff0725da at panicking.rs:289 [opt]
    frame #19: 0x00000001002ea76f cargo-add`std::rt::lang_start_internal::h46f9f692ece7505b [inlined] std::panic::catch_unwind::h3474c6e3bb49278a at panic.rs:374 [opt]
    frame #20: 0x00000001002ea76f cargo-add`std::rt::lang_start_internal::h46f9f692ece7505b at rt.rs:58 [opt]
    frame #21: 0x00000001000062fc cargo-add`main + 44
    frame #22: 0x00007fff52586015 libdyld.dylib`start + 1

I'm also going to ping @BurntSushi as advised in the related cargo-edit issue.

I remember that I once got the same crash while playing with rustc's optimisation flags to build one of my projects.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions