From nobody Mon Jun 26 19:09:38 2023 X-Original-To: freebsd-arm@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 4Qqcpq2Cxkz4kXj9 for ; Mon, 26 Jun 2023 19:09:39 +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 4Qqcpp6c97z4P3l for ; Mon, 26 Jun 2023 19:09:38 +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=1687806578; 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=W6YBE3WGZc63qnbSLnk+kN2QtD4EAmzbu9nInyQWUus=; b=eQNMYqGSuZ44jJb1OPMHiUTeK8JY50W4qPvFviRNoy4+uT4Uw4xQqehCyVz6XakEqC1ZPT DYF+OJaHsVAjzx3C6pnxqAXPRh5Ju/Sdt+6+CPPuoERNNMWCV/ufCtXsCnh/4Ckp6Gm1kO cadA+WIi4xKMFa8+afqJmYhtU0rvFq+QGh/GsUileh4BWAI5Uuaq70l6Y3s6jw4T6e4b5I 1OAPEJMb9TesLKw6jlHX3O+zIsXK2k+P/GIHCUbjxuctU9jp+CwWMKsGNHFNIHzX1AL13S JHHIyWMkOYSPgufNUHr202L2AuqKYdFoAREXM5ocrGOypNVBv5aRW2s50bC5NQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687806578; a=rsa-sha256; cv=none; b=AurqNqKu/w/ncH3FRPb+tW91RxjtRoIYa5vFtsbN42d/+696jU6U9rndgRzCC+PMJyqxNI ZVR/e1mBYk444UbxEe1yJeBulPy2JrN1NRB394D1Y4FBarM65Xw4F+k00eubGjIyTrFvSo c0I5hMWyJd/mVq3H2phSO2cgxu2N8Xazvj6iUDeJzYQfUUuF8PVXYv0igqD0c2TEXvuYtL yhdNZRoFhIOjOo1F0C2mGzyVPSfhxDPmIbTCCVvy2/HSeCjXz+WXci/ZiuZJr1UrojIzBD SwRzuCplfWxXvRY/YNd3EiaVI6XfKzDRB+TW59fqKKC2mpz1Bg21khoWALbQOQ== 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 4Qqcpp5jLczM2C for ; Mon, 26 Jun 2023 19:09:38 +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 35QJ9c2r067292 for ; Mon, 26 Jun 2023 19:09:38 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 35QJ9cx1067291 for freebsd-arm@FreeBSD.org; Mon, 26 Jun 2023 19:09:38 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: freebsd-arm@FreeBSD.org Subject: [Bug 272229] printf produces bogus output when printing double 0x00000000000000ff with %g Date: Mon, 26 Jun 2023 19:09:38 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: arm X-Bugzilla-Version: 13.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: fuz@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-arm@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 cc 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: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D272229 Bug ID: 272229 Summary: printf produces bogus output when printing double 0x00000000000000ff with %g Product: Base System Version: 13.1-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: arm Assignee: freebsd-arm@FreeBSD.org Reporter: fuz@FreeBSD.org CC: diizzy@FreeBSD.org Consider this test program: #include int main() { union intfloat { int i; double f; } intf; intf.i =3D 255; printf("%g\n", intf.f); } This should print (e.g. on aarch64): $ cc -o bug bug.c $ ./bug 1.25987e-32 But on armv7 we get instead: $ ./bug e-309 Furthermore, there is an embedded NUL byte in the output: $ ./bug | od -c=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 0000000 \0 e - 3 0 9 \n=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 0000007 Preliminary debugging suggests that this could be because dtoa() returns an empty string when vfprintf attempts the conversion. Further debugging is hindered as gdb cannot find debug symbols for dtoa (it seems to expect a so= urce file of different name than the actual file). Among other things, this error causes devel/orc to fail during build. --=20 You are receiving this mail because: You are the assignee for the bug.=