Skip to content

Assertion failure causes wrong exit status #4547

@alexcrichton

Description

@alexcrichton
fn main() {
  os::args();
  assert!(false);
}

Causes the program to return with exit status 0. Thankfully removing os::args() makes it return with nonzero, but it appears that at any point after the invocation of os::args() an assertion failure will cause an exit status of 0.

I ran this against a compiler built at e51ec26

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions