This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: libjava test suite keeps getting stuck


>>>>> "Jeff" == Jeff Sturm <jsturm@one-point.com> writes:

Jeff> It turns out there is very little C++ usage of new/delete in
Jeff> libjava.  It is trivial to replace these with malloc/free (patch
Jeff> below).

Like Bryce said, use _Jv_Malloc.  That will throw a Java exception on
failure.

Jeff> The only symbol left from EH was std::terminate.  This is
Jeff> generated by the c++ frontend in the cleanup code for
Jeff> JvSynchronize.  (I don't know if that's a c++ requirement, but
Jeff> it's reasonable since JvSynchronize is a true c++ class.)

We'll probably be adding other helper classes like this over time
(probably not a huge number, but we can't rule it out).  However
ideally we wouldn't need std::terminate.  We don't use it anyway --
all our exceptions, including those from destructors in these classes,
should be Java exceptions, handled via the normal Java methods.  So
instead it would be nice to somehow tell this to g++ so that this call
is never generated.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]