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
CI: use free-threaded build for ASAN tests (numpy#28391)
While working on numpygh-28390 today, I realized that ASAN can detect issues in the free-threaded build that are impossible to hit on the GIL-enabled build. In that PR the test I added showed failures under ASAN using free-threaded Python if I ran it against a version of NumPy from last week that was susceptible to memory corruption by running the test. On the GIL-enabled build, the GIL prevents the memory corruption.
For that reason, I think we can get more bang for our buck using a free-threaded interpreter to run the ASAN tests. I think the free-threaded build will catch almost all issues that the GIL-enabled build would catch as well as any problems that address sanitizer can check that are caused by race conditions. The only things we'd miss are from code in the #else block of an #if Py_GIL_DISABLED macro, and we don't really have any nontrivial code like that.
I also thought about using a build matrix with both the GIL-enabled and free-threaded interpreters but given what I said above, I think just one ASAN build is fine.
0 commit comments