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

Subject: Re: ellFree vs ellFree2
From: Andrew Johnson <anj@aps.anl.gov>
To: tech-talk@aps.anl.gov
Date: Tue, 22 Jun 2010 10:00:51 -0500
Hi Dirk,

On Tuesday 22 June 2010 09:05:51 Dirk Zimoch wrote:
>
> I just found that the function ellFree does not exist any more in EPICS
> base 3.14.11. It has been replaced with a macro and the function
> ellFree2. Unfortunately, that means that binaries compiled with 3.14.8
> cannot run with a 3.14.11 library. Until 3.14.8, the libraries were
> always backward compatible. (Binary compatible!, not only source code
> compatible).

We only try to keep source code compatibility, which 3.14.11 mostly does.  
That's why we always tell people they must do a 'make rebuild' after changing 
any configure/RELEASE file.  The fact that you've managed to avoid doing so is 
pure luck; it would certainly not apply if we made a change to the fields in 
dbCommon.  I would *never* recommend relying on binary compatibility between 
past releases because we haven't had that as a goal, and I'm certain nobody 
tests the code for it.  If binary compatibility is important enough you are 
welcome to test for it in between official releases and report any issues that 
you find (especially the -pre release versions), but I can't promise that 
we'll always accept patches that are just to maintain binary compatibility.

> I looked for a good reason for this change but I could not find any code
> in base that calls ellFree2 (expect for the test code). Can someone
> please tell me what was the reason for this incompatible change?

The original ellFree() routine does not work properly when called from a 
Windows DLL.  Microsoft requires that if you allocate memory by calling one of 
the standard *alloc() routines from within a DLL, you have to release that 
memory by calling free() from the same DLL.  This resulted in all ellFree() 
calls being removed from Base, because they didn't work on Win32.  I added the 
ellFree2() routine to allow the DLL-specific free() routine to be passed in, 
then I could make ellFree() a macro which hid that requirement from the user.

- Andrew
-- 
The best FOSS code is written to be read by other humans -- Harald Welte


References:
ellFree vs ellFree2 Dirk Zimoch

Navigate by Date:
Prev: ellFree vs ellFree2 Dirk Zimoch
Next: Re: Problems configuring 4 IK320 cards Ron Sluiter
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017 
Navigate by Thread:
Prev: ellFree vs ellFree2 Dirk Zimoch
Next: CSS BOY / scripting / XY Graph John Dobbins
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·