From: Mark W. <ma...@kl...> - 2025-07-31 16:39:38
|
Hi Florian, On Thu, 2025-07-31 at 18:03 +0200, Florian Krohm wrote: > On 31.07.25 13:26, Mark Wielaard wrote: > > https://sourceware.org/cgit/valgrind/commit/?id=ab551753fad6a87acbb8a87a80ed5f5578bfd29c > > > > commit ab551753fad6a87acbb8a87a80ed5f5578bfd29c > > Author: Martin Cermak <mc...@re...> > > Date: Fri Jul 18 17:11:49 2025 +0200 > > > > Implement and override mallinfo2 > > > > Implement and override mallinfo2. Add a testcase covering mallinfo2. > > That testcase produces several compiler warnings on amd64-linux with glibc 2.35. Oops. That is what I get for not using -Werror... Sorry. Missed that. > E.g. > > mallinfo2.c:21:22: warning: format ‘%d’ expects argument of type ‘int’, but > argument 2 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=] > > The fix is to use %zu but I'm not sure whether mallinfo2 is defined the same way > on all supported platforms. Yes, that is the correct fix. mallinfo2 only exists (with all mallinfo fields being size_t) on platforms that have a bogus mallinfo function/struct (with fields being ints that can overflow...) Fix pushed as: commit 2ab7b57c9785de7809d3e34386c5fb4978756123 Author: Mark Wielaard <ma...@kl...> Date: Thu Jul 31 18:34:31 2025 +0200 memcheck/tests/mallinfo2.c use %zu to print mallinfo2 fields Thanks, Mark |