Skip to content

Program terminate with unexpected SIGABRT when using panic = "abort" #9103

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

Closed
arnaudgolfouse opened this issue Jan 25, 2021 · 2 comments
Closed
Labels
C-bug Category: bug

Comments

@arnaudgolfouse
Copy link

Problem
My program terminate with SIGABRT unexpectedly.

Steps

  1. In Cargo.toml:

    [dependencies]
    syn = { version = "1.0.60", default-features = false, features = ["parsing", "full"] }
    thiserror = "1.0.23"
    
    [profile.dev]
    panic = "abort"
  2. And in main.rs

    fn main() {
        let _ = syn::parse_str::<syn::Expr>("");
    }
  3. run cargo run (on rust stable 1.49): the ouput is

    fish: “cargo run” terminated by signal SIGABRT (Abort)
    

I suspect this belongs in the cargo issues, because removing either

thiserror = "1.0.23"

or

panic = "abort"

Fixes the issue.

Notes

Output of cargo version:

cargo 1.49.0 (d00d64df9 2020-12-05)

On ubuntu 20.04.1, rust 1.49 stable, target x86_64-unknown-linux-gnu

@arnaudgolfouse arnaudgolfouse added the C-bug Category: bug label Jan 25, 2021
@ehuss
Copy link
Contributor

ehuss commented Jan 25, 2021

I think this is working as expected. Adding thiserror enables the proc-macro feature on syn, which is incompatible with panic="abort". See dtolnay/proc-macro2#218 for more information.

@arnaudgolfouse
Copy link
Author

Wow, ok... well at least this is not a bug in cargo 😅
Thank you for the response !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

2 participants