From nobody Mon Jul 17 02:24:43 2023 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4R45Wc1qNGz4nswZ for ; Mon, 17 Jul 2023 02:24:44 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4R45Wc0600z4MqT for ; Mon, 17 Jul 2023 02:24:44 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689560684; 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; bh=zWqySMEmTtBSVCK6leU9rWEt4gSNGiWWaoBoj5O1oVo=; b=JJjQ5jkfePtTobvZnckLW1xInDMSaRsOVk07f4ZvkmQ3zvMrHAhT07KfvAVK/FS3FKOhIg e8cpJC/P/NTPYcPNRAZ1WUJ9xZdAmCrdkF3UkNgRGoDWIkfquJkFO5Qrb3zVHA3/Ef6Mw8 50LExsZt9oLLIEKBs+AZXBAlLj56QpjMpYKCWa6+KWlm/We+WT9/poMRBCw6vXnXwchUKK oQnERnoQPclQ35jEW3MawWXu+srLrFq3saEMrbhEs6NF0zxWJp3n+yYklbu1p9KWwAsFkJ uJKDM1BaVezlZYt8x6hiX26rDRY7qw3XlvCKXJTgSF8u+U0VDd1EE1IqGCrP8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689560684; a=rsa-sha256; cv=none; b=aIc7zs6WQlXh7LZ/a/RsSFFt+eQte9I68+a5yPHA2hcNg1iof+fjUuJzP6jDFzOf8hg4xW 5pt6HaTgac/KRRpn2LDuzxPH7k4mZhoUHa9eMNeR1gPm0HtnRAfHU4lwzStk6a1hseOYQy zgSyeecmjFMYZz7DD0ioRuAdy/gaMOW1BaBG74XyoTJaj6NIxuI+VHRrx3Lu9o5hyYSOF6 w4wmYqe1VAr4KR/KXtw2QfTkrhG9xek6INu1Z0YV57X1Wbv6J2UydYoZ4ZSOku9S6gZ2cs ouveetWw2XgKILGCsTqkfruUfpfX1/VfdslrCAAgM41wV636KCAvaZ7vNQQjmA== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4R45Wb5ygHz1608 for ; Mon, 17 Jul 2023 02:24:43 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 36H2OhJE041521 for ; Mon, 17 Jul 2023 02:24:43 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 36H2OhDI041520 for bugs@FreeBSD.org; Mon, 17 Jul 2023 02:24:43 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 272539] cospi, sinpi and tanpi incorrectly test for NaN and Infinity Date: Mon, 17 Jul 2023 02:24:43 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: Paul.Green@stratus.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D272539 Bug ID: 272539 Summary: cospi, sinpi and tanpi incorrectly test for NaN and Infinity Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: Paul.Green@stratus.com The current versions of lib/msun/src/s_cospi.c, s_sinpi.c and s_tanpi.c all exhibit the same defect. After checking for various numeric ranges, they ch= eck to see whether the input argument is a NaN or an Infinity. However, the code uses a value of 0x7f80000 instead of the correct value of 0x7ff00000. See l= ine 141 of s_cospi.c, line 158 of s_sinpi.c, and line 166 of s_tanpi.c.=20 I strongly recommend that s_cospi.c and s_sinpi.c have a comment added just before this line to say that the code is testing for infinity or nan. Such a comment already exists in s_tanpi.c. If you review s_cospif.c, s_sinpif.c, and s_tanpif.c, you will see that the equivalent statements in these functions are accurate and have appropriate source comments. Cross-ref: PR 218514, which added these functions and is still open for rea= sons that are unclear. I have run this issue past the author of these functions and he agrees with= my analysis.=20 The impact of these defects is to flag some valid input values as invalid a= nd raise a pole error (divide by zero). --=20 You are receiving this mail because: You are the assignee for the bug.=