https://bugs.kde.org/show_bug.cgi?id=452058

--- Comment #5 from Paul Floyd <[email protected]> ---
I think that I just came across this with C++.

With this example complied with clang++ -g -O3

--gen-suppressions=all outputs

{
   <insert_a_suppression_name_here>
   Memcheck:Leak
   match-leak-kinds: reachable
   fun:_Znwm
   fun:allocate
   fun:allocate
   fun:__allocate_guarded<std::allocator<std::_List_node<int> > >
   fun:__allocate_guarded_obj<std::allocator<std::_List_node<int> > >
   fun:_M_create_node<int>
   fun:_M_insert<int>
   fun:push_back
   fun:main
}

In gdb with "set print demangle off" the backtrace for that is

#0  _Znwm (sz=24) at ../../../../libstdc++-v3/libsupc++/new_op.cc:43
#1  0x0000555555555201 in
_ZNSt15__new_allocatorISt10_List_nodeIiEE8allocateEmPKv (this=0x55555556b2b0,
__n=1) at
/usr/bin/../lib64/gcc/x86_64-suse-linux/15/../../../../include/c++/15/bits/new_allocator.h:151
#2  _ZNSt16allocator_traitsISaISt10_List_nodeIiEEE8allocateERS2_m (__a=...,
__n=1) at
/usr/bin/../lib64/gcc/x86_64-suse-linux/15/../../../../include/c++/15/bits/alloc_traits.h:614
#3  _ZSt18__allocate_guardedISaISt10_List_nodeIiEEESt15__allocated_ptrIT_ERS4_
(__a=...) at
/usr/bin/../lib64/gcc/x86_64-suse-linux/15/../../../../include/c++/15/bits/allocated_ptr.h:102
#4 
_ZSt22__allocate_guarded_objISaISt10_List_nodeIiEEESt15__allocated_objIT_ERS4_
(__a=...) at
/usr/bin/../lib64/gcc/x86_64-suse-linux/15/../../../../include/c++/15/bits/allocated_ptr.h:136
#5  _ZNSt7__cxx114listIiSaIiEE14_M_create_nodeIJiEEEPSt10_List_nodeIiEDpOT_
(this=0x55555556b2b0, __args=<optimized out>) at
/usr/bin/../lib64/gcc/x86_64-suse-linux/15/../../../../include/c++/15/bits/stl_list.h:1105
#6  _ZNSt7__cxx114listIiSaIiEE9_M_insertIJiEEEvSt14_List_iteratorIiEDpOT_
(this=0x55555556b2b0, __position=0, __args=<optimized out>) at
/usr/bin/../lib64/gcc/x86_64-suse-linux/15/../../../../include/c++/15/bits/stl_list.h:2472
#7  _ZNSt7__cxx114listIiSaIiEE9push_backEOi (this=0x55555556b2b0,
__x=<optimized out>) at
/usr/bin/../lib64/gcc/x86_64-suse-linux/15/../../../../include/c++/15/bits/stl_list.h:1809
#8  main (argc=<optimized out>, argv=<optimized out>) at false_positive.cpp:17

Without inline info all of that callstack collapses to main->new.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to