<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2015-05-20 11:13 GMT-07:00 Duncan P. N. Exon Smith <span dir="ltr"><<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>></span>:<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>Yeah, It might be better to fix LLLexer instead. I will resubmit the patch with LLLexer changes then.</div><div><br></div><div>Alex.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
> but the memory buffer<br>
> that's being created with the source assumes that the terminating null character isn't required.<br>
><br>
> I was motivated to submit this patch as my initial MIR commit had the problem where the input to the AsmParser wasn't null<br>
> terminated and it would have been better to catch it with an assertion early on.<br>
><br>
> REPOSITORY<br>
>  rL LLVM<br>
><br>
> <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D9883&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=00CQ2fMtFz8sJQsUABjTeKW5yMe1oPwEf_faXLdShJk&s=k6e1qVb2DQ9yLZcqjVyx25eQpmX7KIdSsAQR7dQG8Zg&e=" target="_blank">http://reviews.llvm.org/D9883</a><br>
><br>
> Files:<br>
>  lib/AsmParser/Parser.cpp<br>
>  unittests/AsmParser/AsmParserTest.cpp<br>
>  unittests/AsmParser/CMakeLists.txt<br>
>  unittests/AsmParser/Makefile<br>
>  unittests/CMakeLists.txt<br>
>  unittests/Makefile<br>
><br>
> EMAIL PREFERENCES<br>
>  <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_settings_panel_emailpreferences_&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=00CQ2fMtFz8sJQsUABjTeKW5yMe1oPwEf_faXLdShJk&s=Jj4xLCgMo3EA_pEmB8Kpn6sg8MEtg1XHwhlhKxxvCNM&e=" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
</span>> <D9883.26156.patch><br>
<br>
</blockquote></div><br></div></div>