Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020 
<== Date ==> <== Thread ==>

Subject: RE: FW: EPICS
From: Mark Rivers <rivers@cars.uchicago.edu>
To: "'Andrew Johnson'" <anj@aps.anl.gov>
Cc: EPICS core-talk <core-talk@aps.anl.gov>
Date: Wed, 6 Jul 2016 17:05:33 +0000
Hi Andrew,

Thanks for the reply.

I sent him a properly patched version of epicsExceptionTest.cpp (the patch from the Known Problems page).  That fixed the errors he was getting.

Mark


-----Original Message-----
From: Andrew Johnson [mailto:anj@aps.anl.gov] 
Sent: Wednesday, July 06, 2016 11:29 AM
To: Mark Rivers
Cc: EPICS core-talk
Subject: Re: FW: EPICS

Hi Mark,

On 07/05/2016 06:51 PM, Mark Rivers wrote:
> I am trying to help someone in the UK build EPICS base 3.14.12.5 on
> Visual Studio 2015.  He is using windows-x64 arch.

> So both version 19, but different minor version numbers.  I am not
> sure if he installed Community Edition or something else.

From the Microsoft VC++ Blog: "MSVC Version 19.00.23918 corresponds to
Visual Studio 2015 Update 2." so he just has a slightly newer compiler.

https://blogs.msdn.microsoft.com/vcblog/2016/04/26/stay-up-to-date-with-the-visual-c-tools-on-nuget/

> This is the output on his system:
> cl /nologo /EHsc /GR -c              /favor:blend   /nologo /D__STDC__=0 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE   /Ox /GL   /W3 /w44355        /MD  /TP   
> -I. -I..\\O.Common -I. -I.. -I..\\..\\..\\..\\include\\os\\WIN32 -I..\\..\\..\\..\\include         ..\\epicsExceptionTest.cpp
> epicsExceptionTest.cpp
> ..\epicsExceptionTest.cpp(68): error C2148: total size of array must not exceed 0x7fffffff bytes
> ..\epicsExceptionTest.cpp(79): error C2148: total size of array must not exceed 0x7fffffff bytes
> ../../../../configure/RULES_BUILD:218: recipe for target 'epicsExceptionTest.obj ' failed
> 
> So it appears that the command lines are identical, but his fails and
> mine works.  Any idea why?

Probably due to optimizer changes in the new version, see below...

> He tried applying the patch on the 3.14.12.5 Known Problems page, but
> that should only apply to win32-x86, not windows-x64, right? 

I don't see why that patch should be specific to the 32-bit target,
although I admit the wording on the Known Problems page does imply that
(I just changed it).

> Both patched and unpatched built OK for me.

From his error messages it looks like the MS optimizer is now checking
allocation sizes at compiler time. The point of that particular part of
the epicsExceptionTest.cpp program is to confirm that C++ operator new
throws a std::bad_alloc exception at runtime when it fails. In the early
days some pre-standard C++ compilers would return NULL instead, which
was not compatible with the EPICS code.

We could take a look at defeating the optimizer, but this particular
piece of code has caused several false-positive build problems recently
and already has several compiler-specific pre-processor switches in it.
I don't think the test is necessary any more, so will probably delete
that test program completely for future Base releases.

I suggest you show your user how to remove the program from the
libCom/test/Makefile build - there are 4 lines in a block that mention
epicsExceptionTest, they should all be deleted or commented out.

- Andrew

-- 
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon


References:
Re: FW: EPICS Andrew Johnson

Navigate by Date:
Prev: Re: FW: EPICS Andrew Johnson
Next: Build failed in Jenkins: epics-base-3.14-rtems #135 APS Jenkins
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020 
Navigate by Thread:
Prev: Re: FW: EPICS Andrew Johnson
Next: Build failed in Jenkins: epics-base-3.14-rtems #135 APS Jenkins
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020 
ANJ, 06 Jul 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·