forked from rogerbinns/apsw
-
Notifications
You must be signed in to change notification settings - Fork 1
Using a sanitizer
Roger Binns edited this page Aug 18, 2024
·
2 revisions
You can build a Python with compiler sanitzers which will also build this extension with sanitizers. Ideally you'll want to run this on a recent Linux distro in order to get recent compiler.
PYDEBUG_DIR needs to be set to a directory whose contents will be deleted first. It needs 1.5GB of space and is where Python source is downloaded, compiled, and the resulting executables placed. This sequence will do the necessary downloading, compilation, binary installation, and then reconfigures the virtual environment to use the new Python and updates build tools.
$ export PYDEBUG_DIR=/my/directory/of/choice
$ make pydebug PYDEBUG_DIR=$PYDEBUG_DIR
$ rm -rf .venv
$ $PYDEBUG_DIR/bin/python3 -m venv .venv
$ . .venv/bin/activate
$ make dev-depends
As per usual in https://github.com/utelle/apsw-sqlite3mc/wiki/Dev-environment you can do the extension compilation and running:
$ . .venv/bin/activate
$ python3 setup.py build_ext --inplace --force --enable-all-extensions
$ python3 -m apsw.tests