Message ID | 20230728073107.1852989-1-poulhies@adacore.com |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp261325vqg; Fri, 28 Jul 2023 00:39:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlE6fQc/htpwziWjLEYb3XlBr8Nbno56E+rUqQZfI/mgvlUSd+a4I7ECxNxwyERn7t4RclU4 X-Received: by 2002:a17:907:b1b:b0:975:63f4:4b with SMTP id h27-20020a1709070b1b00b0097563f4004bmr1925918ejl.36.1690529950810; Fri, 28 Jul 2023 00:39:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690529950; cv=none; d=google.com; s=arc-20160816; b=ZtSYiGu1+hLnGW2QU++Rjmj7GVhNArDO0Mgl8exyuwFrH1Wskxy9D6O9Kg/w4A61JD Or/VUUpsH7OTlbsYerBGBGrueQTQ+8yRmJJOmz7fRyVdGOG9D2kTDiaNLagNkY6esRGs 29o7ccUzGG0cTefvfvCAYZYkqYUkhWaeTw2kHVG9kpCrkW7nj3Nw18rPGk9lXmstfb4O yhgsuElnJdzuCcRi3DmeTZDNBAipAFh5sBs0a+NM9FoCR/XgB2GK1RZsZtDX5u5T98dx /cJFBtSqswpSk/swUDOSrg796wGaiKJvhMy1k33CfwRog1KMPkGn/0PJIFxdAZqf3om1 HfNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=2fLHGdf/YNgVjKV3LObjASG2bkNyvQTsNJ2rGVKJ33A=; fh=bQ0t2ZBcvPn8YXy+nqeZrWrbecZj1kaOukDDyw0gXpQ=; b=tV5j7MMHOVohIWiDC53ey00P5JNe03rg8S2jOjFJaq4e8G+P3zuTicdgxDaP5AgmN0 I19h21BMVSRLgiDutfd27evxozXlHn9ffaLzEQ8rZSDM6aYHEdQqvfa+u0KLO+vJPCky 90oHtASXkZPNq1uDL+SP/+RglXzTC1TjJNNZhruiCGyEgIa57IjGEms1A2UcmG/1uJ1+ Uu3kmLH7zqDR3A4eZ/J3rW8UU71LFESlgLT6hkGcK5kOilcpVjgIHNjssAVCL68sFum2 VTg8Fh0Zux3pmXFNCjZr0QdCi9fUQf7hjbtOPwhHPJHcZUvb090mbWSh42zADK5Y4Tkw 7iSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=NGeiJpY8; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id p18-20020a1709061b5200b00983f3f76dd0si2445410ejg.155.2023.07.28.00.39.10 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 00:39:10 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=NGeiJpY8; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 33DCC385DC00 for <ouuuleilei@gmail.com>; Fri, 28 Jul 2023 07:33:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 33DCC385DC00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1690529624; bh=2fLHGdf/YNgVjKV3LObjASG2bkNyvQTsNJ2rGVKJ33A=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=NGeiJpY8c0OH2HFDWNMcVX+Th7MefNkfRrU0UYYbaD5ADoLHlwPlZixYLNrArvK1h Ekw93rz0zAp5cXCGU+8IGPhz9J9UU9N3+KAUVMnaN01m4tcoLY19rKGuKgVP1Ybhxc RW/1zV6O/NBt/kWd7EjkRaBT4YwPUw8WfVNugqFg= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by sourceware.org (Postfix) with ESMTPS id 55B83385C6DC for <gcc-patches@gcc.gnu.org>; Fri, 28 Jul 2023 07:31:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 55B83385C6DC Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-3fbc6ab5ff5so18473105e9.1 for <gcc-patches@gcc.gnu.org>; Fri, 28 Jul 2023 00:31:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690529470; x=1691134270; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2fLHGdf/YNgVjKV3LObjASG2bkNyvQTsNJ2rGVKJ33A=; b=gZHBJO71Dw17/ezjkXKOvgAc5wxgrPSsT9O+cmq87bnceVM5Ip8EeT/yosdPfRwKBs 7eGBAI5loZTA6WQChgYfc6aYAC+ZMoglWTiTEArER2ixvkOlAreTuEheDSnN94Vbd7EG f7efhZ2BzWZYZxwEw7vVKMv+yde8G7k/9pk8cmJfOhjLn3EV0BiyI/P7WCh6QTNIw+AJ QjQEIlHOIrhDO2H6wzTov9mYnGzNjCjyZloO2468gpSJImOv8sBRbnT2ba1WnFULcC0e cxQt+9zziD47OL1W6E4hXLUM7alZKwVRARoA5zAv+db5wl7fjeTtW78hyy0Q40CJ5jrL xyyQ== X-Gm-Message-State: ABy/qLZh8pg/XoBEgMwFq1cFLjw9LfB0MtMBJqzQvQl0wiVaJITRts7D ANkyK97CqAyZtxyGki6i4Bq5UZQEMG6Vr2K8Des2XA== X-Received: by 2002:a7b:c34d:0:b0:3fb:b3aa:1c8f with SMTP id l13-20020a7bc34d000000b003fbb3aa1c8fmr1125095wmj.28.1690529469773; Fri, 28 Jul 2023 00:31:09 -0700 (PDT) Received: from localhost.localdomain ([2001:861:3382:1a90:792d:7d2b:d7e:14a3]) by smtp.gmail.com with ESMTPSA id s23-20020a7bc397000000b003fba6a0c881sm6264335wmj.43.2023.07.28.00.31.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jul 2023 00:31:09 -0700 (PDT) To: gcc-patches@gcc.gnu.org Cc: =?utf-8?q?Cl=C3=A9ment_Chigot?= <chigot@adacore.com> Subject: [COMMITTED] ada: Add an assert in Posix Interrupt_Wait Date: Fri, 28 Jul 2023 09:31:07 +0200 Message-Id: <20230728073107.1852989-1-poulhies@adacore.com> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: =?utf-8?q?Marc_Poulhi=C3=A8s_via_Gcc-patches?= <gcc-patches@gcc.gnu.org> Reply-To: =?utf-8?q?Marc_Poulhi=C3=A8s?= <poulhies@adacore.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772649133962329607 X-GMAIL-MSGID: 1772649133962329607 |
Series |
[COMMITTED] ada: Add an assert in Posix Interrupt_Wait
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Marc Poulhiès
July 28, 2023, 7:31 a.m. UTC
From: Clément Chigot <chigot@adacore.com> All functions but Interrupt_Wait in s-inmaop__posix are checking the result of their syscalls with an assert. However, any return code of sigwait different than 0 means that something went wrong for it. From sigwait man: > RETURN VALUE > On success, sigwait() returns 0. On error, it returns a > positive error number (listed in ERRORS). gcc/ada/ * libgnarl/s-inmaop__posix.adb: Add assert after sigwait in Interrupt_Wait Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnarl/s-inmaop__posix.adb | 1 + 1 file changed, 1 insertion(+)
diff --git a/gcc/ada/libgnarl/s-inmaop__posix.adb b/gcc/ada/libgnarl/s-inmaop__posix.adb index 3171399f982..e4d07ee77eb 100644 --- a/gcc/ada/libgnarl/s-inmaop__posix.adb +++ b/gcc/ada/libgnarl/s-inmaop__posix.adb @@ -135,6 +135,7 @@ package body System.Interrupt_Management.Operations is begin Result := sigwait (Mask, Sig'Access); + pragma Assert (Result = 0); if Result /= 0 then return 0;