From patchwork Thu Jan 5 23:11:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Kacper_Michaj=C5=82ow?= X-Patchwork-Id: 2071 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.89.21 with SMTP id n21csp5581882vsb; Thu, 5 Jan 2017 15:17:52 -0800 (PST) X-Received: by 10.28.139.131 with SMTP id n125mr276453wmd.116.1483658272257; Thu, 05 Jan 2017 15:17:52 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id v9si87064862wjx.140.2017.01.05.15.17.51; Thu, 05 Jan 2017 15:17:52 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 902E568A0E8; Fri, 6 Jan 2017 01:17:43 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qk0-f174.google.com (mail-qk0-f174.google.com [209.85.220.174]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E8C07689F96 for ; Fri, 6 Jan 2017 01:17:36 +0200 (EET) Received: by mail-qk0-f174.google.com with SMTP id a20so59767240qkc.1 for ; Thu, 05 Jan 2017 15:17:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=xCMEwL3i0rwsGiw8JzFA9RRwI2kYvK8W1iDi27kbp6c=; b=cvUk3nmdDFsNaA4hGao9BUq/4vOTwZ2rTJkp6KtyVv0sMo5EF4FYFKiXBY+sTG2wsL K2tfX8hGXXD7WaQo3Gyk47IEW58BEeajx/plBMQx/oHp0swsfhZBVC0nVB2GA29Wdjcl xOfyU0uXDWBa43PFYwKkkERSOmZHS1IX0b5EhMRAvobCRjkooUljsd2GPRiUudSb2ecs 9GjWLx9NBARQO8yw9hWDSmdpttQ7RPv7FevplT0t0CXk06dgsiAIYgTfaNFQu9bXqcIR bRfmJ9IJWgB0zqBXxJjgP6cXApriD0BxO5srZMSjaNufjv+F9n7KR87WcjAdr+WCllNO l5yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=xCMEwL3i0rwsGiw8JzFA9RRwI2kYvK8W1iDi27kbp6c=; b=qgcK68WWdGKxAM56kFGZxZ1VmFggafwqNlwUc2bEu76JE1Ez+P8MVLx6Buq71ac0gJ WoseuZyXk+CPm8rqXzxztfPLX4B8OPgAdTgTWWgx2xTvUv17BLJySjEnz/79laPfsoJp Vs6+H3+gManpxkfOfbpcpskz0K9M1YjXgmNQt1bs1ZHFkqeFB/uzeDBNtBT1FDls4iHy x1PCCWN1ALr+4SYnQUUrUlFfxPQ9bXHzXBxUzo3ZvBgM0J7pDhTcScqGXrRZEw4He0h8 UjbocwYMVdqZUgZJ6ywP54t5grig36LI9+vvrRrUpvPtKtgm07RquCKUw8KW/vufHNpP YFQA== X-Gm-Message-State: AIkVDXIBbSK4b8H52f/oXaSYieTQdOgjjGx7p87G4J5iYEdSyQstyCztT0ccAo0Q3wwi06y2WEkX8wzfGoKIUQ== X-Received: by 10.55.71.74 with SMTP id u71mr80943813qka.251.1483657918690; Thu, 05 Jan 2017 15:11:58 -0800 (PST) MIME-Version: 1.0 Received: by 10.200.47.50 with HTTP; Thu, 5 Jan 2017 15:11:57 -0800 (PST) In-Reply-To: References: <20160628094044.GA760709@phare.normalesup.org> <1467107309-10196-1-git-send-email-h.leppkes@gmail.com> From: Kacper Michajlow Date: Fri, 6 Jan 2017 00:11:57 +0100 Message-ID: To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH] configure: disable the new optimizer in Visual Studio 2015 Update 3 X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" 2016-07-04 3:53 GMT+02:00 Kacper Michajlow : > 2016-07-03 23:39 GMT+02:00 Hendrik Leppkes : >> On Tue, Jun 28, 2016 at 12:01 PM, Hendrik Leppkes wrote: >>> On Tue, Jun 28, 2016 at 11:48 AM, Hendrik Leppkes wrote: >>>> Visual Studio 2015 Update 3 introduced a new SSA optimizer, however >>>> it unfortunately causes miscompilations. Until it is fixed, the new >>>> optimizations are disabled and should be re-checked on subsequent >>>> compiler releases. >>>> >>>> Fixes recent FATE failure of fate-lavf-pam on VS2015. >>> >>> On that note, i'm not exactly sure which code actually miscompiles. >>> I though its pamenc, but the generated files are identical, then I >>> though its the crc computing code (crcenc/adler32), but those seem >>> fine as well and would likely screw up in more then one case if they >>> would miscompile. >>> >>> So that leaves pnmdec, I suppose, but I didn't make much headway to >>> poke around in that. If anyone has any handy hints how to find the >>> code in question that might be helpful. >>> Maybe the code is actually not-quite-right and might enjoy some straigtening. >>> >> >> Applied the patch to disable the new optimizations in MSVC as I did >> not spot anything obviously "bad" in pamdec - which does not mean >> there isn't anything there, of course. >> > > This is pretty bad miscompilation in new SSA optimizer. It assumes > that variable declared in loop doesn't change the value even if there > is assignment. I minimized testcese and reported the bug > https://connect.microsoft.com/VisualStudio/feedback/details/2890170 > > - Kacper Sorry for bumping such old thread, but I just got information that the bug has been fixed in MSVC. It is fixed in hotfix for VS2015 - KB3207317 https://support.microsoft.com/en-us/kb/3207317 and of course in upcoming VS2017. I've confirmed that this hotfix fixes fate-lavf-pam test. The following change will enable SSA Optimizer on newer compiler versions. --- configure | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) for pfx in "" host_; do diff --git a/configure b/configure index 398e843..cf82b3b 100755 --- a/configure +++ b/configure @@ -6317,9 +6317,9 @@ EOF check_func strtoll || add_cflags -Dstrtoll=_strtoi64 check_func strtoull || add_cflags -Dstrtoull=_strtoui64 # the new SSA optimzer in VS2015 U3 is mis-optimizing some parts of the code - # this flag should be re-checked on newer compiler releases and put under a - # version check once its fixed - check_cflags -d2SSAOptimizer- + # Issue has been fixed in MSVC v19.00.24218. + check_cpp_condition windows.h "_MSC_FULL_VER >= 190024218" || + check_cflags -d2SSAOptimizer- fi