From patchwork Fri Oct 21 10:14:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 78624 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp1218059qge; Fri, 21 Oct 2016 03:15:36 -0700 (PDT) X-Received: by 10.99.245.69 with SMTP id e5mr174690pgk.92.1477044936163; Fri, 21 Oct 2016 03:15:36 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id zw5si1725885pac.252.2016.10.21.03.15.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Oct 2016 03:15:36 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-439208-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-439208-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-439208-patch=linaro.org@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=ppxjrKznmxOYQgCRa3JZOydR2Xe/s4qc6XPW5Ojri/3dDcNpb/ Il3KNHFd64lxlatBJ8eO+L6vfYIPXGc685+12I7HVrwLcJKtwiwQK6Khv8CGsiIj An8UUgEum9xkZWgqtuqG24wmQDWgkpZSHgZoCfmcH+GJgCKC/269VFyUc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=5tze3wCt+NFLT32tbOehVjw6Tls=; b=oDkg3Wvd9eTz1QfSOIwk fhSX0SYnQZWBUmyNSnF6OK+fqnRifJDWDIbnP+YA3WUK1g5tQIMjFgVYDtknr7Ya TM48dOY4IG+p6qaFxQ7v4sAFtKHCddCCvuUDd3VGyKp7w+oXud0Yc7V9Bj66GA2A baT//fE4qDGEX1cjCDxg1ug= Received: (qmail 31941 invoked by alias); 21 Oct 2016 10:15:17 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 31770 invoked by uid 89); 21 Oct 2016 10:15:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=personalities, Hx-languages-length:1111, risk X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 21 Oct 2016 10:14:53 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 09DB14DB14 for ; Fri, 21 Oct 2016 10:14:52 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-116-100.ams2.redhat.com [10.36.116.100]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u9LAEoZW019197 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 21 Oct 2016 06:14:51 -0400 To: GCC Patches From: Florian Weimer Subject: PR libgcc/78064: Add missing include directive to unwind-c.c Message-ID: <119fae40-b57b-5643-8ccb-e72bd9923183@redhat.com> Date: Fri, 21 Oct 2016 12:14:50 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 X-IsSubscribed: yes See https://gcc.gnu.org/ml/gcc/2016-10/msg00165.html for the background. This causes pthread_cond_wait in glibc to write out of bounds on i386. Fix was suggested by Jim Wilson. Tested on x86_64-redhat-linux-gnu, with no new regressions. Also tested against the i386 glibc reproducer, and verified that _Unwind_GetIPInfo is called from the __gcc_personality_v0. Okay for trunk? We probably should backport this to all active branches as well. The risk is fairly low because the C unwinder personality is rarely used (Eric Botcazou pointed out that the C++ and Ada personalities are not affected by this). 2016-10-21 Florian Weimer PR libgcc/78064 * unwind-c.c: Include auto-target.h. Index: libgcc/unwind-c.c =================================================================== --- libgcc/unwind-c.c (revision 241395) +++ libgcc/unwind-c.c (working copy) @@ -26,6 +26,7 @@ #include "tconfig.h" #include "tsystem.h" +#include "auto-target.h" #include "unwind.h" #define NO_SIZE_OF_ENCODED_VALUE #include "unwind-pe.h"