On 8/18/11 2:13 PM, Andrew Johnson wrote:
> I'm guessing the scalcout record type (which is from synApps, not part of
> Base) is probably using long for integer value storage in some places without
> properly initializing the memory. An LP64 architecture is liable to this kind
> of problem (which is why Base maps DBF_LONG to epicsInt32), so I'd expect
> linux-x86_64 to exhibit it as well although I haven't tried as I don't have
> synApps installed.
Hi, Andrew.
Bingo! I think you're absolutely right. After applying the
attached patch to [calc 2-8]/calcApp/src/sCalcPerform.c, it now
works. Thanks for the hint!
Tim: Maybe other local variables in the sCalcPerform function
should be initialized too? I don't know.
Thanks,
Lewis
--- sCalcPerform.c.orig 2010-03-24 10:35:17.000000000 -0500
+++ sCalcPerform.c 2011-08-18 14:31:43.000000000 -0500
@@ -357,9 +357,9 @@
char *s2, tmpstr[TMPSTR_SIZE], currSymbol;
char *s, *s1, c;
int i, j, k;
- long l;
+ long l = 0L;
unsigned short ui;
- unsigned long ul;
+ unsigned long ul = 0UL;
float f;
double d;
double *topd, *pd;
- Replies:
- Re: Scalcout data corruption on darwin-x86 with x86_64 arch class Tim Mooney
- References:
- Scalcout data corruption on darwin-x86 with x86_64 arch class J. Lewis Muir
- Re: Scalcout data corruption on darwin-x86 with x86_64 arch class Andrew Johnson
- Navigate by Date:
- Prev:
Re: Scalcout data corruption on darwin-x86 with x86_64 arch class Andrew Johnson
- Next:
Re: Scalcout data corruption on darwin-x86 with x86_64 arch class Tim Mooney
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
<2011>
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Scalcout data corruption on darwin-x86 with x86_64 arch class Andrew Johnson
- Next:
Re: Scalcout data corruption on darwin-x86 with x86_64 arch class Tim Mooney
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
<2011>
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|