-
Notifications
You must be signed in to change notification settings - Fork 9
Description
There is an asan test environment in the tox setup, but it looks like it's set up to use a "regular" build of CPython instead of one that has ASAN instrumentation. If you build CPython itself with address sanitizer, there is no need to use LD_PRELOAD or set PYTHONMALLOC, as long as the extension is built using the same ASAN runtime as CPython was.
An easy way to set that up in CI is to use the cpython_sanity docker images @nascheme as been working on:
https://github.com/nascheme/cpython_sanity
Here's an example of how NumPy uses the TSAN docker image in CI:
The CI image includes the compilers used to build CPython so it's usually straightforward to build extensions using the same compiler setup.
I still need to update NumPy's ASAN job to use the docker image instead of building python from-source in the CI job, but it should look more-or-less the same as the TSAN job.