From owner-freebsd-toolchain@freebsd.org Wed Jul 25 19:41:24 2018 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B474D1052BC4 for ; Wed, 25 Jul 2018 19:41:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 5104F8B885 for ; Wed, 25 Jul 2018 19:41:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 11C7D1052BC1; Wed, 25 Jul 2018 19:41:24 +0000 (UTC) Delivered-To: toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E3F571052BC0 for ; Wed, 25 Jul 2018 19:41:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 845EC8B87F for ; Wed, 25 Jul 2018 19:41:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id DCAC526BA3 for ; Wed, 25 Jul 2018 19:41:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w6PJfMWO067027 for ; Wed, 25 Jul 2018 19:41:22 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w6PJfMrh067026 for toolchain@FreeBSD.org; Wed, 25 Jul 2018 19:41:22 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: toolchain@FreeBSD.org Subject: [Bug 229788] march=ivybridge breaks certain ports Date: Wed, 25 Jul 2018 19:41:21 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 11.2-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: dim@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: toolchain@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: 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-toolchain@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jul 2018 19:41:24 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D229788 --- Comment #6 from Dimitry Andric --- Created attachment 195456 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D195456&action= =3Dedit Avoid undefined behavior in cuTreeFix8Pack As noted in the upstream x265 bug report, it turns out cuTreeFix8Pack() has undefined behavior when it attempts to fit negative double values into uint16_t. There needs to be an intermediate cast to int16_t to avoid this,= and I verified that the input values are never outside the range [INT16_MIN..INT16_MAX]. In addition I added a part to the port Makefile which sets the port LLD_UNS= AFE on i386. (I have had this patch in my tree for a while, might as well get = it applied now...) Note that independently of this patch, or adding -mno-avx, for me TestBench still crashes with a segfault at the end, but that is apparently unrelated = to this particular bug: Using random seed 5B58D03E 8bit Testing primitives: SSE2 Testing primitives: SSE3 Testing primitives: SSSE3 Testing primitives: SSE4 Testing primitives: AVX Testing primitives: AVX2 Testing primitives: BMI2 Testing primitives: ARMv6 Testing primitives: NEON Testing primitives: FastNeonMRC Test performance improvement with full optimizations =3D=3D pixel primitives =3D=3D satd[ 4x4] 3.65x 147.78 538.83 avg_pp[ 4x4] 1.25x 244.77 305.50 [... much more of these stats ... ] pelFilterLumaStrong_Vertical 1.49x 723.31 1075.46 *** Signal 11 Stop. make: stopped in /share/dim/ports/multimedia/x265 --=20 You are receiving this mail because: You are the assignee for the bug.=