forked from OSchip/llvm-project
b07feef873
splits it into two by using the value of the first byte to determine the length of the first string. Reviewed-by: PaulkaToast, Differential Revision: https://reviews.llvm.org/D82427 Summary: [libc] Since only one input is given, it is necessary to split the string into two containers so that they can be compared for the purposes of this fuzz test. This is done in the following manner: 1. Take the value of the first byte; this is size1. (Credits to @PaulkaToast for this idea). 2. size2 is the value of size - size1. 3. Copy the characters to new containers, data1 and data2 with corresponding sizes. 4. Add a null terminator to the first container, and verify the second container has a null terminator. 5. Verify output of strcmp. A simpler alternative considered was simply splitting the input data into two, but this means the two strings are always within +- 1 character of each other. This above implementation avoids this. ninja check-libc was run; no issues. Reviewers: PaulkaToast, sivachandra Reviewed By: PaulkaToast Subscribers: mgorny, tschuett, ecnelises, libc-commits, PaulkaToast Tags: #libc-project Differential Revision: https://reviews.llvm.org/D82427 |
||
---|---|---|
.. | ||
AOR_v20.02 | ||
benchmarks | ||
cmake/modules | ||
config | ||
docs | ||
fuzzing | ||
include | ||
lib | ||
loader | ||
spec | ||
src | ||
test | ||
utils | ||
CMakeLists.txt | ||
LICENSE.txt | ||
README.txt |
README.txt
LLVM libc ========= This directory and its subdirectories contain source code for llvm-libc, a retargetable implementation of the C standard library. LLVM is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt.