Skip to content

Stack overflow compiling slice pattern for big array #53820

Closed
@RalfJung

Description

@RalfJung

The following fails with a stack overflow:

#![feature(slice_patterns)]

fn main() {
    match [0u8; 16*1024] {
        [..] => {}
    }
}

I see tests failing on miri's CI on Windows when the size is just 1024, so my suspicion is that this code will fail to compile on Windows with a smaller slice -- but I do not have a Windows machine to test that.

Metadata

Metadata

Labels

A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlF-slice_patterns`#![feature(slice_patterns)]`I-compiletimeIssue: Problems and improvements with respect to compile times.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