Skip to content

Regex test panics with add overflow error for latest nightly #659

@bjorn3

Description

@bjorn3

Minimized repro:

extern crate aho_corasick;

fn main() {
    let ac = aho_corasick:: AhoCorasickBuilder::new()
        .match_kind(aho_corasick::MatchKind::LeftmostFirst)
        .dfa(true)
        .build_with_size::<u32, _, _>(&[
            b"cg",
            b"gg",
            b"ta",
        ])
        .unwrap();
    ac.find(b"abc");
}
trap at Instance { def: Item(DefId(12:824 ~ aho_corasick[3b90]::prefilter[0]::{{impl}}[4]::update_skipped_bytes[0])), substs: [] } (_ZN12aho_corasick9prefilter14PrefilterState20update_skipped_bytes17hd315c6d74654538eE): [panic] Assert attempt to add with overflow at /home/bjorn/.cargo/registry/src/github.com-1ecc6299db9ec823/aho-corasick-0.7.6/src/prefilter.rs:199:9: 199:32 failed.
$ rustc -V
rustc 1.38.0-nightly (d3f8a0b5d 2019-08-04)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions