[Coin-discuss] CglProbing crashes

Michael Hennebry hennebry at web.cs.ndsu.nodak.edu
Thu Mar 3 14:34:51 EST 2005


On Thu, 3 Mar 2005, Ted Ralphs wrote:

> I solved the issue with Cgl crashing. If I rebuild SYMPHONY from scratch
> (i.e., "make clean" and then "make") *after* building the updated
> version of the Cgl shared library, it works. I was using a version of
> SYMPHONY built while an older version of the Cgl library was present.
> After building the new Cgl library, SYMPHONY crashes when linking at
> runtime. Building SYMPHONY in the presence of the new shared library
> fixes the problem. Since Cgl is a shared library, this doesn't make
> complete sense to me. I thought a shared library could be updated
> without rebuilding all the codes that linked to it. I suppose that there
> must be some information about the shared library inserted into the
> binary at link time that becomes obsolete when the library is updated? I
>   don't have a good sense for how this works. If anyone knows, feel free
> to share.

Apparently data structures or other semantics changed,
not just the implementation.

If one goes from
class Tax { double fraction; }
to
class Tax { int millsPerDollar; }

the function compute(Tax tax, Money money);
will still link as before, but if you and
the library have differing ideas about Tax,
you won't like the result.

A worse situation occurs if the semantics changes
without a corresponding change in the sizes of
data structures.

An unremarked change from double fraction to double percentage
would result in code that apparently ran perfectly,
but gave the wrong answer.
One would have to read the code to discover the problem.

The situation is even worse if the semantics
changes without even a name change.
Unless commented (doubtful), merely reading
the header file would not be good enough.
One would have to read the implementation.
Changing the meaning of fraction to that of
percentage is likely to result in people
mysteriously being taxed 100 times too much.

-- 
Mike   hennebry at web.cs.ndsu.NoDak.edu
"Our gods are dead.  Ancient Klingon warriors slew them
... they were more trouble than they were worth."          --  Worf




More information about the Coin-discuss mailing list