LIT launches executables with absolute, and not relative, path.
strncmp would try to do exact comparison and fail.
Changing to strnstr makes test less fragile.
Details
Details
- Reviewers
kcc - Commits
- rGf020c98912d0: [libFuzzer] Un-reverting change in tests after fixing the failure on Linux.
rG03f95064770b: [libFuzzer tests] Use substring comparison in libFuzzer tests
rL309982: [libFuzzer] Un-reverting change in tests after fixing the failure on Linux.
rL309889: [libFuzzer tests] Use substring comparison in libFuzzer tests
Diff Detail
Diff Detail
Event Timeline
Comment Actions
@kcc my bad, strnstr is actually not available outside of FreeBSD-like systems.
Would it be OK to change to strstr?
Comment Actions
Data is not null-terminated, so you will need to copy it to a null-terminated buffer first.
Why not memmem?
Comment Actions
@kcc that seems to work in both environments, but makes me confused as to why it would act differently from strncmp, since we only enter the branch if length are equal. Yet when running under lit, one version times out, and another finishes in 0.8 seconds.
Comment Actions
@kcc so should I proceed with disabling tests on Windows? Feels terrible to say that "tests pass" when they don't.