[PATCH 0/2] test: py: Fix unit test error with ASan
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Tue Nov 5 02:49:47 CET 2024
Hello,
This small patch series fixes a Python bindings unit test error when
using ASan. The issue seems to be caused by a bug in ASan, as reported
in https://github.com/google/sanitizers/issues/934, which is triggered
when dynamically loading a .so module in conjunction with a libasan
implementation linked with --as-needed. This causes a failure to
properly handle exceptions.
Patch 1/2 is a small improvement for the Python unit test meson.build
file, to prepare for patch 2/2 that then works around the issue by
LD_PRELOAD'ing the C++ standard library.
The series doesn't break CI
(https://gitlab.freedesktop.org/camera/libcamera/-/pipelines/1304028)
and fixes the issue on my machine with gcc 9 to 14, using libstdc++.
clang with libc++ is still broken, waiting for a volunteer to fix it :-)
Laurent Pinchart (2):
test: py: Replace environment array with environment object
test: py: LD_PRELOAD the C++ standard library when using ASan
meson.build | 3 +++
test/py/meson.build | 14 ++++++++++++--
2 files changed, 15 insertions(+), 2 deletions(-)
base-commit: f028b09b7becf4e7847112b2e8044e5e30e01c58
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list