Patch Detail
Show a patch.
GET /api/patches/3830/?format=api
{ "id": 3830, "url": "https://patchwork.libcamera.org/api/patches/3830/?format=api", "web_url": "https://patchwork.libcamera.org/patch/3830/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20200520151019.744345-1-jacopo@jmondi.org>", "date": "2020-05-20T15:10:19", "name": "[libcamera-devel] libcamera: raspberry: Fix segfault in ~RPiCameraData()", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "4788ca6c78f8acf9d2846d4cfcc13b93c95ce9ae", "submitter": { "id": 3, "url": "https://patchwork.libcamera.org/api/people/3/?format=api", "name": "Jacopo Mondi", "email": "jacopo@jmondi.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/3830/mbox/", "series": [ { "id": 919, "url": "https://patchwork.libcamera.org/api/series/919/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=919", "date": "2020-05-20T15:10:19", "name": "[libcamera-devel] libcamera: raspberry: Fix segfault in ~RPiCameraData()", "version": 1, "mbox": "https://patchwork.libcamera.org/series/919/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/3830/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/3830/checks/", "tags": {}, "headers": { "Return-Path": "<jacopo@jmondi.org>", "Received": [ "from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net\n\t[217.70.183.201])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2D557603F3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 20 May 2020 17:07:04 +0200 (CEST)", "from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 96A1B1BF211;\n\tWed, 20 May 2020 15:07:03 +0000 (UTC)" ], "X-Originating-IP": "2.224.242.101", "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 20 May 2020 17:10:19 +0200", "Message-Id": "<20200520151019.744345-1-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.26.2", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH] libcamera: raspberry: Fix segfault in\n\t~RPiCameraData()", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<libcamera-devel.lists.libcamera.org>", "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>", "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>", "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>", "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>", "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>", "X-List-Received-Date": "Wed, 20 May 2020 15:07:04 -0000" }, "content": "The RPiCameraData class destructor tries to stop its ipa_ instance\nwithout making sure it has been initialized.\n\nIf the RPiCameraData gets destroyed before its ipa_ member is\ninitialized, in example if the sensor initialization fails during the\nmatch() function. A nullptr dereference segfault is triggered preventing\na graceful library teardown.\n\nFix this by checking for ipa_ to be initialized before stopping it.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 3 ++-\n src/libcamera/property_ids.yaml | 1 -\n 2 files changed, 2 insertions(+), 2 deletions(-)", "diff": "diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex 07ca9f5d7f53..e16a9c7f10d3 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -304,7 +304,8 @@ public:\n \t\t}\n \n \t\t/* Stop the IPA proxy thread. */\n-\t\tipa_->stop();\n+\t\tif (ipa_)\n+\t\t\tipa_->stop();\n \t}\n \n \tvoid frameStarted(uint32_t sequence);\ndiff --git a/src/libcamera/property_ids.yaml b/src/libcamera/property_ids.yaml\nindex 2ae178a73d52..da4d0bbf329c 100644\n--- a/src/libcamera/property_ids.yaml\n+++ b/src/libcamera/property_ids.yaml\n@@ -398,7 +398,6 @@ controls:\n The property can be used to calculate the physical size of the sensor's\n pixel array.\n \n-\n - PixelArrayFullSize:\n type: Size\n description: |\n", "prefixes": [ "libcamera-devel" ] }