PSARC/2008/549 - Apache Standard C++ Library
Steve Clamage
Stephen.Clamage at sun.com
Sat Sep 6 08:17:51 PDT 2008
Regarding binary compatibility guarantees, I think the main point is
being missed.
Because of inline functions and other factors, many implementation
details of the standard library get baked into client object code. Every
supplier of a C++ Standard Library implementation is well aware of this
fact. They know that to claim that two releases are binary compatible,
many implementation details, like the layout or member types of a class,
cannot change.
I can make this statement because all the implementers are members of
the C++ Committee, and compatibility is one of the topics that informs
every decision about language and library changes.
For libCstd, among other libraries that we ship, we are careful that bug
fixes and enhancements do not affect binary compatibility. Because of
this constraint, there are bugs in some libraries that we can't fix.
The maintainers of libstdcxx are equally aware of these issues. If they
claim binary compatibility, it is reasonably safe to believe them. But
that's not the whole story.
Some of the libraries that we ship originate with third parties. We
generally don't download updates of those libraries because of binary
compatibility concerns. If a bug is reported on the library we ship, we
fix it in our sources, sometimes by editing in a fix from the current
library sources if it doesn't break compatibility.
We tell customers that the libraries we ship are upwardly binary
compatible across releases (you can link a new library version into an
old program), but we make no claims about versions of the library they
acquire elsewhere. The reason is not only because a different version of
the source code might not be binary compatible, but also because
libraries have dozens of configuration parameters that affect binary
compatibility. Even with identical source code, a customer-built version
of the library could be incompatible if configuration parameters were
set differently.
Bottom line: If we ship this library, we can safely claim continued
binary compatibility for what we ship, because we will make it so. We
cannot promise compatibility with libraries built by someone else.
---
Steve Clamage, stephen.clamage at sun.com
More information about the opensolaris-arc
mailing list