paulfloyd / freebsd_valgrind

Git repo used to Upstream the FreeBSD Port of Valgrind
GNU General Public License v2.0
15 stars 4 forks source link

Remove massif expecteds? #173

Closed paulfloyd closed 2 years ago

paulfloyd commented 2 years ago

I'm not sure what to do for this, so I'm just noting my analysis for now.

new-cpp and overloaded-new work with the regular expecteds when built with clang

There is a problem with the GCC build. On Linux, the vgtest file adds a load of --ignore-fn arguments to filter out memory allocated by libstc++ from the massif measurements. That seems to work with and without debuginfo.

On FreeBSD, firstly there is no debuginfo for pkg/port GCC+libstc++, unless you build from ports and change the build options. Which no-one is going to do. Secondly, Valgrind is not seeing any function names. This can be observed by forcing memcheck to show the 'leak' , for instance

 ./vg-in-place --run-cxx-freeres=no --leak-check=full --show-reachable=yes --gen-suppressions=all ./massif/tests/new-cpp

On linux I get something like

{
   <insert_a_suppression_name_here>
   Memcheck:Leak
   match-leak-kinds: reachable
   fun:malloc
   fun:pool
   fun:__static_initialization_and_destruction_0
   fun:_GLOBAL__sub_I_eh_alloc.cc
   obj:/home/pafloyd/tools/lib64/libstdc++.so.6.0.27
   obj:/home/pafloyd/tools/lib64/libstdc++.so.6.0.27
}
paulfloyd commented 2 years ago

Not going to fix this one.