From a91cb3b470541299a8676ed4284a4c4e2cf7e1e2 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 1d38ac7d5f7..0e6c80f8127 100644 --- a/capi-functions +++ b/capi-functions @@ -11,5 +11,7 @@ builtin_next; _pydict_global_version; strictmodule_is_unassigned; + /* CinderX's test runner uses this to redirect ASAN output */ + __sanitizer_set_report_fd; }; };