From patchwork Wed Aug 18 19:18:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 498915 Delivered-To: patch@linaro.org Received: by 2002:a02:6f15:0:0:0:0:0 with SMTP id x21csp963757jab; Wed, 18 Aug 2021 12:20:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzC1Qr9KazUlAFJRbCpv9dKqOVhitDe0+JUbxt3+9B7DzTDhrGvXtTgYpQZ7AGncrqxD4Yn X-Received: by 2002:a1f:9185:: with SMTP id t127mr8684377vkd.7.1629314453919; Wed, 18 Aug 2021 12:20:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629314453; cv=none; d=google.com; s=arc-20160816; b=FC+G9v4tJNLdQjQFgkkaimo1oUulRcMDlvWBbzm2iqfMK0o7HwG6dxDJHu8mzCjyU8 01cPeD30+1Z08dsldI2GmRR/olsC8VR8PyZtzAi1GU4EdbFQL/6VBf5dQIZbMPU/ePVU RKpLVKL4o/48qoJuQaridGZdyBdvO3PFuIKlY1UdDJDU8WUwkB+5ckMY2vrPPjhe0CSF N0CxOszDWIsL9jXnWwk0f9hrQjY64PObeZJl5ZoGbWSyDaT34P17Za4KoZUHWlQUuevH TxPR99KF3AlGY8pt5tlVY8WGx/bW0Pe3MdyeI6pPIzSfA1PgQpcdaq40BJJynB10IMgM HVCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=Uc/e+W+UczDnwwQ5uBKLp0/+k09GUXeTG97dBWfRO/s=; b=mzwm8xlVMkgQQEN0d76C2omwSHPoYSmaANb4EnqXw5svoXI2ALKBf6X3FV12o/fLD7 uHRVqlo7TF8qohnuBnzIHfoSuNkQUXRb0jN/Rwfg8ebmQf6upEHiSqOTSLrMv1PEHQaN hqY+9AIOfPlIfV2MuGshb88/VIJ5Dst4B3jgnEmvZiYc3ZLXkqxhngpqUUMBWp3aA2W5 uzYFNIj5GW8Kgq8/JL2i0ppwzUuig9AQXZf2Ch+RGdUBeQm6WnQau7SkrRpJILHHtsWp OnbjEU+T8iqwwHozTbOxHfceXcI4wKMu13Tc7Ib1LXpxloDXov5kDME2efTQG/KGf7Pm cY2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h6RMJsGY; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f25si768741ual.219.2021.08.18.12.20.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 18 Aug 2021 12:20:53 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h6RMJsGY; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGR7N-0008Rz-6R for patch@linaro.org; Wed, 18 Aug 2021 15:20:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57612) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGR5z-0008RT-PN for qemu-devel@nongnu.org; Wed, 18 Aug 2021 15:19:27 -0400 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]:36375) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mGR5y-0008Hk-99 for qemu-devel@nongnu.org; Wed, 18 Aug 2021 15:19:27 -0400 Received: by mail-pg1-x531.google.com with SMTP id t1so3313067pgv.3 for ; Wed, 18 Aug 2021 12:19:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=Uc/e+W+UczDnwwQ5uBKLp0/+k09GUXeTG97dBWfRO/s=; b=h6RMJsGYqSQ+QvQz73qX8D+z5csRsYe+pMRdGjKGOcUoMn6X6O1PWqDQyIHQrl4rnb RiHr1aMC06IxB88A2kkWmyHcGiTMGPEmF2FvdOuwpTte4f2peuvzSf5eRK5URIfDnzwd 4NIPIBOdAYP8DSWphxM6uvQ/7llJqLV7/M6pulUTCJ+gNARo9T4h+7ORjxPN+J7CgoqE KEhQx1VIChrNfVueeiIvFF2MQ+mF/aeVF8DO7AoQMv/XS7a3QYbX8OXAHGKU6m4pby+S XU23favyO0ueGPhn6OonXRs4yvPozxgr906LQItTS2FCIH4nqRmY+1a/3XOq5b9lXYQW jGSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Uc/e+W+UczDnwwQ5uBKLp0/+k09GUXeTG97dBWfRO/s=; b=KtLTN8PFAjZNiir8eCXj58oCftu9HlUTYlxv0miwix+ooQvCnkZcyMLkIbQOF0AjHv 4Tcbgp++3qs8yIKGntCzSxPs+R5318ts3WyU3UjtS9k1hHygPV3BUleyzJgzwOflAwNW YjNXEDUYhx1neU4CbSvhGBMKJYjja6P2WAON6f2+kTHfHJ/HVPhNCQfy2LOChXvnuuKg vVnMWbr1/YaqoxeGi4wlS78dfsmnZYJk7avWeb5V0qPf6cCmQklBKyGEYE121NrXfJyG A4LWzQvIbe0zbm9rrKH2OhK6qpgwOAlhR/vHSuYxPL2rpI6zIMpaCM4PtqDT225gYXQ3 dRBQ== X-Gm-Message-State: AOAM5325gmJlTiKqxkpHfMnynDjJ3HslklRLxT9/oII3cCZuQVYF51I6 kF+N6ZG0Tz6nskJHA5Ug1fNUXrekl37nkw== X-Received: by 2002:a62:ed06:0:b029:32c:a800:ba47 with SMTP id u6-20020a62ed060000b029032ca800ba47mr10654364pfh.56.1629314364928; Wed, 18 Aug 2021 12:19:24 -0700 (PDT) Received: from localhost.localdomain ([173.197.107.15]) by smtp.gmail.com with ESMTPSA id a6sm524108pjs.40.2021.08.18.12.19.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Aug 2021 12:19:24 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 01/66] util: Suppress -Wstringop-overflow in qemu_thread_start Date: Wed, 18 Aug 2021 09:18:15 -1000 Message-Id: <20210818191920.390759-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210818191920.390759-1-richard.henderson@linaro.org> References: <20210818191920.390759-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::531; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x531.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This seems to be either a glibc or gcc bug, but the code appears to be fine with the warning suppressed. Signed-off-by: Richard Henderson --- util/qemu-thread-posix.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) -- 2.25.1 Reviewed-by: Peter Maydell diff --git a/util/qemu-thread-posix.c b/util/qemu-thread-posix.c index fd9d714038..6c5004220d 100644 --- a/util/qemu-thread-posix.c +++ b/util/qemu-thread-posix.c @@ -537,9 +537,28 @@ static void *qemu_thread_start(void *args) QEMU_TSAN_ANNOTATE_THREAD_NAME(qemu_thread_args->name); g_free(qemu_thread_args->name); g_free(qemu_thread_args); + + /* + * GCC 11 with glibc 2.17 on PowerPC reports + * + * qemu-thread-posix.c:540:5: error: ‘__sigsetjmp’ accessing 656 bytes + * in a region of size 528 [-Werror=stringop-overflow=] + * 540 | pthread_cleanup_push(qemu_thread_atexit_notify, NULL); + * | ^~~~~~~~~~~~~~~~~~~~ + * + * which is clearly nonsense. + */ +#pragma GCC diagnostic push +#ifndef __clang__ +#pragma GCC diagnostic ignored "-Wstringop-overflow" +#endif + pthread_cleanup_push(qemu_thread_atexit_notify, NULL); r = start_routine(arg); pthread_cleanup_pop(1); + +#pragma GCC diagnostic pop + return r; }