From patchwork Tue Nov 5 01:49:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 21809 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 1F9F0BDB1C for ; Tue, 5 Nov 2024 01:49:59 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 47CBA653E6; Tue, 5 Nov 2024 02:49:58 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="fp4rlvc4"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5487E605B5 for ; Tue, 5 Nov 2024 02:49:56 +0100 (CET) Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id D252F7FE; Tue, 5 Nov 2024 02:49:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1730771389; bh=htbHbneW+f028IEs8Zam5D3ZIvLBKkqNPIiy80U5cCA=; h=From:To:Cc:Subject:Date:From; b=fp4rlvc4HnxN83XPQClFwDoLeY1ZHy2RH1f0v46rFSLi4pARLkMr9T1rACCcS8+2/ ZE1DzoeJ1yRju29mb9aUTlsnGWHUHEK0V4ymbvBe0ue0lM3Fdjbee5wH3ZhrpEgxWW xEEwK+Hs6S4STInPTJeg58oFhnp/X7c80mDIB3qc= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Cc: Tomi Valkeinen Subject: [PATCH 0/2] test: py: Fix unit test error with ASan Date: Tue, 5 Nov 2024 03:49:47 +0200 Message-ID: <20241105014949.32244-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" 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