Valgrind 3.23.0-RC1

Valgrind 3.23.0-RC1. Please help test.

FreeBSD arm64 support. --track-fds=yes now warns against double close, generates (suppressible) errors and supports XML output. s390x supports more z16 instructions. More accurate x86_64-v3 instruction support. Wrappers for wcpncpy, memccpy, strlcat and strlcpy. Support Linux syscalls mlock2, fchmodat2, pidfd_getfd. And much more. 50+ bug fixes, 280+ commits by 14 developers since 3.22.0.

Fedora rawhide binary packages are available for aarch64, i686, ppc64le, s390x and s390x.

Software Freedom Conservancy Fundraiser

The Software Freedom Conservancy Fundraiser runs for another 4 days. We urge you to become a Sustainer, renew your existing membership or donate before January 15th to maximize your contribution to furthering the goals of software freedom!

They have been a great partner to Sourceware, helping with the GNU Toolchain Infrastructure, putting developers and community first.

Valgrind 3.22.0

We are pleased to announce a new release of Valgrind, version 3.22.0, available from

See the release notes for details of changes.

Our thanks to all those who contribute to Valgrind’s development. This release represents a great deal of time, energy and effort on the part of many people.

Happy and productive debugging and profiling,

— The Valgrind Developers

Sourceware 25 Roadmap

Sourceware has been running for almost 25 years, providing a worry-free, developer friendly home for Free Software core toolchain and developer tool communities. And we would like to keep providing that for the next 25 years.

That is why in the last couple of years we have started to diversify our hardware partners, setup new services using containers and isolated VMs, investigated secure supply chain issues, added redundant mirrors, created a non-profit home, collected funds, invested in open communication, open office hours and introduced community oversight by a Sourceware Project Leadership Committee with the help from the Software Freedom Conservancy.

Please participate and let us know what more we (and you!) can do to make Sourceware and all hosted projects a success for the next 25 years.

Full history and roadmap for the next 25 on Sourceware 25 Roadmap.

Checking usage of realloc with Valgrind

Full article: Checking usage of realloc with Valgrind

Summary: realloc has a surprising number of tricky corner cases to watch out for. Valgrind Memcheck will help you find various issues like using it with bad arguments, pointers that might have become invalid, and leaks of blocks that have been resized.

Also, don’t forget to use GCC with -fanalyzer, -Wuse-after-free, and -Wfree-nonheap-object to catch some of these issues early.

Finally, there is the almost philosophical question of what it means to have a zero-sized memory block. Since different implementations of (and standards describing) realloc answer that question differently, it is best to avoid ever calling realloc with size zero.

If you do then Valgrind 3.21.0 has two options to help:

  • --show-realloc-size-zero=no|yes. Warn for size zero realloc calls.
  • --realloc-zero-bytes-frees=yes|no. Whether size zero returns NULL or not.

Both options were implemented by Paul Floyd.

Sourceware joins the fediverse

A few weeks back Sourceware joined the Software Freedom Conservancy. This week Sourceware joins the fediverse at

The account will be used for Sourceware announcements, notices about downtime and temporary issues with our network.

Sourceware is run by volunteers who can be contacted on the public mailinglist [inbox].

Or you can file an issue in the Sourceware Infrastructure bugzilla component.

There is also an irc channel #overseers on Overseers Open Office hours take place in the same irc channel every second Friday of the month at UTC 18:00.

Sourceware joins Software Freedom Conservancy

Software Freedom Conservancy

After various discussions and lots of positive feedback Software Freedom Conservancy and Sourceware proudly announce that Sourceware today joins SFC as a member project!

For almost 25 years Sourceware has been the long-time home of various core toolchain project communities. Projects like Cygwin, a UNIX API for Win32 systems, the GNU Toolchain, including GCC, the GNU Compiler Colection, two C libraries, glibc and newlib, binary tools, binutils and elfutils, debuggers and profilers, GDB, systemtap and valgrind. Sourceware also hosts standard groups like gnu-gabi and the DWARF Debugging Standard. See the full list project hosted and services provided on the Sourceware projects page.

As the fiscal host of Sourceware, Software Freedom Conservancy will provide a home for fundraising, legal protection and governance that will benefit all projects under Sourceware’s care.  We share one mission: developing, distributing and advocating for Software Freedom.  Together we will offer a worry-free, friendly home for core toolchain and developer tool projects.

Valgrind 3.21.0

We are pleased to announce a new release of Valgrind, version 3.21.0, available from

Summary of new features

valgrind now provides gdb python commands. 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.

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 with --realloc-zero-bytes-frees=yes|no

Make the address space limit on FreeBSD amd64 128Gbytes

When doing a memcheck delta leak_search, it is now possible to only output the new loss records compared to the previous leak search.

Memcheck now performs checks for the use of realloc with a size of zero. --show-realloc-size-zero=yes|no

The helgrind option --history-backtrace-size= allows to configure the number of entries to record in the stack traces of “old” accesses.

Cachegrind--cache-sim=no is now the default.

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 is 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.

DHAT supports a new user request which allows you to override the 1024 byte limit on access count histograms for blocks of memory.

Full release notes at

Software Freedom Conservancy 2022 Fundraiser

Please donate to the Software Freedom Conservancy this year. Software Freedom Conservancy has been growing and is able to take on the work it does thanks to the incredible support of individuals who care about an organization who stands up for the equitable, ethical and end user focused technologies.

They have been a great partner to Sourceware, helping with the GNU Toolchain Infrastructure, putting developers and community first.

New services for sourceware, SFC & FSF

The FSF was nice enough to host a video chat on Sourceware infrastructure – A presentation and community Q&A. Which was basically the BoF we had wanted to give about Sourceware Infrastructure at the Cauldron. Extended with some discussion on recent developments, Sourceware as Conservancy member project and collaboration with the FSF tech-team. It was less interactive than the in person BoF would have been, but there was some nice feedback afterwards.

Slides New services for sourceware projects. Markdown source plus presenter notes.