From patchwork Thu Apr 27 02:32:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 1774322 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=Ya+6QDIz; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Q6KXm1HmZz23vH for ; Thu, 27 Apr 2023 12:33:10 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0DD153858C20 for ; Thu, 27 Apr 2023 02:33:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0DD153858C20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682562787; bh=QzGzu9/H82ernza9zEsr94jnkGtiy3NIgNvM2G89UkI=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=Ya+6QDIzrLwajWflK9zL7KWFFjzykjivPwAXVHc0An6Jr4BhYEB4oBxe5mkce4ALP IMtJXap+rsKm6HalV1H9iKirONX0+iMyU4KeXOT3vZq18+MwHX/n6uukTzgG6RNxN6 GOclVX4Q9Wcwu+nOWpFzBaCmTSicvPvdoP8IUNQI= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by sourceware.org (Postfix) with ESMTPS id A3CF43858D20 for ; Thu, 27 Apr 2023 02:32:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A3CF43858D20 Received: by mail-pj1-x1029.google.com with SMTP id 98e67ed59e1d1-24756a12ba0so5463791a91.1 for ; Wed, 26 Apr 2023 19:32:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682562765; x=1685154765; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QzGzu9/H82ernza9zEsr94jnkGtiy3NIgNvM2G89UkI=; b=Y5Gc6DFo9unEKMjw/U1+93xww0k4H5twkvlkLfcnwfmeakUU2gaeNyc281WGjjhsAN ENazZmGpHVMDCMlMikhemJyPo1IgzZ/ijt2T7I1XMsoP/zH6F5MWyaXatO7+XvnU6wp5 ABeRMGNQbiS4Xb62j6WMD4MKQFNKsqxlAV8hDTt/6m9p83NPIul4DkdvhAaKvtV4RLnb DdBCFc79hgwarCDwhVRAgwBVON72PNahOsNzKqiWJUwfXlHHNMxku3sBROARg1e4da3e E3DSU/bp8OO86QAsEuzYCL6inYFIJXdbTkClqCV4vkjEYldD4TyNRnQdPYVHccKBYk1B hAPg== X-Gm-Message-State: AC+VfDy/BIxvoOsmaH9GUfTPaRka3W8gyWjOmm+a1nK4N54QZNsOUVYV gs3Xuk0ecySOy/8ZWHSyy9RcsOZYjUM= X-Google-Smtp-Source: ACHHUZ6JoZ0YYMqorilo7MLjdwItxoAiAFX9ayoCggG2HzrpMLTyYslml2oKR4SsaAomSWq2OK6bwg== X-Received: by 2002:a17:90a:db15:b0:24b:f0c5:ed4f with SMTP id g21-20020a17090adb1500b0024bf0c5ed4fmr172991pjv.40.1682562765110; Wed, 26 Apr 2023 19:32:45 -0700 (PDT) Received: from gnu-cfl-3.localdomain ([172.59.161.224]) by smtp.gmail.com with ESMTPSA id g2-20020a17090adb0200b00246f9725ffcsm10234545pjv.33.2023.04.26.19.32.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Apr 2023 19:32:44 -0700 (PDT) Received: from gnu-cfl-3.. (localhost [IPv6:::1]) by gnu-cfl-3.localdomain (Postfix) with ESMTP id 8B4CF740122 for ; Wed, 26 Apr 2023 19:32:43 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [PATCH] libsanitizer: cherry-pick commit 05551c658269 from upstream Date: Wed, 26 Apr 2023 19:32:43 -0700 Message-Id: <20230427023243.1481560-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 X-Spam-Status: No, score=-3025.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: "H.J. Lu via Gcc-patches" From: "H.J. Lu" Reply-To: "H.J. Lu" Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" cherry-pick: 05551c658269 [sanitizer] Correct alignment of x32 __sanitizer_siginfo * sanitizer_common/sanitizer_platform_limits_posix.h (__sanitizer_siginfo_pad): Use u64 to align x32 __sanitizer_siginfo to 8 bytes. --- .../sanitizer_common/sanitizer_platform_limits_posix.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h index cfca7bdedbe..e6f298c26e1 100644 --- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h @@ -578,8 +578,13 @@ struct __sanitizer_sigset_t { #endif struct __sanitizer_siginfo_pad { +#if SANITIZER_X32 + // x32 siginfo_t is aligned to 8 bytes. + u64 pad[128 / sizeof(u64)]; +#else // Require uptr, because siginfo_t is always pointer-size aligned on Linux. uptr pad[128 / sizeof(uptr)]; +#endif }; #if SANITIZER_LINUX