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: Weirdness with self-defined record type
From: Ralph Lange via Core-talk <core-talk at aps.anl.gov>
To: EPICS Core Talk <core-talk at aps.anl.gov>
Date: Fri, 10 Jul 2020 19:46:49 +0200
Found it. For the record:

I was using the epicsOldString typedef (deprecated, I know) as a convenient way to have a fixed size string type.
Inside a function with an argument defined as   epicsOldString *text   , I did the "make sure it is null terminated" write as
  *text[MAX_STRING_SIZE-1] = '\0';
instead of
  (*text)[MAX_STRING_SIZE-1] = '\0';

Just rarely, depending on heap memory layout, the '\0' hit specific places in areas of memory with record instances, the structures were corrupted in a way that segfaulted the IOC.

Note to myself: Array typedefs are EVIL.

Thanks for all the hints!
~Ralph


References:
Weirdness with self-defined record type Ralph Lange via Core-talk

Navigate by Date:
Prev: Jenkins build is back to stable : epics-7.0 » linux32 #240 APS Jenkins via Core-talk
Next: Build failed: epics-base base-7.0-579 AppVeyor 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: Weirdness with self-defined record type Konrad, Martin via Core-talk
Next: Build failed: epics-base base-7.0-579 AppVeyor 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, 11 Jul 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·