Patch Detail
Show a patch.
GET /api/1.1/patches/1975/?format=api
{ "id": 1975, "url": "https://patchwork.libcamera.org/api/1.1/patches/1975/?format=api", "web_url": "https://patchwork.libcamera.org/patch/1975/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/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": "<20190916122238.10095-1-jacopo@jmondi.org>", "date": "2019-09-16T12:22:38", "name": "[libcamera-devel] test: buffer_import: Initialize media_ and video_", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "4c5b0ea07d9e4ad8f6901f92730907683f132714", "submitter": { "id": 3, "url": "https://patchwork.libcamera.org/api/1.1/people/3/?format=api", "name": "Jacopo Mondi", "email": "jacopo@jmondi.org" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/1975/mbox/", "series": [ { "id": 497, "url": "https://patchwork.libcamera.org/api/1.1/series/497/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=497", "date": "2019-09-16T12:22:38", "name": "[libcamera-devel] test: buffer_import: Initialize media_ and video_", "version": 1, "mbox": "https://patchwork.libcamera.org/series/497/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/1975/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/1975/checks/", "tags": {}, "headers": { "Return-Path": "<jacopo@jmondi.org>", "Received": [ "from relay10.mail.gandi.net (relay10.mail.gandi.net\n\t[217.70.178.230])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 225DE60BE6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 16 Sep 2019 14:21:10 +0200 (CEST)", "from uno.lan (bl10-204-24.dsl.telepac.pt [85.243.204.24])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay10.mail.gandi.net (Postfix) with ESMTPSA id 5EBFA240013;\n\tMon, 16 Sep 2019 12:21:09 +0000 (UTC)" ], "From": "Jacopo Mondi <jacopo@jmondi.org>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Mon, 16 Sep 2019 14:22:38 +0200", "Message-Id": "<20190916122238.10095-1-jacopo@jmondi.org>", "X-Mailer": "git-send-email 2.23.0", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH] test: buffer_import: Initialize media_\n\tand video_", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.23", "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": "Mon, 16 Sep 2019 12:21:10 -0000" }, "content": "When the vivid module used to test buffer importing is not loaded, the\ntest correctly bails out, but during the clean up procedure tries to\naccess media_ and video_ fields, which, if not correctly initialized to\nnullptr might retain random values and cause a segfault.\n\nFix this by initializing media_ and video_ to nullptr to make sure they\nget ignored when cleaup() is called before they get initialized.\n\nFixes: e1a5873701a9 (\"test: camera: Add buffer import and mapping test\")\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n test/camera/buffer_import.cpp | 5 +++++\n 1 file changed, 5 insertions(+)", "diff": "diff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp\nindex 9364e3d1bc44..31af8336dc8a 100644\n--- a/test/camera/buffer_import.cpp\n+++ b/test/camera/buffer_import.cpp\n@@ -28,6 +28,11 @@ static constexpr unsigned int CAMERA_BUFFER_COUNT = 4;\n class FrameSink\n {\n public:\n+\tFrameSink()\n+\t\t: media_(nullptr), video_(nullptr)\n+\t{\n+\t}\n+\n \tint init()\n \t{\n \t\tint ret;\n", "prefixes": [ "libcamera-devel" ] }