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  <20112012  2013  2014  2015  2016  2017  2018  2019  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019 
<== Date ==> <== Thread ==>

Subject: Re: Scalcout data corruption on darwin-x86 with x86_64 arch class
From: "J. Lewis Muir" <jlmuir@anl.gov>
To: Tim Mooney <mooney@aps.anl.gov>
Cc: tech-talk@aps.anl.gov
Date: Thu, 18 Aug 2011 16:41:34 -0500
On 8/18/11 3:26 PM, Tim Mooney wrote:
> Awesome!  I haven't reproduced the symptom on my x86_64 system, but
> anyway it's clear that the code needs this fix.  I'll look for other
> similar problems.
> Thanks to you both.
> Tim

Hi, Tim.

I think I've found another problem: using SSCANF to parse '-1'
with a '%d' format does not result in a value of -1.  Attached
is scalcout-corrupt2.db which demonstrates this.  After loading
it into an IOC, I did the following from a Bash shell:

  $ caget ioc23:Temperature.{VAL,SVAL}
  ioc23:Temperature.VAL          4.29497e+09
  ioc23:Temperature.SVAL         4294967295.000

The value should be -1.

Like the previous problem, it works fine with the i386
architecture class.

And if I change the '%d' to '%ld', it works fine for the x86_64
architecture class.

Thanks,

Lewis
#
# Demonstrates scalcout data corruption on 64-bit IOC (darwin-x86 with x86_64
# architecture class; EPICS Base 3.14.12.1 + Known Problems patches).  Works
# OK with i386 architecture class IOC.  Works OK with x86_64 architecture
# class if use '%ld' instead of '%d'.
#
# Parameters:
#   P  PV prefix (e.g. ioc23:)
#

record(stringin, "$(P)ReadTemperature") {
  field(VAL, "!DT -1")
  field(FLNK, "$(P)Temperature")
  field(PINI, "YES")
}

record(scalcout, "$(P)Temperature") {
  field(INAA, "$(P)ReadTemperature.VAL NPP MS")
  field(CALC, "SSCANF(AA,'!DT %d')")
  field(EGU, "C")
}

Replies:
Re: Scalcout data corruption on darwin-x86 with x86_64 arch class Bruce Hill
References:
Re: Scalcout data corruption on darwin-x86 with x86_64 arch class Tim Mooney

Navigate by Date:
Prev: Re: Scalcout data corruption on darwin-x86 with x86_64 arch class Tim Mooney
Next: RE: Building EPICS (3-14-12-1) on Windows 7 Jeff Hill
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019 
Navigate by Thread:
Prev: Re: Scalcout data corruption on darwin-x86 with x86_64 arch class Tim Mooney
Next: Re: Scalcout data corruption on darwin-x86 with x86_64 arch class Bruce Hill
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·