r227433 - clang-format: FIXME that led to access of uninitialized memory.

Kostya Serebryany kcc at google.com
Thu Jan 29 09:15:08 PST 2015


Thank you!
This (and the other fix) indeed unblock me!

--kcc

On Thu, Jan 29, 2015 at 5:11 AM, Daniel Jasper <djasper at google.com> wrote:

> Author: djasper
> Date: Thu Jan 29 07:11:47 2015
> New Revision: 227433
>
> URL: http://llvm.org/viewvc/llvm-project?rev=227433&view=rev
> Log:
> clang-format: FIXME that led to access of uninitialized memory.
>
> I have so far not succeeded in finding a nicely reduced test case or an
> observable difference which could help me create a test failure without
> msan.
>
> Committing without test to unblock kcc's further fuzzing progress.
>
> Modified:
>     cfe/trunk/lib/Format/Format.cpp
>
> Modified: cfe/trunk/lib/Format/Format.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/Format.cpp?rev=227433&r1=227432&r2=227433&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/Format/Format.cpp (original)
> +++ cfe/trunk/lib/Format/Format.cpp Thu Jan 29 07:11:47 2015
> @@ -845,8 +845,8 @@ private:
>    FormatToken *getNextToken() {
>      if (GreaterStashed) {
>        // Create a synthesized second '>' token.
> -      // FIXME: Increment Column and set OriginalColumn.
>        Token Greater = FormatTok->Tok;
> +      unsigned OriginalColumn = FormatTok->OriginalColumn;
>        FormatTok = new (Allocator.Allocate()) FormatToken;
>        FormatTok->Tok = Greater;
>        SourceLocation GreaterLocation =
> @@ -855,6 +855,7 @@ private:
>            SourceRange(GreaterLocation, GreaterLocation);
>        FormatTok->TokenText = ">";
>        FormatTok->ColumnWidth = 1;
> +      FormatTok->OriginalColumn = OriginalColumn;
>        GreaterStashed = false;
>        return FormatTok;
>      }
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150129/17ccf4b6/attachment.html>


More information about the cfe-commits mailing list