Skip to content

Creating a regexes from an empty string crashes with an OOB #13843

Closed
@huonw

Description

@huonw
extern crate regex;

fn main() { let _ = regex::Regex::new(""); }
task '<main>' failed at 'index out of bounds: the len is 0 but the index is 0', /build/rust-git/src/rust/src/libregex/lib.rs:1

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions