aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/Parallel.cpp
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2017-10-04 08:50:08 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2017-10-04 08:50:08 +0000
commit099960d3222ded960033943a7b7a26340b0d7440 (patch)
tree833f6d17efac4934c4b255a2953e3582fbc151fd /llvm/lib/Support/Parallel.cpp
parenta1a3f5c5e68793cb5bae5c798494e194cbe8ce58 (diff)
downloadllvm-099960d3222ded960033943a7b7a26340b0d7440.zip
llvm-099960d3222ded960033943a7b7a26340b0d7440.tar.gz
llvm-099960d3222ded960033943a7b7a26340b0d7440.tar.bz2
[MC] - Don't assert when non-english characters are used.
I found that llvm-mc does not like non-english characters even in comments, which it tries to tokenize. Problem happens because of functions like isdigit(), isalnum() which takes int argument and expects it is not negative. But at the same time MCParser uses char* to store input buffer poiner, char has signed value, so it is possible to pass negative value to one of functions from above and that triggers an assert. Testcase for demonstration is provided. To fix the issue helper functions were introduced in StringExtras.h Differential revision: https://reviews.llvm.org/D38461 llvm-svn: 314883
Diffstat (limited to 'llvm/lib/Support/Parallel.cpp')
0 files changed, 0 insertions, 0 deletions