EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: synApps usage on 64 bit systems
From: Henrique Dante de Almeida <[email protected]>
To: "[email protected]" <[email protected]>
Date: Tue, 22 Jul 2014 17:07:41 +0000
Hello, while using synApps with a test scaler IOC in a 64 bit linux machine I noticed some problems while reading and writing PV values. The problem was tracked down by another developer, some time ago, to be in synApps/support/std-*/src/scalerRecord.c, where the scalerRecord elements pr1, pr2, etc. are accessed using an unsigned long pointer (a type coercion to handle them as if they were a simple array). For example, in process():


static long process(pscal)
scalerRecord *pscal;
{
(...)
        unsigned long *ppreset = (unsigned long *)&(pscal->pr1);
(...)

Since pr1 and all other pr* are type epicsUInt32, using ppreset to access
the preset values is not supposed to work. Can anyone confirm this ?

The proposed patch was to replace the cast to unsigned long * to epicsUInt32 *,
or similar. Changing only process() and updateCounts() to use a 32 bit type was
enough to make the test scaler to work. I noticed that there are other variables
of type unsigned long, though. Would it make sense to write a patch to change all
the relevant variables to a fixed 32 bit type ?


Replies:
RE: synApps usage on 64 bit systems Mark Rivers
RE: synApps usage on 64 bit systems Mooney, Tim M.

Navigate by Date:
Prev: security rules and autosave Touchard Dominique
Next: RE: security rules and autosave Mooney, Tim M.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: security rules and autosave Mooney, Tim M.
Next: RE: synApps usage on 64 bit systems Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·