stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Travis Vitek <vi...@roguewave.com>
Subject Re: 19.exceptions.mt.cpp fails on AIX
Date Fri, 02 Nov 2007 21:19:00 GMT



Martin Sebor wrote:
> 
>> That said, what is the appropriate solution? Should we just pad the type
>> out
>> to the correct size,
> 
> Yes. As Farid says, the XLC exception and ours must have the same
> size.
> 

Is this a binary compatible change? I've always believed changing the size
of a type breaks binary compatibility, but if the the special functions are
no-op, I'm thinking it might be safe.


Martin Sebor wrote:
> 
>>I guess I
>> would understand if I had got a linker error complaining of mulitply
>> defined
>> symbols, but I don't.
> 
> This (the interface between the language runtime and the library)
> is the most difficult area of the library for independent library
> authors like us to get right. We can't help but make assumptions
> about the runtime. Some are based on our inspection of the native
> library headers (which may change in subtle but sometimes
> important ways from one release to another), others we try to
> automate (the detection of the special member functions of the
> exception classes). Both approaches are fraught with peril.
> 

Okay. So the appropriate solution is to modify the exception header to have
the correct size. As I mentioned, I think I can easily write a config test
to determine the necessary pad and apply it. Is that a better approach?

At the very least I'd like to determine the size of the runtime library
version of std::exception and then add a test that will check the size
matches up with the size of the type we are providing. That way we have a
way to be notified of the problem in the future instead of having to find it
the hard way.

Travis
-- 
View this message in context: http://www.nabble.com/19.exceptions.mt.cpp-fails-on-AIX-tf4738595.html#a13556315
Sent from the stdcxx-dev mailing list archive at Nabble.com.


Mime
View raw message