Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  <19951996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  Index 1994  <19951996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020 
<== Date ==> <== Thread ==>

Subject: Re: Bug with initDatabase()
From: <greene%denali.UUCP@cub.kscorp.com>
To: <tech-talk@aps.anl.gov>
Date: Wed, 12 Jul 1995 09:35:53 -0600 (MDT)
> > 
> > I've encountered a bug while porting EPICS to the Hytec CAMAC controller.
> > The problem is in initDatabase() which is called by iocInit().  The
> > interesting part is how this function ever worked.
> > 
> > The problem is in the first call to ellFirst().  If there are no
> > records defined for a specific type, then the field precLoc->preclist
> > is null.  However, the call to ellFirst() does not check for this
> > condition and will return a garbage pointer.  This works fine with
> > the NI VXI cpu030 card because the data at 0x0 is also 0x0 which causes
> > the for-loop to continue with the next record type.  However, with
> > the Hytec card, 0x0 is the start of EPROM which contains non-zero
> > data.
> > 
> > Obviously I can easily fix this by checking for a null preclist value
> > but I'm curious how this works on other controllers.  I'm also concerned
> > with other areas in the EPICS code which might pass a null ELLLIST value
> > to ellFirst().
> 
> I just looked at the code. A few ststements above the call to ellFirst is
> the statement
> 
>     if(!precLoc->preclist) continue
> 
> Thus if no records exist the call to ellFirst will never be made.
> 
> Marty Kraimer
> 

You must have version 3.12.  We haven't upgraded yet to that version.

This problem seems fairly pervasive - I've had to add a check in several
places so far, including initialProcess() and buildScanLists().  I get
similar problems running some of the IOC test routines, such as dbl(),
but I haven't yet confirmed that it is related.  My guess is that
even 3.12 hasn't fixed all the places where this occurs.


-- 
--------------------------------------------------------------------------------
				Greg Greene
				KineticSystems Corp.
				ph:    303-220-7455 x13
				fax:   303-220-7458
				email: greene@kscorp.com
--------------------------------------------------------------------------------


Navigate by Date:
Prev: Re: Bug with initDatabase() Marty Kraimer
Next: Re: Quiting MDCT... Marty Kraimer
Index: 1994  <19951996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020 
Navigate by Thread:
Prev: Re: Bug with initDatabase() Marty Kraimer
Next: Bug in initDatabase() Patavalis Nikos
Index: 1994  <19951996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·