Skip to content

Fuzzer not crashing with basic string comparison #1201

Description

@KanishAnand

Playing around with codelab example I noticed fuzzer is not able to find basic string comparison crashes with input domains.

I am trying below test:

void StringCmp(std::string s) {
    EXPECT_NE(s, "Hello");
}
FUZZ_TEST(ExpTests, StringCmp).
                  WithDomains(/*s:*/fuzztest::PrintableAsciiString());

Running this in fuzzing mode following quickstart-cmake doesn't crash whereas removing the domain constraint for PrintableAsciiString() followed from here, crashes instantly. Tried with AsciiString() domain as well and it is not crashing.
Already ran fuzzer for 5 hours (and still running...) and it's not reporting the bug whereas without domain it is able to find "Hello" string and crash instantly. Tried with 6a370ae, couldn't try main because of #1192

Seems like there might be some issue while using tokens received from string comparison instructions enabled via -fsanitize-coverage=trace-cmp when domains are enabled.

Activity

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