[PATCH] D22970: Ensure Ident_GNU_final is properly initialized in the Parser Initialize function

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 29 12:22:31 PDT 2016


erichkeane created this revision.
erichkeane added reviewers: cfe-commits, andreybokhanko, aizatsky.
erichkeane set the repository for this revision to rL LLVM.
erichkeane added a project: clang-c.

My recent change to implement __final missed initializing the variable, which was caught by the Memory Sanitizer.  This patch properly initializes the value to nullptr to ensure proper memory reads.


Repository:
  rL LLVM

https://reviews.llvm.org/D22970

Files:
  lib/Parse/Parser.cpp

Index: lib/Parse/Parser.cpp
===================================================================
--- lib/Parse/Parser.cpp
+++ lib/Parse/Parser.cpp
@@ -473,6 +473,7 @@
   Ident_final = nullptr;
   Ident_sealed = nullptr;
   Ident_override = nullptr;
+  Ident_GNU_final = nullptr;
 
   Ident_super = &PP.getIdentifierTable().get("super");
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22970.66158.patch
Type: text/x-patch
Size: 338 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160729/e8ba8471/attachment.bin>


More information about the cfe-commits mailing list