From patchwork Mon Sep 13 11:57:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 1527339 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=F0qp3RZH; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H7QhR5ZH5z9sVw for ; Mon, 13 Sep 2021 22:26:47 +1000 (AEST) Received: from localhost ([::1]:52524 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mPl2r-0000CB-JF for incoming@patchwork.ozlabs.org; Mon, 13 Sep 2021 08:26:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43048) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mPkbE-0002x8-NS for qemu-devel@nongnu.org; Mon, 13 Sep 2021 07:58:13 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:37750) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mPkbD-000663-AV for qemu-devel@nongnu.org; Mon, 13 Sep 2021 07:58:12 -0400 Received: by mail-wm1-x334.google.com with SMTP id c8-20020a7bc008000000b002e6e462e95fso6748032wmb.2 for ; Mon, 13 Sep 2021 04:58:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BR3kp9x1U17N8tBq/3eXPV/aD82EtrsCdplx3rKkI4c=; b=F0qp3RZH/SBIQt6FAhI+Il7X+7rvRFAbOL/xZPlIuMadCXe/UACD/fvySCOoJ4/GWD hCmlIPHpzHViyEQ2k33Vi7PGVGMCtmIIZ6lAVFt1Nw+KvWet7npdf2x8bVgNGA/ZI3pt N48LQoz2Q8ykrP52/damXf6tMLW9CKo7fGZFz2LoZHKXzTyUd1EEhhBAHCgXzHZmijCW gK8mBZfRGP72xfMvib+ZoyIwAViIs35Pz7ty18HsM0lY2ilblT8PvGw9jKc9Jn1eh+za +Aa1qFBlXO56eFJGK6C0rF1OTFcKw8nHu8Cd/NGEImTpV2USjvgkQetx9TFOn7VSKt0B bkTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=BR3kp9x1U17N8tBq/3eXPV/aD82EtrsCdplx3rKkI4c=; b=MjLJCdNVlsXK4iMS5ViWbe0JS/0Ga/IIaz0dwXY6XkvycCxw68fBbUTSCg6CT5ZAkK y0WO7fLRKaXji+9sCgaBCxYV9Yqe7Q4Or0pGEwHxkPL+/xGFBLgbvZSgPjfcZKla8gro QZEbeo9aAtzkpkHzcgWYGoQbkD3hBm82q9Q9u+6SjLz9eM9Evn1hBYq9Hp5KpcET4Z3i +aiIsBpotiyVRLTDb4Ef1NDwfVORTJoZLg4dp5qsJyYW7cIZxKEWltTcTA6bDtyhAMYO rJ6XRh28EwxUWPIdPf0l7vjDudJpEe5Isq+MkD0hfsRVbQMSh8ZtTyTVD7DkBwZMKiKM IQ1Q== X-Gm-Message-State: AOAM531b8jpmWRcbzvxI/tewUd5Zoi16MlLUyq1N0pWadqmVXBtMgx8r 9zQ6JsdVduq+ALyaAri2fs0PkJfKcNg= X-Google-Smtp-Source: ABdhPJwK48x1fYbk4me5rWM8m2BeXsFledJDbrA8zLhStbVRdPJO5dz4eZHbKbe9KsR/BEc+7Jz9UQ== X-Received: by 2002:a1c:2547:: with SMTP id l68mr10641906wml.23.1631534289981; Mon, 13 Sep 2021 04:58:09 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id n186sm6011037wme.31.2021.09.13.04.58.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Sep 2021 04:58:09 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 18/21] util: Suppress -Wstringop-overflow in qemu_thread_start Date: Mon, 13 Sep 2021 13:57:39 +0200 Message-Id: <20210913115742.533197-19-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210913115742.533197-1-pbonzini@redhat.com> References: <20210913115742.533197-1-pbonzini@redhat.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=paolo.bonzini@gmail.com; helo=mail-wm1-x334.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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: , Cc: Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson 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 Message-Id: <20210803211907.150525-1-richard.henderson@linaro.org> Signed-off-by: Paolo Bonzini --- util/qemu-thread-posix.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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; }