r233491 - [lex] Don't read past the end of the buffer

Benjamin Kramer benny.kra at gmail.com
Sun Mar 29 15:17:46 PDT 2015


On Mon, Mar 30, 2015 at 12:03 AM, Richard Smith <richard at metafoo.co.uk> wrote:
> On Sun, Mar 29, 2015 at 7:11 AM, Benjamin Kramer <benny.kra at googlemail.com>
> wrote:
>>
>> Author: d0k
>> Date: Sun Mar 29 09:11:37 2015
>> New Revision: 233491
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=233491&view=rev
>> Log:
>> [lex] Don't read past the end of the buffer
>>
>> While dereferencing ThisTokEnd is fine and we know that it's not in
>> [a-zA-Z0-9_.], ThisTokEnd[1] is really past the end.
>>
>> Found by asan and with a little help from clang-fuzz.
>
>
> This effectively reverts r191485, which was working around a miscompilation
> under MSVC. Perhaps we've stopped supporting the relevant versions of MSVC
> now?

That workaround was for MSVC 2010, which we dropped quite a while ago.
I'll watch the bots to see if anything regresses.

- Ben



More information about the cfe-commits mailing list