[PATCH] AsmParser: Require null terminator in the created memory buffer.

Alex L arphaman at gmail.com
Wed May 20 13:46:04 PDT 2015


2015-05-20 13:27 GMT-07:00 Matthias Braun <matze at braunis.de>:

> > Thanks for checking.  This LGTM if Matthias agrees.
>
>
> I still think LLLexer should be changed in the long term to use
> getNextChar() consistently and a range check included in it. While
> technically it can be indeed faster to check for a sentinel value like '\0'
> in this case the check was not included in the relevant switches but was a
> separate check in getNextChar() anyway, so I don't think it would have had
> any impact; Even if we would get rid of the check I'd be surprised if you
> could actually measure the difference.
>
> Anyway I can understand that we may not want to change it right now, so
> this patch LGTM.
>

Thanks, I committed the patch in r237833.


>
>
> REPOSITORY
>   rL LLVM
>
> http://reviews.llvm.org/D9883
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150520/f83b4526/attachment.html>


More information about the llvm-commits mailing list