8000 cargo-hack 0.6.34 and 0.6.35 segfault with stack overflow · Issue #271 · taiki-e/cargo-hack · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
cargo-hack 0.6.34 and 0.6.35 segfault with stack overflow #271
Closed
@ctz

Description

@ctz

Hello,

Thanks for cargo-hack!

Repro case:

$ cargo install --locked cargo-hack@0.6.35
$ git clone --branch v/0.23.25 https://github.com/rustls/rustls
$ cd rustls/
$ cargo hack check --package rustls --feature-powerset --no-dev-deps --group-features aws_lc_rs,aws-lc-rs --group-features fips,aws_lc_rs --mutually-exclusive-features fips,ring --mutually-exclusive-features custom_provider,aws_lc_rs --mutually-exclusive-features custom_provider,ring
info: --no-dev-deps modifies real `Cargo.toml` while cargo-hack is running and restores it when finished

thread 'main' has overflowed its stack
fatal runtime error: stack overflow
Aborted (core dumped)

(same for 0.6.34)

Counter-repro case:

$ cargo install --locked cargo-hack@0.6.33
$ git clone --branch v/0.23.25 https://github.com/rustls/rustls
$ cd rustls/
$ cargo hack check --package rustls --feature-powerset --no-dev-deps --group-features aws_lc_rs,aws-lc-rs --group-features fips,aws_lc_rs --mutually-exclusive-features fips,ring --mutually-exclusive-features custom_provider,aws_lc_rs --mutually-exclusive-features custom_provider,ring
info: running `cargo check --no-default-features` on rustls (1/352)
    Checking untrusted v0.9.0
   Compiling rustls v0.23.25 (/home/jbp/tmp/rustls/rustls)
    Checking rustls-pki-types v1.11.0
    Checking subtle v2.6.1
(...continues...)

(other versions prior to .33 also work, but I haven't checked those exhaustively.)

Here's what the stack looks like in the failing case:

(gdb) bt
#0  0x0000555555593910 in <core::str::pattern::CharSearcher as core::str::pattern::Searcher>::next_match ()
#1  0x00005555555a969e in cargo_hack::features::Feature::matches_recursive::rec ()
#2  0x00005555555a9752 in cargo_hack::features::Feature::matches_recursive::rec ()
#3  0x00005555555a9752 in cargo_hack::features::Feature::matches_recursive::rec ()
#4  0x00005555555a9752 in cargo_hack::features::Feature::matches_recursive::rec ()
#5  0x00005555555a9752 in cargo_hack::features::Feature::matches_recursive::rec ()
(... lots ...)
#34171 0x00005555555a9752 in cargo_hack::features::Feature::matches_recursive::rec ()
#34172 0x00005555555a9752 in cargo_hack::features::Feature::matches_recursive::rec ()
#34173 0x00005555555a9752 in cargo_hack::features::Feature::matches_recursive::rec ()
#34174 0x00005555555a9752 in cargo_hack::features::Feature::matches_recursive::rec ()
#34175 0x00005555555a9752 in cargo_hack::features::Feature::matches_recursive::rec ()
#34176 0x00005555555a9752 in cargo_hack::features::Feature::matches_recursive::rec ()
(... more ...)
#43625 0x00005555555a9752 in cargo_hack::features::Feature::matches_recursive::rec ()
#43626 0x00005555555a9752 in cargo_hack::features::Feature::matches_recursive::rec ()
#43627 0x00005555555c13fb in cargo_hack::determine_kind ()
#43628 0x00005555555bda4f in cargo_hack::try_main::{{closure}} ()
#43629 0x00005555555ad157 in cargo_hack::manifest::with ()
#43630 0x00005555555b97bf in cargo_hack::main ()
#43631 0x0000555555576ed3 in std::sys::backtrace::__rust_begin_short_backtrace ()
#43632 0x00005555555c60c4 in main ()

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: related to a bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0