Skip to content

Attempting to parse {2} causes panic #84

Closed

Description

@frewsxcv
use regex::Regex;

extern crate regex;


fn main() {
    let _ = Regex::new("{2}");
}
/t/test (master|…) $ cargo run
     Running `target/debug/test`
thread '<main>' panicked at 'called `Option::unwrap()` on a `None` value', /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/src/libcore/option.rs:362
An unknown error occurred

To learn more, run the command again with --verbose.

Was found using https://github.com/kmcallister/afl.rs 👍

Activity

  1. changed the title [-]Attempting to parsing {2} causes panic[/-] [+]Attempting to parse {2} causes panic[/+] on May 11, 2015
  2. BurntSushi commented on May 11, 2015

    @BurntSushi
    Member

    This bug is fixed in my parser rewrite. Hopefully I'll get it merged soon!

    Was found using https://github.com/kmcallister/afl.rs

    Nice! What's the difference between afl and quickcheck?

  3. added a commit that references this issue on May 11, 2015
  4. frewsxcv commented on May 11, 2015

    @frewsxcv
    ContributorAuthor

    @BurntSushi I'm not too familiar with the inner workings of AFL and I hadn't heard about 'quickcheck' until now, so I'm unsure :-/

  5. Gankra commented on May 11, 2015

    @Gankra

    From my so-so understanding of the two, quickcheck is more basic and human-guided. You specify how to generate values and what properties you want to verify, and it goes along generating inputs and testing them against your function.

    afl is more automated. You give it a program and a data file, and it keeps mutating the file and feeding it to the program to explore different code paths and outputs. e.g. http://lcamtuf.blogspot.ca/2014/11/pulling-jpegs-out-of-thin-air.html describes how afl managed to reverse-engineer the jpeg format to generate random images given only a starting file that contains the string "hello world" and observing how a jpeg library reacted to it.

  6. frewsxcv commented on May 13, 2015

    @frewsxcv
    ContributorAuthor

    @BurntSushi What's the status of your rewrite?

  7. BurntSushi commented on May 13, 2015

    @BurntSushi
    Member

    Most of the parser is done. I just need to finish up char classes. Then tweak the compiler and I should be home free. Probably a couple more days of work. (But I'm working on Rust blog posts and presentations this week!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions