From nobody Wed Aug 13 18:55:10 2025 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 4c2HcZ6RVtz64MpV for ; Wed, 13 Aug 2025 18:55:10 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c2HcZ5Xzsz3FHZ for ; Wed, 13 Aug 2025 18:55:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755111310; 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=vNi7uv2U91PxoQyYDYPlGi6zOCPBgro0KhkBM2WaTaY=; b=Z3kGRAcnfKSHR04LLTwR+k8SgxkjUadfwRjvWm3cU1Q6XdLn7IVPOFyxFoSGOjq/1Jfe4A NUfcc4IxCcZ3cyaMCaMGe71ycpirkxkoFX8IydQTokGpKiP0Oe3ZNz/MXok7hpIwEtsV9b C/HovmQZXLk4W56fDom6sxXNLydZX/YAr3tjtjnTGAx1Pi+BorGlt0G2kDfcXGQG8Lghho ab4HBlcKYsXoj97B0+VwuYWTdDYKs2jO91dUMwZx/+7eXLElRIKtzXRaGCoxfpCmB/NT85 vLwgl5yO9gYJLDsIIJR2ObMygeUNW2BXqDG/qV+JbXhSWZSCpiq2kWRSLkZjMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755111310; 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=vNi7uv2U91PxoQyYDYPlGi6zOCPBgro0KhkBM2WaTaY=; b=iVLSMNK8U6iqUYsOlNkTJD85EqYpiVhkyZqBBjaCLdsnr/ZBvfqlVw898F7zev0/IsOjak sLbyNQy1QtXS2zdDwAl7ZHZS6WnRlbgIJi1u/D9Cl+M0k+G4SOnmB3p0Berz9tlO0esCkZ C1cRfBrsQZWgCNyA7TYiiCHDan6iT9iq8B0xuIF+9oLG5uCcglWdax8G0SgBtL+w9oolK8 oHl/AvnanuxM/5rLzhEqCqA+V18YcDL7vA8HFfSlKNz5rigAJeJkJUwPDJ72QJuiI/lKsP kol7IijcC1YHhbTOIjMuww2BahRvVfsccvpgUizER9bS6oiYrLUFNRalUsu1EQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755111310; a=rsa-sha256; cv=none; b=qPGehPcmesZM/io1qDK9xypQn3jGLQNPSeEh1na2vRBVymC3Q7h1kU9I1aasARkB/reWPu Ch4v5nJTOj27+HE1UypPhI/4UMeogor7bAAjgVBBR820s+EDmuKUVfSlKhFOGGovcrbnVo 1KTBByWXxQ1zLEELsHRMXGES/lxYE1EIiFdvfoOw8YQ+TCVk+fdMcArQY27VomP7FYlVEK XO7MpDbi7j3RTO5FZ6gNWmbh1XN8VnoeL5LYePadf4vcYhFnj0nxh4LCYEjHpROIB8tHeD Q0Fd+x98yxvxvdUMp4D9nOYZqvNiXEd34Ewrap01LypnsMW/ZIuZUmu4a87MeA== 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 4c2HcZ4Ytzz48y for ; Wed, 13 Aug 2025 18:55:10 +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 57DItABS019088 for ; Wed, 13 Aug 2025 18:55:10 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 57DItA2d019087 for bugs@FreeBSD.org; Wed, 13 Aug 2025 18:55:10 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 288850] [libm] avoid left shift of signed integer entity in ilogbf(), fmodf(), and remquof(). Date: Wed, 13 Aug 2025 18:55:10 +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: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: kargl@FreeBSD.org 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 attachments.created Message-ID: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" 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 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D288850 Bug ID: 288850 Summary: [libm] avoid left shift of signed integer entity in ilogbf(), fmodf(), and remquof(). Product: Base System Version: Unspecified Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: kargl@FreeBSD.org Created attachment 262944 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D262944&action= =3Dedit avoid left shift of signed integer entities As a followup to git revision d180086e6eae2e15, the attached patch fixes the left shift of signed integer entities through the use of a helper function. Specific per file changes are: * lib/msun/src/e_fmodf.c: * lib/msun/src/s_remquof.c: . Eliminate now unused variable 'i'. . Sort declaration statement. . Use subnormal_ilogbf() to avoid left shift of signed integer. * lib/msun/src/math_private.h b/lib/msun/src/math_private.h: . Implement subnormal_ilogbf() to extract an exponent of a subnormal float. This avoids left shifts of signed integers. . Update nearby comment. * lib/msun/src/s_ilogbf.c . Fix declaration of the function statement in accordance with style(9). . Use subnormal_ilogbf() to avoid left shift of signed integer. --=20 You are receiving this mail because: You are the assignee for the bug.=