-
Notifications
You must be signed in to change notification settings - Fork 1
example
For us, the best thing about the scripts is that they let us reduce a massive amount of mostly useless valgrind warnings to the very few that we care about.
The reason that most of the warnings are useless is that we're running our code in a Java-based FIX engine, and the JVM itself generates an incredible number of errors of all types, including invalid memory accesses, branching on uninitialized data, and calling system functions with garbage parameters.
Since there's nothing we can do about these errors, we need to ignore them. But valgrind's suppression mechanism is not granular enough -- suppressing individual errors is not practical given the sheer number of them, and using wildcards risks suppressing errors that should not be.
So, we take a different approach: the scripts filter out any reports that don't have "our" code on the stack -- this eliminates all the problems that are specific to the JVM itself, leaving only reports that at least involve our code.
For this example, we're going to take a 21MB valgrind file and reduce it down to a single report.
cd examples
vlc.sh -f valgrind-leak.out
Copyright 2019 Itiviti AB. Licensed under the Apache License, version 2.0.