From patchwork Tue Aug 3 21:19:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 490963 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:396:0:0:0:0 with SMTP id y22csp1021815jap; Tue, 3 Aug 2021 14:19:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyBqO2rZ1MTzf35h6qUzNU3elun57/k4+8aAVOcMebOnIBZoN4Zs1FE7UJ4tkjK3dqBfal X-Received: by 2002:a67:7f15:: with SMTP id a21mr11262417vsd.10.1628025585107; Tue, 03 Aug 2021 14:19:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628025585; cv=none; d=google.com; s=arc-20160816; b=1KhnhA5Qa8WWf4TJwyZiLklIMIcVOYCxVvY7HdZr/K1WyPMhh3t6jsMxqrh2z+wBPc tZyfzTv607JTwWimCHGKAqg0tDH4Sm2j8YJdWAHWyOaoDy22SaouuIrT+6mbftNT9ZrE gGWpju+Jk98ikq5gS/te2uJ5QT3H4HKBNgJNrzmJz4VdroCrD4hGAeQlO/nTRBMZEIEn sfFf3outYPTLiM396UcJPZu+Sqk4Q/a+ZwwKcmNGnrbafWOqJTCodfiIabc6JrH6pZxO W2egALfuEmkTIAw0ucOk1h1uz/hN0/kDrET67b0G/p6IXClUPZ+z0ydnbELpQmbgzCua zZyQ== 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:message-id:date:subject:to:from:dkim-signature; bh=aAMZcSuFBZhLZaX+UiDABnHJSJdTgWQItOdKopp79hc=; b=c0pSzqT9Lna4n5b0Jh9651CFP3Lpif4zR4TjoB1ERKb9LQ5V6Vfpp9d7uA962YQuLB M896J19Na999P8DUbUpvJzc0ge1s2YH0Xyr/0Mr/WFyW9yNTWykKJMP7aIj1BYoJ8tRj IZ6NE0BZzMddWs2SC5MgCoE0BqgpOQHZvC2GYJ0Hg2P0n9YbDPQytjSxsIMGCbF/EIIL e1cg2Mn4YFnuMZ6LnspCVPQAGLMKVeOZw28k3ffgIKgvhhqIxc1Ha332isjFhq0Sxqzv KZ5kO/8p3pkGpFz4DjxEUZ5yIRychUY8mWjulcvxSkAXHjKllvBrHR5VAWhCKrsTh3+z QWtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="r6y/QLUo"; 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 l6si85926vse.194.2021.08.03.14.19.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Aug 2021 14:19:45 -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="r6y/QLUo"; 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]:59268 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mB1pA-0006cK-HV for patch@linaro.org; Tue, 03 Aug 2021 17:19:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49022) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mB1oe-0006bx-P4 for qemu-devel@nongnu.org; Tue, 03 Aug 2021 17:19:12 -0400 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]:41735) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mB1od-0001ba-C9 for qemu-devel@nongnu.org; Tue, 03 Aug 2021 17:19:12 -0400 Received: by mail-pj1-x102a.google.com with SMTP id q17-20020a17090a2e11b02901757deaf2c8so706691pjd.0 for ; Tue, 03 Aug 2021 14:19:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=aAMZcSuFBZhLZaX+UiDABnHJSJdTgWQItOdKopp79hc=; b=r6y/QLUoCD7n50GB7LQPaKqy7bv7MqjA/nQsvQ9sYN9MnZwr2K3i1yYmsnSriJS9IM StCAbwRmI8E1Hor/t7eQQreNI6psTkLPjMehMlHCQO4yWwdjoOHhNJEG+sqPTo2BwF58 3JNcaIHrGFgYmoMI3KxGXwRSf4fkC+wcQLmpzX2Z/EOYiv3Ruc83RK83ZPZab/aJZD1D HGUCp//PXMLOOLfXRn2K2lO/JC2KWuRgJgIYT6NCX+Aq6oYLZjjGQdJxsZG9g/1MLFcG r+JhD5koUOJfKEa1BzffIHPFnop/EC8qb3OynSHFIyXcXdv6lC+zrqDKEM+lZoeZMvGL sMxw== 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:mime-version :content-transfer-encoding; bh=aAMZcSuFBZhLZaX+UiDABnHJSJdTgWQItOdKopp79hc=; b=RBmyGztPZsHw5OaoeCl49EWc/D46Kp27ReOseDYC79kTlBp+4ra8doaJVs+h7TFUlj S3Ak6YkLZ7fTW59G5fb4ofi+Yov9eZUCpHcCvLv9PN4SwTBq2cgqAkO6wVHNZF51sC6H OGqsZbyfLldTmms1ARynNtU9TGax4blAI2rS2skwhg8f1YKJAYjaBhVn4yQYwIVUPtZt WOT6ocN4ip9oVHV0iQiczWJCFJruEwa0p17rdl+t0u1adUfpmqpRn/ijk+P8iVaSUdyb wixZrb7fo382PC0Lnqs7kCYn7sTYjRY5P7LGMUqWJc8w1qUzMYefmNltUdlc3SEa+pgH Ydxg== X-Gm-Message-State: AOAM53028FIqlWd/9k6t0+3h1c03iMHesGOLDO8mgosirWSywzN0hsq+ i5S9bKSwiULPC8mK2wOzAM6uSHR91otXQQ== X-Received: by 2002:a63:1d41:: with SMTP id d1mr1104244pgm.199.1628025549759; Tue, 03 Aug 2021 14:19:09 -0700 (PDT) Received: from localhost.localdomain (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id u16sm14481pgh.53.2021.08.03.14.19.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Aug 2021 14:19:09 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-6.1?] util: Suppress -Wstringop-overflow in qemu_thread_start Date: Tue, 3 Aug 2021 11:19:07 -1000 Message-Id: <20210803211907.150525-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102a; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102a.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 --- The host is running Centos 7.9, so technically, this is out-of-support. But this is a gcc compile farm machine, so I'm stuck with it. The rest of qemu is still working fine with a locally refreshed compiler. r~ --- util/qemu-thread-posix.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) -- 2.25.1 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; }