dtolnay / proc-macro2

Apache License 2.0
746 stars 117 forks source link

Abort on Mac OS X 11.4 Big Sur #292

Closed U007D closed 3 years ago

U007D commented 3 years ago

When parsing https://github.com/sifive/freedom-e-sdk/blob/origin/dev/zongl/unmatched/bsp/sifive-hifive-unmatched/design.svd (attached) with [svd2rust](https://crates.io/crates/svd2rust), on OS X 11.4 (Big Sur) I get the following (note the abort/lack of backtrace):

sergibli@HephaestusMobi:~/Development/svd2rust ▶ RUST_BACKTRACE=1 svd2rust --target riscv -i ../bg/ada/sifive_hifive_unmatched_hal/sifive_hifive_unmatched.svd -o ../bg/ada/sifive_hifive_unmatched_hal/output/ fatal runtime error: failed to initiate panic, error 5 Abort trap: 6

sergibli@HephaestusMobi:~/Development/svd2rust ▶ svd2rust --version svd2rust 0.19.0 ( )

sergibli@HephaestusMobi:~/Development/svd2rust ▶ rustc --version rustc 1.53.0 (53cb7b09b 2021-06-17)

Tried single-stepping in the debugger; crash appears to be in proc-macro-2-1.0.27::detection::initialize(), but the debugger was also acting flaky at this point.

▶ cargo tree -i proc-macro2
proc-macro2 v1.0.27
...
├── svd2rust v0.19.0 (/Users/brad/Development/svd2rust)
...

Switching to a Linux VM, using the same file and toolchain version, everything worked fine.

[form](https://crates.io/crates/form) also aborted on OS X in the same way while parsing a lib.rs file. form also has a dependency on proc-macro2 (v0.4).

Can anyone confirm? Any insights as to what the issue might be?

U007D commented 3 years ago

I was curious why I wasn't seeing this reported by other Mac users as well. I spent some time to set up another Mac environment and the abort did not replicate. Closing this issue, as it appears to be something in my own dev environment.