|
|
# Function call traces
|
|
|
|
|
|
Traces can be easily generated using [uftrace](https://github.com/namhyung/uftrace) utility. This approach requires the `-finstrument-functions` flag for the compilation.
|
|
|
|
|
|
# Memory access errors
|
|
|
|
|
|
Valgrind with a debugger attached is very useful; start a process with valgrind, attach a gdb to the vgdb server, `continue`, as soon as valgrind detects an error it will stop the execution in the debugger.
|
|
|
|
|
|
# Clang address and leak sanitizer
|
|
|
Enable OGS_ADDRESS_SANITIZER option in cmake and recompile.
|
|
|
Run with optional flags to the sanitizers, _e.g._:
|
|
|
```sh
|
|
|
LSAN_OPTIONS=suppressions=leak_sanitizer.supp bin/ogs your.prj
|
|
|
```
|
|
|
where the `leak_sanitizer.supp` contains lines `leak:<wildcard>`. |
|
|
\ No newline at end of file |