C++ exceptions in HotSpot source code

Paul Hohensee paul.hohensee at oracle.com
Thu Sep 9 13:24:09 PDT 2010

  Tom's right about portability.  C++ exception handling can interfere 
with Hotspot's
exception handling mechanisms.  How the former is implemented varies
from compiler to compiler, so even if we had workarounds, we'd still
have to write one workaround per compiler, and we don't want to track
C++ compiler implementations any more than we already do.


On 9/9/10 4:02 PM, Tom Rodriguez wrote:
> I think it's primarily history.  At the point hotspot was being written neither generic nor exceptions were mature or widely in use.  We'd also chosen to use a small core of C++ in the interests of avoiding portability problems caused by the variability of C++ implementations.
> tom
> On Sep 9, 2010, at 2:16 AM, Douglas Simon wrote:
>> Hi,
>> Just out of curiousity, why (apart from good taste!) are C++ exceptions not used in HotSpot source code? Is it problems with the semantics of C++ exceptions or something to do with problematic implementations of exceptions by various C++ compilers or a combination of the two?
>> -Doug

More information about the hotspot-dev mailing list