Skip to content

Commit

Permalink
Add ASAN info to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-jts committed Jun 14, 2024
1 parent eea66b8 commit 2aa9820
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
12 changes: 10 additions & 2 deletions web/content/project/development/tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,17 @@ Options:

### Performance Tests

There are performance tests which are built, but not run as part of the standard test suite.
These can be run from the command line:
There are performance tests which are not built or run as part of the standard test suite.
Building this is enabled by the `cmake -DBUILD_BENCHMARKS=ON` flag.
The various tests can be run from the command line, e.g.:

```
$ bin/perf_iterated_buffer
```

### Memory Usage testing

In some cases bugs are caused by improper memory access after deallocation (`heap-use-after-free`).
This may be able to be detected and reported by using the Address Sanitizer compiler capability.
Enable this via `cmake -DCMAKE_BUILD_TYPE=ASAN`.

3 changes: 2 additions & 1 deletion web/content/usage/download.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ They are specified on the `cmake` cmdline as `-DVAR=VALUE`.

| Option | Default | Note |
| :------------------: | :--------: | :---: |
| CMAKE_BUILD_TYPE | Release | Use `Debug` to build with debug flags and optimizations off. Use `Release` for packaging and production installs. Use `RelWithDebInfo` for optimized build with debug symbols. |
| CMAKE_BUILD_TYPE | Release | Use `Debug` to build with debug flags and optimizations off. Use `Release` for packaging and production installs. Use `RelWithDebInfo` for optimized build with debug symbols. Use `ASAN` to enable memory usage checking. |
| CMAKE_INSTALL_PREFIX | /usr/local | Set to install root. Libraries end up in `./lib` or `./lib64`, headers in `./include`, executables in `./bin` |
| BUILD_DOCUMENTATION | ON | Attempt to find `doxygen` executable and build API docs |
| BUILD_SHARED_LIBS | ON | Build dynamically linkable libraries |
Expand All @@ -69,6 +69,7 @@ They are specified on the `cmake` cmdline as `-DVAR=VALUE`.
| USE_CCACHE | OFF | Use [`ccache`](https://ccache.dev/) to compile C/C++ objects, making subsequent builds quicker |



## Testing

It is possible to run `ctest` directly. This gives access to ctest command line options (see `ctest --help` for a listing).
Expand Down

0 comments on commit 2aa9820

Please sign in to comment.