https://bugs.kde.org/show_bug.cgi?id=454860
--- Comment #2 from Nikolaos Chatzikonstantinou <nchatz...@gmail.com> --- On Tue, Jun 7, 2022 at 5:07 PM Paul Floyd <bugzilla_nore...@kde.org> wrote: > We can't do anything in Valgrind for stuff that gets optimized away by the > compiler. The example is trivial and would need modifying to work with > optimization. > > On Linux amd64 I see, in the objdump -d disassembly output > > 0000000000401146 <g>: > 401146: c3 ret > > 0000000000401147 <f>: > 401147: c3 ret > > The calls to malloc that do not use the return value have been optimized away, > which affects the massif output. I'm surprised that -Og optimizes away the code in f() and g(). I had misread the gcc manual. Thanks for the help! -- You are receiving this mail because: You are watching all bug changes.