From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from crocodile.elm.relay.mailchannels.net (crocodile.elm.relay.mailchannels.net [23.83.212.45]) by sourceware.org (Postfix) with ESMTPS id CCB3C3858C27 for ; Mon, 14 Mar 2022 08:23:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CCB3C3858C27 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gotplt.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id E3427881230; Mon, 14 Mar 2022 08:23:30 +0000 (UTC) Received: from pdx1-sub0-mail-a305.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id D3E7388187C; Mon, 14 Mar 2022 08:23:24 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1647246206; a=rsa-sha256; cv=none; b=Om3AFzhssHUMJInmu4UhsJLdNtTPeBigNw5CY1LGniad98HuxPubS0NRBBoE68EJ4JHWlp hxMwHDw49t1N0lYAnW2Z6GE7cN9KtJhN6ewaYLqL1+hWX/Dm8fSANahM5CpLrNAWU1RDtI r/tF6vTETR+zcUV5rOYXWv8+itORaGMsNMxRUGffLIz01MiZXnwQt7g9ItHX0mH8EfC0la Sv1o+9N0Bun3mPC09W1D4ce/IH0ux/FJLm0HNbP/MKIS3vosZY+vv64yyeFGLk/sXypEII WnCIleTBG/jpe+luFClc2hKPK4wEYEsHEygXhYZXZosUe0GjNr6HQNM5dvZ5sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1647246206; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=e+wth2g6k9TIdzH0fUQaabYKWW8a7NSh6C8DSMbVk3s=; b=qjRFJi+ki0m8wP9Cn8IxUi33vRKsRgf+x0nlyKzTvx3EKbv/43OWNCwf/ZVZEYbaEK3fgl IJNwdvQw56VxH8blEGZg/JFvtuXOy79uoLHn5U8VK0U/340l4A/x/QgpJ+lVV58CreF+1o RnfYXaDqSvl38BVGmqkQFxUw9OrFDF86E62U+aeSLLG8MmD+O4HvIfM6UbsHPGjOoFjPOk 2/2MdrTFjPDO/wirLuUldlbJuaY6PbNCOPPrZbY3IyN3ezGuudkWJrjAyehVBT1Jt9Dsrv HEVCamRnYWkJ1Nqsq6jS3vO3vB5T5DxEQRv3CX93VO8HvSnUs1DMiOBphzkP1A== ARC-Authentication-Results: i=1; rspamd-c9cb649d9-5qn54; auth=pass smtp.auth=dreamhost smtp.mailfrom=siddhesh@gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a305.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.102.3.5 (trex/6.5.3); Mon, 14 Mar 2022 08:23:30 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Interest-Plucky: 790e8bfd40afd203_1647246210524_3461791874 X-MC-Loop-Signature: 1647246210523:1199091250 X-MC-Ingress-Time: 1647246210523 Received: from [192.168.254.116] (unknown [106.220.192.183]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a305.dreamhost.com (Postfix) with ESMTPSA id 4KH8gW30nPz2d; Mon, 14 Mar 2022 01:23:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gotplt.org; s=dreamhost; t=1647246200; bh=e+wth2g6k9TIdzH0fUQaabYKWW8a7NSh6C8DSMbVk3s=; h=Date:Subject:To:From:Content-Type:Content-Transfer-Encoding; b=VFnUs9OE/05mD591ZaDsg1OgiwBrQK6pEnAqD1hDDAr6ybnxac4BdNOSHskrlD8OK Gsfhv1+SS1eng9AIntVDRh6DYIIwsZDmLqzNWr3yH+4K36kd9vj9HAT6Yj/xSPDu/O HlrYhfU6zStYQ8meA10E1TpahYlwzGPd6q2Ki8iyVMnoYLRuX950r3j1OD2Uoma/0L tr/LXUo1s16ZnaqXx29b/oIkDyx3Vb6/5qVDxHBQpwyO6xzxqW0f2kKK1PDvhYvVfa pxVrABPVsgPouXZPYe5huj8qSgpdWJd5Yh9YvtgmzskwfMpcsQ8y1JPGfdLPLzWjzR ely47qs1HodBw== Message-ID: Date: Mon, 14 Mar 2022 13:53:15 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH] debug: Improve fdelt_chk error message Content-Language: en-US To: =?UTF-8?Q?Cristian_Rodr=c3=adguez?= , libc-alpha@sourceware.org References: <20220313184024.10130-1-crrodriguez@opensuse.org> From: Siddhesh Poyarekar In-Reply-To: <20220313184024.10130-1-crrodriguez@opensuse.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3037.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Mar 2022 08:23:35 -0000 On 14/03/2022 00:10, Cristian Rodríguez via Libc-alpha wrote: > It is not a "buffer overflow detected" but an out of range > bit on fd_set > > Signed-off-by: Cristian Rodríguez Agreed. Reviewed-by: Siddhesh Poyarekar > --- > debug/fdelt_chk.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/debug/fdelt_chk.c b/debug/fdelt_chk.c > index c5f16462ad..30f5a4bec1 100644 > --- a/debug/fdelt_chk.c > +++ b/debug/fdelt_chk.c > @@ -15,6 +15,7 @@ > License along with the GNU C Library; if not, see > . */ > > +#include > #include > > > @@ -22,7 +23,7 @@ long int > __fdelt_chk (long int d) > { > if (d < 0 || d >= FD_SETSIZE) > - __chk_fail (); > + __fortify_fail ("bit out of range 0 - FD_SETSIZE on fd_set"); > > return d / __NFDBITS; > }