From patchwork Mon May 24 11:56:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 12386 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 2C340C3201 for ; Mon, 24 May 2021 11:56:49 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A126E6891C; Mon, 24 May 2021 13:56:48 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="VtOmXicN"; dkim-atps=neutral Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 57D9B601AA for ; Mon, 24 May 2021 13:56:47 +0200 (CEST) Received: by mail-pl1-x630.google.com with SMTP id 69so14515563plc.5 for ; Mon, 24 May 2021 04:56:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=T72vwAnuHCBpKDTmbkFLD9nCN4p9+YB8sUDerOH+Di8=; b=VtOmXicNDILo1bF9li+DsP6YGf7sH3xRsuYwKqKzMBDC5HYYWMostYBtFPojwS68Ti 3H91i4GaQfT+E7BR2Lj+lWbmFr4wMyb2Gp5rTqsRCiy+/3niFiaP2wVZq46mvHgOb4aW QtEBdChjwMxN/Y5eJDEg3g38GFoaDXIYefHAk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=T72vwAnuHCBpKDTmbkFLD9nCN4p9+YB8sUDerOH+Di8=; b=BQwIlkS6qDSaBvQ8SpyzTMNS6Qwj3PFxQ9tr/iJQ5Db4k2AV2kpFIOrGtdYvCsArKR nwhgD5OH45hFM2FeDoGtezHZjm+gxBAk42P/M4VVRSoJKcTGhTRWkHnrH8mx4fo9oOOq VhYrA0fU62Qw0xrC5iqnvcqaHJF/mmgRJhOjGCk3UdjfPzoaCrAytl9T11Dasgg/b+tQ RfwtrkfAIltXSeTQVhHSGnJxbW1KiftwgKPz9Zu19N3q18qcaK1e3G/pP0wuWjx4sSCQ 2S3OTJMXjWZ2ML+wPylyQdide6+4oVIoIAv72Wf0XmuEZawV3cBkCaSaa7c9BsLcDC+a CLbg== X-Gm-Message-State: AOAM532JSVh/tHJ2NhzaK89+S0QZp3UeSJYOPYklx+tCzqKRl8kiw4as r7c/UamReFcQe/E3J8KZ3j0Y1hVn2s2OUA== X-Google-Smtp-Source: ABdhPJy8NKxaM/jDWseTGdIFTziBfaQbh0nkNsYBaOQXNvhYQ6HcWZCI/I75t4Cega5KptCRdcGUxg== X-Received: by 2002:a17:90b:a18:: with SMTP id gg24mr24381394pjb.188.1621857405384; Mon, 24 May 2021 04:56:45 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:2:7208:465c:c4e:2dc3]) by smtp.gmail.com with ESMTPSA id t19sm11149980pfg.70.2021.05.24.04.56.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 May 2021 04:56:44 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Mon, 24 May 2021 20:56:38 +0900 Message-Id: <20210524115640.2334778-1-hiroh@chromium.org> X-Mailer: git-send-email 2.31.1.818.g46aad6cb9e-goog MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH RFC 0/2] Fix SIGSEGV in ChromeOS camera3 test 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" SIGSEV is caused in the termination of ChromeOS camera3 test. It is because CameraHalManager touches, through CameraManager, other static objects that have been destroyed. This series fixes the issue by destroying CameraHalManager in tear_down() on ChromeOS or leaking it on other platforms. Hirokazu Honda (2): android: Move ChromeOS specific Camera HAL calls to camera3_hal.cpp android: CameraHalManager: Create a static object dynamically src/android/camera3_hal.cpp | 41 +++++++++++++++++++++++++----- src/android/camera_hal_manager.cpp | 7 +++++ src/android/camera_hal_manager.h | 5 +++- src/android/cros/camera3_hal.cpp | 21 --------------- src/android/cros/meson.build | 17 ------------- src/android/meson.build | 3 +-- 6 files changed, 46 insertions(+), 48 deletions(-) delete mode 100644 src/android/cros/camera3_hal.cpp delete mode 100644 src/android/cros/meson.build --- 2.31.1.818.g46aad6cb9e-goog