You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -204,3 +205,25 @@ for (int i = 0; i < 1000; i++)
204
205
for (auto& f : rank_futures)
205
206
std::cout << f.get() << "\n";
206
207
```
208
+
209
+
## Testing with AddressSanitizer
210
+
211
+
Build the tests with ASan enabled:
212
+
213
+
```bash
214
+
./configure.sh --tests --asan --build
215
+
```
216
+
217
+
This adds `-fsanitize=address -fno-omit-frame-pointer -g` to the compile and link flags.
218
+
219
+
### LSAN suppressions
220
+
221
+
CPython's embedded interpreter and extension modules (e.g. numpy) intentionally leak interned strings, type caches, and method tables at shutdown. These are not bugs in pyscheduler but will be reported by LeakSanitizer. A suppressions file (`lsan_supressions.txt`) in the project root filters them out.
222
+
223
+
The build system automatically symlinks this file into the test binary directory. To use it:
`PYTHONMALLOC=malloc` is required so that Python's allocations go through the system malloc, which ASan can track. Without it, CPython uses its own arena allocator and ASan cannot see individual allocations.
0 commit comments