Subject: |
Re: Bug with initDatabase() |
From: |
[email protected] (Marty Kraimer) |
Date: |
Wed, 12 Jul 1995 09:24:29 -0500 |
> From denali!greene Tue Jul 11 15:42 CDT 1995
> From: <greene%[email protected]>
> Subject: Bug with initDatabase()
> To: <[email protected]>
> Date: Tue, 11 Jul 1995 14:40:32 -0600 (MDT)
> X-Mailer: ELM [version 2.4 PL24]
> Mime-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Content-Type> : > text/plain> ; > charset=US-ASCII>
> Content-Length: 1194
>
> 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
- Navigate by Date:
- Prev:
Bug in initDatabase() Patavalis Nikos
- Next:
Re: Bug with initDatabase() greene%denali.UUCP
- 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:
Bug with initDatabase() greene%denali.UUCP
- Next:
Re: Bug with initDatabase() greene%denali.UUCP
- 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
|