[Lldb-commits] Patch for Review: Uninitialized Variable m_leak

Malea, Daniel daniel.malea at intel.com
Tue Aug 6 15:07:33 PDT 2013


LGTM, although it would probably be better to use an initializer list for m_leak....and maybe the other members being initialized in that ctor.

Cheers,
Dan



On 2013-08-06, at 5:57 PM, "Michael Sartain" <mikesart at gmail.com> wrote:

> Found by valgrind. m_leak isn't set in IRMemoryMap::Allocation::Allocation().
> 
> Please let me know if this is ok to check in. Thanks.
>  -Mike
> 
> mikesart at mikesart-rad:~/data/src/llvm.hg/llvm/tools/lldb$ hg diff
> diff -r 9f2cf85d72b8 source/Expression/IRMemoryMap.cpp
> --- a/source/Expression/IRMemoryMap.cpp Tue Aug 06 10:32:33 2013 -0700
> +++ b/source/Expression/IRMemoryMap.cpp Tue Aug 06 14:55:39 2013 -0700
> @@ -213,6 +213,7 @@
>      m_permissions = permissions;
>      m_alignment = alignment;
>      m_policy = policy;
> +    m_leak = false;
>      
>      switch (policy)
>      {
> 
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits




More information about the lldb-commits mailing list