Skip to content

Commit

Permalink
valgrind: add basic memcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
johannst committed Aug 28, 2024
1 parent d103148 commit a77e632
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
- [perf](./trace_profile/perf.md)
- [OProfile](./trace_profile/oprofile.md)
- [callgrind](./trace_profile/callgrind.md)
- [valgrind](./trace_profile/valgrind.md)

- [Debug](./debug/README.md)
- [gdb](./debug/gdb.md)
Expand Down
1 change: 1 addition & 0 deletions src/trace_profile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
- [perf](./perf.md)
- [OProfile](./oprofile.md)
- [callgrind](./callgrind.md)
- [valgrind](./valgrind.md)
22 changes: 22 additions & 0 deletions src/trace_profile/valgrind.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# valgrind(1)

## Memcheck `--tool=memcheck`

Is the default tool when invoking `valgrind` without explicitly specifying
`--tool`.

Memory checker used to identify:
- memory leaks
- out of bound accesses
- uninitialized reads

```sh
valgrind [OPTIONS] PROGRAM [ARGS]
--log-file=FILE Write valgrind output to FILE.
--leak-check=full Enable full leak check.
--track-origins=yes Show origins of undefined values.
--keep-debuginfo=no|yes Keep symbols etc for unloaded code.

--gen-suppressions=yes Generate suppressions file from the run.
--suppressions=FILE Load suppressions file.
```

0 comments on commit a77e632

Please sign in to comment.