From owner-freebsd-ports-bugs@freebsd.org Thu Mar 26 15:24:29 2020 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8E4C92A2B67 for ; Thu, 26 Mar 2020 15:24:29 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 48p80r5hrjz4LJY for ; Thu, 26 Mar 2020 15:24:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 81C892A2B66; Thu, 26 Mar 2020 15:24:18 +0000 (UTC) Delivered-To: ports-bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7277E2A2B65 for ; Thu, 26 Mar 2020 15:24:18 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48p80d2Ghtz4LFq for ; Thu, 26 Mar 2020 15:24:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3B1FA840B for ; Thu, 26 Mar 2020 15:24:09 +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 02QFO9xU097612 for ; Thu, 26 Mar 2020 15:24:09 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 02QFO95k097609 for ports-bugs@FreeBSD.org; Thu, 26 Mar 2020 15:24:09 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: ports-bugs@FreeBSD.org Subject: [Bug 245075] www/varnish4: Fails to build with clang 10; "error: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808" Date: Thu, 26 Mar 2020 15:24:08 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: greenreaper@hotmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: feld@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name attachments.created 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 MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2020 15:24:29 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D245075 Bug ID: 245075 Summary: www/varnish4: Fails to build with clang 10; "error: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808" Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: feld@FreeBSD.org Reporter: greenreaper@hotmail.com Assignee: feld@FreeBSD.org Flags: maintainer-feedback?(feld@FreeBSD.org) Created attachment 212724 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D212724&action= =3Dedit Failing portion of compilation log After installing devel/llvm10 from a port, I tried to recompile our server's software with it, especially varnish as it recently fell over when we didn't (it relies on the version of llvm it is compiled with being there on startu= p, and we'd removed it). Unfortunately there is a new error (from a new warning) - basically LONG_MAX overflows the value that can be precisely represented within a double by ab= out 11 bits of precision. The master version has a comment regarding this: https://raw.githubusercontent.com/varnishcache/varnish-cache/master/lib/lib= vmod_std/vmod_std_conversions.c " * technically, as our VCL_INT is int64_t, its limits are INT64_MIN/INT64_M= AX. * * Yet, for conversions, we use VNUMpfx with a double intermediate, so above * 2^53 we see rounding errors. In order to catch a potential floor rounding * error, we make our limit 2^53-1 " This appears to have been applied in Commit 0f7f757c "sensible limits for VCL_INT and VCL_BYTES" https://code.uplex.de/varnishcache/varnish-cache/commit/0f7f757c478351e7a30= c9820f7542b868743b7b8 but it was later moved purely into vmod_std_conversions.c varnish 4.1 seems to use LONG_MAX/MIN rather than INT64_MAX/MIN and the only functions concerned are vmod_real2integer and vmod_time2integer because vmod_integer concerns an int, not a long, so it doesn't have that check. (T= his change was made in https://varnish-cache.org/lists/pipermail/varnish-commit/2012-October/00918= 0.html - "Change VCL::INT from C::int to C::long to gain more range on 64bit architectures.") I created a patch. Adding this to files/ adjusting the Makefile accordingly: EXTRA_PATCHES+=3D ${FILESDIR}/fix-long-to-double-rounding.patch causes compilation to succeed again with clang10. Don't know if you want to apply it, but varnish 4.1 is still supported, I'm using it, and in fact there's a new version, 4.1.11, released February 11: https://github.com/varnishcache/varnish-cache/blob/4.1/doc/changes.rst --=20 You are receiving this mail because: You are the assignee for the bug.=