This is an archive of the discontinued LLVM Phabricator instance.

Add a wrapper function around accessing the buffer in the ASM Lexer
Needs ReviewPublic

Authored by BrandonTJones on Mar 28 2019, 6:08 AM.

Details

Reviewers
andreadb
grosbach
Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

BrandonTJones created this revision.Mar 28 2019, 6:08 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 28 2019, 6:08 AM
Herald added a subscriber: hiraditya. · View Herald Transcript