From a98c22620d6c0a8a319c097702eeaab7d94d6574 Mon Sep 17 00:00:00 2001 From: Matt Page Date: Mon, 26 Aug 2024 15:13:42 -0700 Subject: [PATCH] Fix Python test running under the JIT with ASAN Summary: The CinderX test runner redirects ASAN output to separate files by calling the `__sanitizer_set_report_fd` function using ctypes (https://fburl.com/code/rrbaqnt4). Under the hood, ctypes tries to resolve `__sanitizer_set_report_fd` using `dlsym`. Resolving `__sanitizer_set_report_fd` is currently failing (e.g. https://fburl.com/sandcastle/41sbdpx9) because the symbol is defined but not exported from libpython. This causes 100% of tests to fail because the worker crashes before it can even run the test. Export the symbol. Reviewed By: alexmalyshev Differential Revision: D61686959 fbshipit-source-id: 533e367e7e6491f168e0833f63b04ef811c83b5c --- capi-functions | 2 ++ 1 file changed, 2 insertions(+) diff --git a/capi-functions b/capi-functions index c8620f5c45e..e8eeacd4478 100644 --- a/capi-functions +++ b/capi-functions @@ -7,5 +7,7 @@ _Ci*; /* Export strobe symbols needed for pyperf */ __strobe_*; + /* CinderX's test runner uses this to redirect ASAN output */ + __sanitizer_set_report_fd; }; };