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  <20122013  2014  2015  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  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: dbReportDeviceConfig bug
From: Hinko Kocevar <[email protected]>
To: EPICS Tech Talk <[email protected]>
Cc: Tomaz Beltram <[email protected]>
Date: Mon, 21 May 2012 10:10:11 +0200
Hi,

we are using Asyn driver support for our IOC. The @param part of the INP/PUT string can get pretty long - more than 40 characters, excluding other macros that might be present in the field value ($(PORT), $(ADDR), ..).

According to this thread http://www.aps.anl.gov/epics/tech-talk/2010/msg00270.php, INP/OUT record field value is not supposed to be limited and as it seems it is not, since our IOC runs fine.

The problem appears if the user tries to execute dbReportDeviceConfig from ioc shell - IOC segFaults.

I've tracked the problem down and it seems that dbReportDeviceConfig() is reserving too small buffer to hold @param (40 chars), while dbGetString() can return up to 100 chars in the message.

Following patch should fix the issue:

Index: src/dbStatic/dbStaticLib.c
===================================================================
--- src/dbStatic/dbStaticLib.c	(revision 16136)
+++ src/dbStatic/dbStaticLib.c	(working copy)
@@ -4060,7 +4060,7 @@
     DBENTRY	*pdbentry=&dbentry;
     long	status;
     char	busName[40];
-    char	linkValue[40];
+    char	linkValue[100];
     char	dtypValue[40];
     char	cvtValue[40];
     int		ilink,nlinks;


Best regards,
Hinko

--
Hinko Kocevar
Software development engineer
Instrumentation Technologies d.d.
Velika pot 22, SI-5250 Solkan - Slovenia
T:+386 5 3352600, F:+386 5 3352601
E-mail: [email protected]

http://www.i-tech.si - When your users demand stability

The information transmitted is intended solely for the
addressee and may contain confidential and/or privileged
information. Any review, retention, disclosure or other use
by persons other than the intended recipient is prohibited.
If you received this in error, please notify the sender and
delete all copies.

Replies:
Re: dbReportDeviceConfig bug Andrew Johnson

Navigate by Date:
Prev: Re: [CA][waveform]max array bytes on IOC Pavel Masloff
Next: VMware : won't allow cagets Mogamad Amien Crombie
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: [CSS] commas in TextUpdate Chen, Xihui
Next: Re: dbReportDeviceConfig bug Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
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 ·