Skip to content

"Aborted (core dumped)" on typo in attribute #70763

Closed
@dwrensha

Description

rustc crashes ungracefully when given the following input (found by fuzz-rustc):

fn main() {
   let _ = || {
       #[cfg(any(target_arc+ = "arm"))]
       fn _foo() {}
   };
}
$ rustc -vV
rustc 1.44.0-nightly (74bd074ee 2020-04-03)
binary: rustc
commit-hash: 74bd074eefcf4915c73d1ab91bc90859664729e6
commit-date: 2020-04-03
host: x86_64-unknown-linux-gnu
release: 1.44.0-nightly
LLVM version: 9.0

$ rustc main.rs
error: expected one of `(`, `)`, `,`, `::`, or `=`, found `+`
 --> main.rs:3:28
  |
3 |        #[cfg(any(target_arc+ = "arm"))]
  |                            ^ expected one of `(`, `)`, `,`, `::`, or `=`

Aborted (core dumped)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-attributesArea: Attributes (`#[…]`, `#![…]`)C-bugCategory: This is a bug.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.P-lowLow priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions