llvm-project/llvm/test/tools/llvm-strings
James Henderson 5b2e968264 Fix llvm-strings crash for negative char values
On Windows at least, llvm-strings was crashing if it encountered bytes
that mapped to negative chars, as it was passing these into
std::isgraph and std::isblank functions, resulting in undefined
behaviour. On debug builds using MSVC, these functions verfiy that the
value passed in is representable as an unsigned char. Since the char is
promoted to an int, a value greater than 127 would turn into a negative
integer value, and fail the check. Using the llvm::isPrint function is
sufficient to solve the issue.

Reviewed by: ruiu, mstorsjo

Differential Revision: https://reviews.llvm.org/D53509

llvm-svn: 345137
2018-10-24 13:16:16 +00:00
..
Inputs
all-sections.test
archive-filename.test
file-filename.test
length.test
negative-char.test Fix llvm-strings crash for negative char values 2018-10-24 13:16:16 +00:00
nested-archives.test
radix.test
stdin-filename.test
terminator-neg.test
terminator.test