<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, May 20, 2015 at 11:13 AM, Duncan P. N. Exon Smith <span dir="ltr"><<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> On 2015 May 20, at 09:59, Alex Lorenz <<a href="mailto:arphaman@gmail.com">arphaman@gmail.com</a>> wrote:<br>
><br>
> Hi dexonsmith, rafael,<br>
><br>
> This patch modifies the memory buffer creation in the AsmParser library so that is requires a terminating null character.<br>
> This change is needed because LLLexer in AsmParser checks for EOF when it sees the null character,<br>
<br>
</span>Is this a bug?  Should LLexer be fixed instead?<br></blockquote><div><br></div><div>Clang requires a null terminator. It lets you skip an awful lot of range checks, so enforcing null termination might be the better change. Typically all you have to do is mmap filesize + 1. </div></div></div></div>