| 4ffe2b24 | 23-Jun-2020 |
cgyurgyik <[email protected]> |
[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 t
[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
show more ...
|
| 90eb7be6 | 03-Apr-2020 |
Paula Toth <[email protected]> |
[libc] Fix memcpy to adhere to qualified calls.
Summary: Switched to using the new memcpy implementation.
Reviewers: sivachandra, abrachet, gchatelet
Reviewed By: abrachet, gchatelet
Subscribers:
[libc] Fix memcpy to adhere to qualified calls.
Summary: Switched to using the new memcpy implementation.
Reviewers: sivachandra, abrachet, gchatelet
Reviewed By: abrachet, gchatelet
Subscribers: mgorny, MaskRay, tschuett, libc-commits
Tags: #libc-project
Differential Revision: https://reviews.llvm.org/D77277
show more ...
|