get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.2/patches/831193/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 831193,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/831193/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/1d468e04-9f25-65f4-04a1-51b35abb3582@suse.cz/",
    "project": {
        "id": 17,
        "url": "http://patchwork.ozlabs.org/api/1.2/projects/17/?format=api",
        "name": "GNU Compiler Collection",
        "link_name": "gcc",
        "list_id": "gcc-patches.gcc.gnu.org",
        "list_email": "gcc-patches@gcc.gnu.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<1d468e04-9f25-65f4-04a1-51b35abb3582@suse.cz>",
    "list_archive_url": null,
    "date": "2017-10-27T10:47:12",
    "name": "Zero vptr in dtor for -fsanitize=vptr.",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "6421fedb78578447d7a3a4f25ca64296ddf827a6",
    "submitter": {
        "id": 62010,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/62010/?format=api",
        "name": "Martin Liška",
        "email": "mliska@suse.cz"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/1d468e04-9f25-65f4-04a1-51b35abb3582@suse.cz/mbox/",
    "series": [
        {
            "id": 10553,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/10553/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=10553",
            "date": "2017-10-27T10:47:12",
            "name": "Zero vptr in dtor for -fsanitize=vptr.",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/10553/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/831193/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/831193/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<gcc-patches-return-465318-incoming=patchwork.ozlabs.org@gcc.gnu.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "mailing list gcc-patches@gcc.gnu.org"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=gcc-patches-return-465318-incoming=patchwork.ozlabs.org@gcc.gnu.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org\n\theader.b=\"f2pJRp4n\"; dkim-atps=neutral",
            "sourceware.org; auth=none"
        ],
        "Received": [
            "from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3yNgYm5s2lz9t2Z\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 27 Oct 2017 21:47:24 +1100 (AEDT)",
            "(qmail 81029 invoked by alias); 27 Oct 2017 10:47:17 -0000",
            "(qmail 80666 invoked by uid 89); 27 Oct 2017 10:47:16 -0000",
            "from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by\n\tsourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tFri, 27 Oct 2017 10:47:15 +0000",
            "from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254])\tby\n\tmx2.suse.de (Postfix) with ESMTP id B21C3ABED;\n\tFri, 27 Oct 2017 10:47:13 +0000 (UTC)"
        ],
        "DomainKey-Signature": "a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:from\n\t:subject:to:cc:message-id:date:mime-version:content-type; q=dns;\n\ts=default; b=q30Zy/ydYQE2Lhd0vKnyY484fBkqqyLkZAruMN8MNe8TLvmWlW\n\tyBD/cnhvCbIDhGPL27qU9oZfuQ7QVW/BuIm0/Q7AxLjvTUr6qMUb366l0OcDFp4t\n\t5KuC5a9oDQ+ftEkFrzedkOdA15Ibew1K49PIsCgsY1IEc40CVl7Na73fI=",
        "DKIM-Signature": "v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:from\n\t:subject:to:cc:message-id:date:mime-version:content-type; s=\n\tdefault; bh=5t98epD2XYitq792E5KsifasVL0=; b=f2pJRp4n5/C/TlNmtoWX\n\treJgC/1Xa1EkhmwIYN8ejBt6pIZNj3paHJHyYkN+5FejW6CMK4zI2eY/n+ZNQYvf\n\tIujZcpQLGeMuvEFA9GkKR9FNq6sGAITRj3C8g+Me3DmIu38gr+qp5XUdYG8de57P\n\tTGjqfcuvdCuH4tOGyPzeZz4=",
        "Mailing-List": "contact gcc-patches-help@gcc.gnu.org; run by ezmlm",
        "Precedence": "bulk",
        "List-Id": "<gcc-patches.gcc.gnu.org>",
        "List-Unsubscribe": "<mailto:gcc-patches-unsubscribe-incoming=patchwork.ozlabs.org@gcc.gnu.org>",
        "List-Archive": "<http://gcc.gnu.org/ml/gcc-patches/>",
        "List-Post": "<mailto:gcc-patches@gcc.gnu.org>",
        "List-Help": "<mailto:gcc-patches-help@gcc.gnu.org>",
        "Sender": "gcc-patches-owner@gcc.gnu.org",
        "X-Virus-Found": "No",
        "X-Spam-SWARE-Status": "No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0,\n\tGIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3,\n\tSPF_PASS autolearn=ham version=3.3.2 spammy=",
        "X-HELO": "mx2.suse.de",
        "From": "=?utf-8?q?Martin_Li=C5=A1ka?= <mliska@suse.cz>",
        "Subject": "[PATCH] Zero vptr in dtor for -fsanitize=vptr.",
        "To": "gcc-patches@gcc.gnu.org",
        "Cc": "Jason Merrill <jason@redhat.com>, Jakub Jelinek <jakub@redhat.com>",
        "Message-ID": "<1d468e04-9f25-65f4-04a1-51b35abb3582@suse.cz>",
        "Date": "Fri, 27 Oct 2017 12:47:12 +0200",
        "User-Agent": "Mozilla/5.0 (X11; Linux x86_64;\n\trv:52.0) Gecko/20100101 Thunderbird/52.4.0",
        "MIME-Version": "1.0",
        "Content-Type": "multipart/mixed;\n\tboundary=\"------------086B573F01AFAA0E8B0A679A\"",
        "X-IsSubscribed": "yes"
    },
    "content": "Hello.\n\nThis is small improvement that can catch a virtual call after a lifetime\nscope of an object.\n\n\nPatch can bootstrap on ppc64le-redhat-linux and survives regression tests.\n\nReady to be installed?\nMartin\n\ngcc/cp/ChangeLog:\n\n2017-10-27  Martin Liska  <mliska@suse.cz>\n\n\t* decl.c (begin_destructor_body): In case of disabled recovery,\n\twe can zero object in order to catch virtual calls after\n\tan object lifetime.\n\ngcc/testsuite/ChangeLog:\n\n2017-10-27  Martin Liska  <mliska@suse.cz>\n\n\t* g++.dg/ubsan/vptr-12.C: New test.\n---\n  gcc/cp/decl.c                        |  3 ++-\n  gcc/testsuite/g++.dg/ubsan/vptr-12.C | 26 ++++++++++++++++++++++++++\n  2 files changed, 28 insertions(+), 1 deletion(-)\n  create mode 100644 gcc/testsuite/g++.dg/ubsan/vptr-12.C",
    "diff": "diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c\nindex 15a8d283353..69636e30008 100644\n--- a/gcc/cp/decl.c\n+++ b/gcc/cp/decl.c\n@@ -15281,7 +15281,8 @@ begin_destructor_body (void)\n \t  /* Clobbering an empty base is harmful if it overlays real data.  */\n \t  && !is_empty_class (current_class_type))\n \t{\n-\t  if (sanitize_flags_p (SANITIZE_VPTR))\n+\t  if (sanitize_flags_p (SANITIZE_VPTR)\n+\t      && (flag_sanitize_recover & SANITIZE_VPTR) == 0)\n \t    {\n \t      tree fndecl = builtin_decl_explicit (BUILT_IN_MEMSET);\n \t      tree call = build_call_expr (fndecl, 3,\ndiff --git a/gcc/testsuite/g++.dg/ubsan/vptr-12.C b/gcc/testsuite/g++.dg/ubsan/vptr-12.C\nnew file mode 100644\nindex 00000000000..96c8473d757\n--- /dev/null\n+++ b/gcc/testsuite/g++.dg/ubsan/vptr-12.C\n@@ -0,0 +1,26 @@\n+// { dg-do run }\n+// { dg-shouldfail \"ubsan\" }\n+// { dg-options \"-fsanitize=vptr -fno-sanitize-recover=vptr\" }\n+\n+struct MyClass\n+{\n+  virtual ~MyClass () {}\n+  virtual void\n+  Doit ()\n+  {\n+  }\n+};\n+\n+int\n+main ()\n+{\n+  MyClass *c = new MyClass;\n+  c->~MyClass ();\n+  c->Doit ();\n+\n+  return 0;\n+}\n+\n+// { dg-output \"\\[^\\n\\r]*vptr-12.C:19:\\[0-9]*: runtime error: member call on address 0x\\[0-9a-fA-F]* which does not point to an object of type 'MyClass'(\\n|\\r\\n|\\r)\" }\n+// { dg-output \"0x\\[0-9a-fA-F]*: note: object has invalid vptr(\\n|\\r\\n|\\r)\" }\n+\n\n",
    "prefixes": []
}