Experimental Physics and Industrial Control System
Subject: |
[Bug 1845854] [NEW] EPICS Math tests failing on Windows with MSVC |
From: |
Freddie Akeroyd via Core-talk <[email protected]> |
To: |
[email protected] |
Date: |
Sun, 29 Sep 2019 15:35:58 -0000 |
Public bug reported:
Some epics base tests involving NaN and Inf have been failing for most
windows MSVC builds, I have written a small test program
https://github.com/FreddieAkeroyd/Testing/blob/master/src/mytests/inftest.cpp
with output at https://ci.appveyor.com/project/FreddieAkeroyd/testing
which illustrates the underlying cause.
The general summary is that:
VS2010, VS2017 and VS2019 are OK in all configurations
For other Visual studio versions:
Debug builds are often OK
All release builds fail.
The failure mode is as follows (Inf shown here but applies to NaN too):
Inf – Inf is evaluated correctly
Inf + -Inf is evaluated incorrectly
Inf + (-Inf) is evaluated correctly on VS 11.0 and 12.0, but not 14.0
The test code is using expressions like “a + -a” with a = Inf, if it
instead tests “a + -b” with a = b = Inf then release mode works in all
cases. So it looks like the repeated variable name is causing an
undesired optimisation. I feel expressions of the form “a + -b” rather
than “a + -a” are a better reflection of what is likely in practice, if
that change is acceptable then I would be happy to submit a PR to use
different variable names within binary operation tests
Regards,
Freddie
** Affects: epics-base
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of EPICS
Core Developers, which is subscribed to EPICS Base.
Matching subscriptions: epics-core-list-subscription
https://bugs.launchpad.net/bugs/1845854
Title:
EPICS Math tests failing on Windows with MSVC
Status in EPICS Base:
New
Bug description:
Some epics base tests involving NaN and Inf have been failing for most
windows MSVC builds, I have written a small test program
https://github.com/FreddieAkeroyd/Testing/blob/master/src/mytests/inftest.cpp
with output at https://ci.appveyor.com/project/FreddieAkeroyd/testing
which illustrates the underlying cause.
The general summary is that:
VS2010, VS2017 and VS2019 are OK in all configurations
For other Visual studio versions:
Debug builds are often OK
All release builds fail.
The failure mode is as follows (Inf shown here but applies to NaN
too):
Inf – Inf is evaluated correctly
Inf + -Inf is evaluated incorrectly
Inf + (-Inf) is evaluated correctly on VS 11.0 and 12.0, but not 14.0
The test code is using expressions like “a + -a” with a = Inf, if it
instead tests “a + -b” with a = b = Inf then release mode works in all
cases. So it looks like the repeated variable name is causing an
undesired optimisation. I feel expressions of the form “a + -b” rather
than “a + -a” are a better reflection of what is likely in practice,
if that change is acceptable then I would be happy to submit a PR to
use different variable names within binary operation tests
Regards,
Freddie
To manage notifications about this bug go to:
https://bugs.launchpad.net/epics-base/+bug/1845854/+subscriptions
- Replies:
- [Bug 1845854] Re: EPICS Math tests failing on Windows with MSVC mdavidsaver via Core-talk
- [Bug 1845854] Re: EPICS Math tests failing on Windows with MSVC Freddie Akeroyd via Core-talk
- [Bug 1845854] Re: EPICS Math tests failing on Windows with MSVC Dirk Zimoch via Core-talk
- [Bug 1845854] Re: EPICS Math tests failing on Windows with MSVC mdavidsaver via Core-talk
- [Bug 1845854] Re: EPICS Math tests failing on Windows with MSVC mdavidsaver via Core-talk
- [Bug 1845854] Re: EPICS Math tests failing on Windows with MSVC Andrew Johnson via Core-talk
- Navigate by Date:
- Prev:
Build failed: epics-base base-7.0-319 AppVeyor via Core-talk
- Next:
[Bug 1845854] Re: EPICS Math tests failing on Windows with MSVC mdavidsaver via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
<2019>
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Build failed: epics-base base-7.0-319 AppVeyor via Core-talk
- Next:
[Bug 1845854] Re: EPICS Math tests failing on Windows with MSVC mdavidsaver via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
<2019>
2020
2021
2022
2023
2024