aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineScheduler.cpp
diff options
context:
space:
mode:
authorcgyurgyik <gyurgyikcp@gmail.com>2020-06-23 07:19:45 -0400
committercgyurgyik <gyurgyikcp@gmail.com>2020-06-23 07:24:03 -0400
commit4ffe2b24f5c7a856e607370e1e559e4c94803809 (patch)
tree089fd5e8061b5fb4005258047d0ab7713f001e4f /llvm/lib/CodeGen/MachineScheduler.cpp
parent5540765be603676a6e93745bce0ca9f3cce3e6a0 (diff)
downloadllvm-4ffe2b24f5c7a856e607370e1e559e4c94803809.zip
llvm-4ffe2b24f5c7a856e607370e1e559e4c94803809.tar.gz
llvm-4ffe2b24f5c7a856e607370e1e559e4c94803809.tar.bz2
[libc] Add fuzz test for strcmp.
Summary: Adds a fuzz test for string comparison. This takes in two strings with associated lengths. Verifies each string contains at least one character, and that the last character is the null terminator. Then, finds the first instance where one of the following does not hold: 1. i < min(size1, size2) 2. s1[i] == s2[i] 3. s1[i] != '\0' The result of strcmp is then compared to the value of the difference between s1[i] and s2[i]. For thoroughness, the operands are reversed and also checked. Reviewers: sivachandra, PaulkaToast Reviewed By: sivachandra, PaulkaToast Subscribers: mgorny, tschuett, ecnelises, libc-commits Tags: #libc-project Differential Revision: https://reviews.llvm.org/D82247
Diffstat (limited to 'llvm/lib/CodeGen/MachineScheduler.cpp')
0 files changed, 0 insertions, 0 deletions