Skip to content

Out-of-memory causes SIGILL #21592

Closed
Closed
@mpdn

Description

@mpdn

This snippet: (Playpen link)

#![allow(unstable)]

extern crate test;

fn main() {
    let a: Vec<u8> = Vec::with_capacity(::std::usize::MAX);
    ::test::black_box(a);
}

Causes the program to close with a SIGILL (Illegal instruction) error. I would have expected something like a SIGSEGV instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-diagnosticsArea: Messages for errors, warnings, and lints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions