Copyright (C) 1996-2005, 2006, 2007, 2008
CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
+ Copyright (C) 2009 Theobroma Systems Ltd.
This file is part of CACAO.
c = tmpc;
}
+ else {
+ // Expected behavior for the classloader is to throw an exception
+ // and never return NULL. If the classloader shows a different
+ // behavior, we are correcting it here (see PR126).
+ if (exceptions_get_exception() == NULL) {
+#if !defined(NDEBUG)
+ if (opt_PrintWarnings)
+ log_message_utf("load_class_from_classloader: Correcting faulty classloader behavior (PR126) for ", name);
+#endif
+ exceptions_throw_classnotfoundexception(name);
+ }
+ }
RT_TIMING_GET_TIME(time_cache);
#endif
#endif
int opt_PrintConfig = 0;
+int opt_PrintWarnings = 0;
int opt_ProfileGCMemoryUsage = 0;
int opt_ProfileMemoryUsage = 0;
FILE *opt_ProfileMemoryUsageGNUPlot = NULL;
OPT_InlineMaxSize,
OPT_InlineMinSize,
OPT_PrintConfig,
+ OPT_PrintWarnings,
OPT_ProfileGCMemoryUsage,
OPT_ProfileMemoryUsage,
OPT_ProfileMemoryUsageGNUPlot,
#endif
#endif
{ "PrintConfig", OPT_PrintConfig, OPT_TYPE_BOOLEAN, "print VM configuration" },
+ { "PrintWarnings", OPT_PrintWarnings, OPT_TYPE_BOOLEAN, "print warnings about suspicious behavior"},
{ "ProfileGCMemoryUsage", OPT_ProfileGCMemoryUsage, OPT_TYPE_VALUE, "profiles GC memory usage in the given interval, <value> is in seconds (default: 5)" },
{ "ProfileMemoryUsage", OPT_ProfileMemoryUsage, OPT_TYPE_VALUE, "TODO" },
{ "ProfileMemoryUsageGNUPlot", OPT_ProfileMemoryUsageGNUPlot, OPT_TYPE_VALUE, "TODO" },
opt_PrintConfig = enable;
break;
+ case OPT_PrintWarnings:
+ opt_PrintWarnings = enable;
+ break;
+
case OPT_ProfileGCMemoryUsage:
if (value == NULL)
opt_ProfileGCMemoryUsage = 5;
#endif
#endif
extern int opt_PrintConfig;
+extern int opt_PrintWarnings;
extern int opt_ProfileGCMemoryUsage;
extern int opt_ProfileMemoryUsage;
extern FILE *opt_ProfileMemoryUsageGNUPlot;