[PATCH] AsmParser: Require null terminator in the created memory buffer.
Duncan P. N. Exon Smith
dexonsmith at apple.com
Wed May 20 11:13:58 PDT 2015
> On 2015 May 20, at 09:59, Alex Lorenz <arphaman at gmail.com> wrote:
>
> Hi dexonsmith, rafael,
>
> This patch modifies the memory buffer creation in the AsmParser library so that is requires a terminating null character.
> This change is needed because LLLexer in AsmParser checks for EOF when it sees the null character,
Is this a bug? Should LLexer be fixed instead?
> but the memory buffer
> that's being created with the source assumes that the terminating null character isn't required.
>
> I was motivated to submit this patch as my initial MIR commit had the problem where the input to the AsmParser wasn't null
> terminated and it would have been better to catch it with an assertion early on.
>
> REPOSITORY
> rL LLVM
>
> http://reviews.llvm.org/D9883
>
> Files:
> lib/AsmParser/Parser.cpp
> unittests/AsmParser/AsmParserTest.cpp
> unittests/AsmParser/CMakeLists.txt
> unittests/AsmParser/Makefile
> unittests/CMakeLists.txt
> unittests/Makefile
>
> EMAIL PREFERENCES
> http://reviews.llvm.org/settings/panel/emailpreferences/
> <D9883.26156.patch>
More information about the llvm-commits
mailing list