aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorVolodymyr Sapsai <vsapsai@apple.com>2018-02-06 22:39:25 +0000
committerVolodymyr Sapsai <vsapsai@apple.com>2018-02-06 22:39:25 +0000
commit579f0b307c19efd778d221703ea7743234113535 (patch)
tree77c50ad6e7c6e5c1fe06431eefd0e33ef3231aa0 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent64626b344b332c90c0f3094d79ac098cb2492832 (diff)
downloadllvm-579f0b307c19efd778d221703ea7743234113535.zip
llvm-579f0b307c19efd778d221703ea7743234113535.tar.gz
llvm-579f0b307c19efd778d221703ea7743234113535.tar.bz2
[Lex] Fix handling numerical literals ending with ' and signed exponent.
For input `0'e+1` lexer tokenized as numeric constant only `0'e`. Later NumericLiteralParser skipped 0 and ' as digits and parsed `e+1` as valid exponent going past the end of the token. Because it didn't mark numeric literal as having an error, it continued parsing and tried to expandUCNs with StringRef of length -2. The fix is not to parse exponent when we reached the end of token. Discovered by OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4588 rdar://problem/36076719 Reviewers: rsmith, t.p.northover Reviewed By: rsmith Subscribers: cfe-commits, jkorous-apple Differential Revision: https://reviews.llvm.org/D41834 llvm-svn: 324419
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions