EPICS Controls 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  2018  2019  <20202021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Compiler warning question
From: Chris Johns via Core-talk <core-talk at aps.anl.gov>
To: Michael Davidsaver <mdavidsaver at gmail.com>, Ralph Lange <ralph.lange at gmx.de>
Cc: EPICS Core Talk <core-talk at aps.anl.gov>
Date: Thu, 17 Sep 2020 11:16:10 +1000
On 17/9/20 12:02 am, Michael Davidsaver via Core-talk wrote:
> On 9/16/20 5:22 AM, Ralph Lange via Core-talk wrote:
>> My 2cts...
>>
>> I would rather have a safe implementation for copying C strings (taking both the length of source and target as arguments and null-terminating the target) in libCom. Better than having each software module use a different implementation.
>> Using strncpy() also produces loads of issues on static code analysis systems, as it is declared "forbidden" on Windows.
> 
> Well, yes.  We could have our out bespoke "safe" string copying
> function.  This would certainly do away with at least some warnings as
> analysis tools would not assign it any special significance.

We are having to look at similar issues in RTEMS. I found this worth reading ...

https://developers.redhat.com/blog/2018/05/24/detecting-string-truncation-with-gcc-8/

Chris

Replies:
Re: Compiler warning question Mark Rivers via Core-talk
References:
Compiler warning question Mark Rivers via Core-talk
Re: Compiler warning question Torsten Bögershausen via Core-talk
Re: Compiler warning question Ralph Lange via Core-talk
Re: Compiler warning question Michael Davidsaver via Core-talk

Navigate by Date:
Prev: Build failed: EPICS Base 7 base-7.0-87 AppVeyor via Core-talk
Next: Re: Compiler warning question Mark Rivers via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Compiler warning question Michael Davidsaver via Core-talk
Next: Re: Compiler warning question Mark Rivers via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
ANJ, 16 Sep 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·