Skip to content

Commit

Permalink
Document simple ASAN build (#44475)
Browse files Browse the repository at this point in the history
  • Loading branch information
timholy committed Mar 5, 2022
1 parent 2349f0a commit 111525d
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions doc/src/devdocs/sanitizers.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Sanitizer support

[Sanitizers](https://github.com/google/sanitizers) can be used in custom Julia builds to make it
easier to detect certain kinds of errors in Julia's internal C/C++ code.

## Address Sanitizer: easy build

From a source-checkout of Julia, you should be able to build a version
supporting address sanitization in Julia and LLVM as follows:

```sh
$ mkdir /tmp/julia
$ contrib/asan/build.sh /tmp/julia/
```

Here we've chosen `/tmp/julia` as a build directory, but you can
choose whatever you wish. Once built, run the workload you wish to
test with `/tmp/julia/julia`. Memory bugs will result in errors.

If you require customization or further detail, see the documentation below.

## General considerations

Using Clang's sanitizers obviously requires you to use Clang (`USECLANG=1`), but there's another
Expand Down

0 comments on commit 111525d

Please sign in to comment.