Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021 
<== Date ==> <== Thread ==>

Subject: Re: Is breaking strict-aliasing rules something to worry about?
From: "Johnson, Andrew N." <anj@anl.gov>
To: Michael Davidsaver <mdavidsaver@gmail.com>
Cc: "core-talk@aps.anl.gov" <core-talk@aps.anl.gov>
Date: Thu, 4 Oct 2018 15:36:01 +0000
On 10/03/2018 05:47 PM, Michael Davidsaver wrote:
> On 10/3/18 1:55 PM, Johnson, Andrew N. wrote:
>> I have no reason to doubt your statement. I am just wary of this topic given the amount of code we have that casts pointers between dbCommon, void* and/or some specific record type.
> 
> I'm not suggesting that we ignore these potential problems.
> I just don't expect to discover major new problems of this
> sort arising with older compilers.

Admittedly Dirk may have been talking about older compilers; I was
thinking about newer ones when I wrote "the latest language rules".

> If I was going to spend time on compiler testing, it would be with newer
> gcc/clang (and libc for that matter).  We know from past experience that
> new issues will arise in this area.

At some point we might want to try and create tests to look for problems
that might be caused by compiler aliasing in the kinds of code
constructs and casts that we commonly use. I don't see these tests as a
high priority though.

> eg. it's been in the back of my mind to build Base with latest gcc 8.x on travis-ci.
> 
> https://launchpad.net/~ubuntu-toolchain-r/+archive/ubuntu/test
> 
> https://www.google.com/search?q=ubuntu-toolchain-r-test+travis-ci

I don't know what gcc version(s) you run, but Red Hat provides builds of
binutils and and gcc-7 for RHEL and I have run the Base-7 self-tests
against those with no failures — gcc 7.2.1 20170829 (Red Hat 7.2.1-1)
and binutils 2.28 to be specific (there's even an ld.gold there, but I
haven't tried it). They don't have a devtoolset-8 yet to my knowledge.

- Andrew

>> I may have been reading this blog post or some of the items it links to: https://blog.regehr.org/archives/1621
>>
>> - Andrew
>>
>> -- 
>> Sent from my iPad
>>
>> On Oct 3, 2018, at 1:49 PM, Michael Davidsaver <mdavidsaver@gmail.com <mailto:mdavidsaver@gmail.com>> wrote:
>>
>>> On 10/3/18 11:07 AM, Johnson, Andrew N. wrote:
>>>> Did I read recently that apparently even the use of a union (as shown by
>>>> Ben at the end of that thread) is no longer guaranteed to prevent
>>>> problems with the latest language rules? *That* would be somewhat
>>>> worrying if true...

-- 
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

Replies:
Re: Is breaking strict-aliasing rules something to worry about? Dirk Zimoch
References:
Is breaking strict-aliasing rules something to worry about? Dirk Zimoch
Re: Is breaking strict-aliasing rules something to worry about? Michael Davidsaver
Re: Is breaking strict-aliasing rules something to worry about? Johnson, Andrew N.
Re: Is breaking strict-aliasing rules something to worry about? Michael Davidsaver
Re: Is breaking strict-aliasing rules something to worry about? Johnson, Andrew N.
Re: Is breaking strict-aliasing rules something to worry about? Michael Davidsaver

Navigate by Date:
Prev: Re: Is breaking strict-aliasing rules something to worry about? Michael Davidsaver
Next: EPICS_IOC_LOG_PORT value Jeong Han Lee
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021 
Navigate by Thread:
Prev: Re: Is breaking strict-aliasing rules something to worry about? Michael Davidsaver
Next: Re: Is breaking strict-aliasing rules something to worry about? Dirk Zimoch
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021 
ANJ, 05 Oct 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·