From bd760894e689fc55e044860f3252602d86a74292 Mon Sep 17 00:00:00 2001 From: Ranjit Mathew Date: Fri, 18 Jun 2004 13:59:04 +0000 Subject: prims.cc (_Jv_CreateJavaVM): Install SEGV and FPE handlers... * prims.cc (_Jv_CreateJavaVM): Install SEGV and FPE handlers, if desired, before the default class loader is initialised. Call INIT_SEGV only if HANDLE_SEGV is defined. From-SVN: r83348 --- libjava/ChangeLog | 6 ++++++ libjava/prims.cc | 14 +++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) (limited to 'libjava') diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 2d0ec4b..20b0726 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,5 +1,11 @@ 2004-06-18 Ranjit Mathew + * prims.cc (_Jv_CreateJavaVM): Install SEGV and FPE handlers, + if desired, before the default class loader is initialised. + Call INIT_SEGV only if HANDLE_SEGV is defined. + +2004-06-18 Ranjit Mathew + * gnu/gcj/runtime/VMClassLoader.java (init): Add extensions directory only if it actually exists. diff --git a/libjava/prims.cc b/libjava/prims.cc index 29f2b20..cbcbc9f 100644 --- a/libjava/prims.cc +++ b/libjava/prims.cc @@ -954,6 +954,14 @@ _Jv_CreateJavaVM (void* /*vm_args*/) _Jv_InitGC (); _Jv_InitializeSyncMutex (); +#ifdef HANDLE_SEGV + INIT_SEGV; +#endif + +#ifdef HANDLE_FPE + INIT_FPE; +#endif + /* Initialize Utf8 constants declared in jvm.h. */ void_signature = _Jv_makeUtf8Const ("()V", 3); clinit_name = _Jv_makeUtf8Const ("", 8); @@ -980,15 +988,11 @@ _Jv_CreateJavaVM (void* /*vm_args*/) // initialization of ClassLoader before we start the initialization // of VMClassLoader. _Jv_InitClass (&java::lang::ClassLoader::class$); + // Once the bootstrap loader is in place, change it into a kind of // system loader, by having it read the class path. gnu::gcj::runtime::VMClassLoader::initialize(); - INIT_SEGV; -#ifdef HANDLE_FPE - INIT_FPE; -#endif - no_memory = new java::lang::OutOfMemoryError; java::lang::VMThrowable::trace_enabled = 1; -- cgit v1.1