[PATCH] D59929: Add a wrapper function around accessing the buffer in the ASM Lexer

Brandon Jones via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 28 06:08:29 PDT 2019


BrandonTJones created this revision.
BrandonTJones added reviewers: andreadb, grosbach.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

While using the address sanitizer with llvm-mc-assemble-fuzzer many heap-buffer overflows happen due to reading off the end of the buffer. This patch is an attempt to fix these instances.

There are no test cases added as the plan at the moment is to add the fuzzer to oss-fuzz once the number of bugs decreases. As well as the difficulty of writing test cases only caught by the address sanitizer.


Repository:
  rL LLVM

https://reviews.llvm.org/D59929

Files:
  llvm/include/llvm/MC/MCParser/AsmLexer.h
  llvm/lib/MC/MCParser/AsmLexer.cpp
  llvm/lib/MC/MCParser/AsmParser.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59929.192620.patch
Type: text/x-patch
Size: 15804 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190328/862be5fc/attachment.bin>


More information about the llvm-commits mailing list