Skip to content

Huge stack arrays cause stack overflow with segmentation fault #40862

Closed
@dns2utf8

Description

@dns2utf8

I noticed a 4MB stack allocated buffer within a thread causes the thread to panic.
In the main it takes 8MB to crash on amd64: Run on play

The strange part is, even when I box it, it still segfaults: Run on Play

Am I using the Box wrong? Why does it SEGV at all? In my understanding allocating 8MB at once is not such a big deal anymore.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.T-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