[Lldb-commits] [lldb] r243104 - Initialize variable to prevent garbage values (RenderScriptRuntime)

Ewan Crawford ewan at codeplay.com
Fri Jul 24 03:01:11 PDT 2015


Author: ewancrawford
Date: Fri Jul 24 05:01:11 2015
New Revision: 243104

URL: http://llvm.org/viewvc/llvm-project?rev=243104&view=rev
Log:
Initialize variable to prevent garbage values (RenderScriptRuntime)

The kernels_found variable is not initialized, so if it is not assigned true on line 823, then it will be a garbage value in the branch condition on line 828. This patch initializes the variable to false. 

Patch by neilparikh.

Reviewers: domipheus
Differential Revision: http://reviews.llvm.org/D11323

Modified:
    lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp

Modified: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp?rev=243104&r1=243103&r2=243104&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp Fri Jul 24 05:01:11 2015
@@ -776,7 +776,7 @@ RenderScriptRuntime::AttemptBreakpointAt
         return;
     }
 
-    bool kernels_found;
+    bool kernels_found = false;
     ConstString kernel_name(name);
     for (const auto &module : m_rsmodules)
     {





More information about the lldb-commits mailing list