Opened 12 months ago

Closed 12 months ago

Last modified 9 months ago

#17990 closed enhancement (fixed)

valgrind-3.21.0

Reported by: Bruce Dubbs Owned by: Bruce Dubbs
Priority: normal Milestone: 12.0
Component: BOOK Version: git
Severity: normal Keywords:
Cc:

Description

New minor version.

Change History (4)

comment:1 by Bruce Dubbs, 12 months ago

Owner: changed from blfs-book to Bruce Dubbs
Status: newassigned

comment:2 by Bruce Dubbs, 12 months ago

Release 3.21.0 (28 Apr 2023)

This release supports X86/Linux, AMD64/Linux, ARM32/Linux, ARM64/Linux, PPC32/Linux, PPC64BE/Linux, PPC64LE/Linux, S390X/Linux, MIPS32/Linux, MIPS64/Linux, ARM/Android, ARM64/Android, MIPS32/Android, X86/Android, X86/Solaris, AMD64/Solaris, AMD64/MacOSX 10.12, X86/FreeBSD and AMD64/FreeBSD. There is also preliminary support for X86/macOS 10.13, AMD64/macOS 10.13 and nanoMIPS/Linux.

CORE CHANGES

  • When GDB is used to debug a program running under valgrind using the valgrind gdbserver, GDB will automatically load some python code provided in valgrind defining GDB front end commands corresponding to the valgrind monitor commands. These GDB front end commands accept the same format as the monitor commands directly sent to the Valgrind gdbserver. These GDB front end commands provide a better integration in the GDB command line interface, so as to use for example GDB auto-completion, command specific help, searching for a command or command help matching a regexp, ... For relevant monitor commands, GDB will evaluate arguments to make the use of monitor commands easier. For example, instead of having to print the address of a variable to pass it to a subsequent monitor command, the GDB front end command will evaluate the address argument.
  • The vgdb utility now supports extended-remote protocol when invoked with --multi. In this mode the GDB run command is supported. Which means you don't need to run gdb and valgrind from different terminals.
  • The behaviour of realloc with a size of zero can now be changed for tools that intercept malloc. Those tools are memcheck, helgrind, drd, massif and dhat. Realloc implementations generally do one of two things
    • free the memory like free() and return NULL (GNU libc and ptmalloc).
    • either free the memory and then allocate a minimum sized block or just return the original pointer. Return NULL if the allocation of the minimum sized block fails (jemalloc, musl, snmalloc, Solaris, macOS).
    When Valgrind is configured and built it will try to match the OS and libc behaviour. However if you are using a non-default library to replace malloc and family (e.g., musl on a glibc Linux or tcmalloc on FreeBSD) then you can use a command line option to change the behaviour of Valgrind:

--realloc-zero-bytes-frees=yes|no [yes on Linux glibc, no otherwise]

PLATFORM CHANGES

  • Make the address space limit on FreeBSD amd64 128Gbytes (the same as Linux and Solaris, it was 32Gbytes)

TOOL CHANGES

  • Memcheck:
    • When doing a delta leak_search, it is now possible to only output the new loss records compared to the previous leak search. This is available in the memcheck monitor command 'leak_search' by specifying the "new" keyword or in your program by using the client request VALGRIND_DO_NEW_LEAK_CHECK. Whenever a "delta" leak search is done (i.e. when specifying "new" or "increased" or "changed" in the monitor command), the new loss records have a "new" marker.
    • Valgrind now contains python code that defines GDB memcheck front end monitor commands. See CORE CHANGES.
    • Performs checks for the use of realloc with a size of zero. This is non-portable and a source of errors. If memcheck detects such a usage it will generate an error

realloc() with size 0

followed by the usual callstacks. A switch has been added to allow this to be turned off:

--show-realloc-size-zero=yes|no [yes]

  • Helgrind:
    • The option ---history-backtrace-size=<number> allows to configure the number of entries to record in the stack traces of "old" accesses. Previously, this number was hardcoded to 8.
    • Valgrind now contains python code that defines GDB helgrind front end monitor commands. See CORE CHANGES.
  • Cachegrind:
    • --cache-sim=no is now the default. The cache simulation is old and unlikely to match any real modern machine. This means only the Ir event are gathered by default, but that is by far the most useful event.
    • cg_annotate, cg_diff, and cg_merge have been rewritten in Python. As a result, they all have more flexible command line argument handling, e.g. supporting --show-percs and --no-show-percs forms as well as the existing --show-percs=yes and --show-percs=no.
    • cg_annotate has some functional changes.
      • It's much faster, e.g. 3-4x on common cases.
      • It now supports diffing (with --diff, --mod-filename, and --mod-funcname) and merging (by passing multiple data files).
      • It now provides more information at the file and function level. There are now "File:function" and "Function:file" sections. These are very useful for programs that use inlining a lot.
      • Support for user-annotated files and the -I/--include option has been removed, because it was of little use and blocked other improvements.
      • The --auto option is renamed --annotate, though the old --auto=yes/--auto=no forms are still supported.
    • cg_diff and cg_merge are now deprecated, because cg_annotate now does a better job of diffing and merging.
    • The Cachegrind output file format has changed very slightly, but in ways nobody is likely to notice.
  • Callgrind:
    • Valgrind now contains python code that defines GDB callgrind front end monitor commands. See CORE CHANGES.
  • Massif:
    • Valgrind now contains python code that defines GDB massif front end monitor commands. See CORE CHANGES.
  • DHAT:
    • A new kind of user request has been added which allows you to override the 1024 byte limit on access count histograms for blocks of memory. The client request is DHAT_HISTOGRAM_MEMORY.

comment:3 by Bruce Dubbs, 12 months ago

Resolution: fixed
Status: assignedclosed

Fixed at commits

0dd5e46f88 Update to btrfs-progs-v6.3.
7890f8f8e8 Update to gnupg-2.4.1.
dd1d764104 Update to valgrind-3.21.0.

comment:4 by Bruce Dubbs, 9 months ago

Milestone: 11.412.0

Milestone renamed

Note: See TracTickets for help on using tickets.