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.
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.
Comments Off on Checking usage of realloc with Valgrind
Or you can file an issue in the Sourceware Infrastructure bugzilla component.
There is also an irc channel #overseers on irc.libera.chat. Overseers Open Office hours take place in the same irc channel every second Friday of the month at UTC 18:00.
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.
Comments Off on Sourceware joins Software Freedom Conservancy
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.
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.
Comments Off on Software Freedom Conservancy 2022 Fundraiser
This is mostly a bug fix release to make sure valgrind works well against the latest gcc, glibc and linux kernel, but also contains a lot of work to make valgrind work better on FreeBSD. Plus a couple of new features:
The option “–vgdb-stop-at=event1,event2,…” accepts the new value abexit. This indicates to invoke gdbserver when your program exits abnormally (i.e. with a non zero exit code).
Fix Rust v0 name demangling.
The Linux rseq syscall is now implemented as (silently) returning ENOSYS.
Add FreeBSD syscall wrappers for __specialfd and __realpathat.
Remove FreeBSD dependencies on COMPAT10, which fixes compatibility with HardenedBSD
The option –enable-debuginfod= [default: yes] has been added on Linux.
More DWARF5 support as generated by clang14.
The most interesting bug fixed (IMHO) is #458915syscall sometimes returns its number instead of return code when vgdb is attached. It might not hit you, but if it did it was really confusing.
Cauldron was fun, heard so many interesting talks, met so many fun people, had great conversations.
I also had a BoF about all the great infrastructure work we have been adding to Sourceware over that last year and had wanted to discuss how the different project hosted on Sourceware wanted to use it to improve their processes: New services for sourceware projects. The sourceware.md file also has the presenter notes and discussion items I had prepared.
But when I said that at the end I also would like to discuss the recent Sourceware as Conservancy member project proposal and that I had asked both Conservancy and FSF members to call in to help with that discussion there was what felt like a shouting match. It was the first time I felt an in-person event was worse than an email discussion. Hopefully people will calm down and restart this discussion on the sourceware overseers list.
Comments Off on Sourceware Infrastructure / Conservancy / GNU Toolchain at Cauldron
Last month the Sourceware overseers started a discussion with the projects hosted on Sourceware and the Software Freedom Conservancy (SFC) to become a Conservancy member project (which means Conservancy would become the fiscal sponsor of Sourceware). After many positive responses the SFC’s Evaluations Committee has voted to accept Sourceware.