aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/DebugInfo/CodeView/DebugLinesSubsection.cpp
diff options
context:
space:
mode:
authorNirav Dave <niravd@google.com>2017-06-09 14:04:03 +0000
committerNirav Dave <niravd@google.com>2017-06-09 14:04:03 +0000
commit670109d89a24ca84250b02e83ac7ec86c5d50f56 (patch)
treef5182253d7579650be49014a606d0bce5f3e5601 /llvm/lib/DebugInfo/CodeView/DebugLinesSubsection.cpp
parent24f7101876203bb7906c161bb808ec39dcf95d76 (diff)
downloadllvm-670109d89a24ca84250b02e83ac7ec86c5d50f56.zip
llvm-670109d89a24ca84250b02e83ac7ec86c5d50f56.tar.gz
llvm-670109d89a24ca84250b02e83ac7ec86c5d50f56.tar.bz2
[MC] Fix compiler crash in AsmParser::Lex
When an empty comment is present in an assembly file, the compiler will crash because it checks the first character for '\n' or '\r'. The fix consists of also checking if the string is empty before accessing the *front* method of the StringRef. A test is included for the x86 target, but this issue is reproducible with other targets as well. Patch by Alexandru Guduleasa! Reviewers: niravd, grosbach, llvm-commits Reviewed By: niravd Differential Revision: https://reviews.llvm.org/D33993 llvm-svn: 305077
Diffstat (limited to 'llvm/lib/DebugInfo/CodeView/DebugLinesSubsection.cpp')
0 files changed, 0 insertions, 0 deletions