diff --git a/SOURCES/0002-Encapsulate-all-jthread_map-calls-inside-critical-se.patch b/SOURCES/0002-Encapsulate-all-jthread_map-calls-inside-critical-se.patch new file mode 100644 index 0000000..e0f971e --- /dev/null +++ b/SOURCES/0002-Encapsulate-all-jthread_map-calls-inside-critical-se.patch @@ -0,0 +1,126 @@ +From df4bc975a7cd4600e50aff5a4fdc9a777d414605 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Tue, 5 Nov 2013 13:45:42 +0100 +Subject: [PATCH 02/39] Encapsulate all jthread_map calls inside critical + section + +Every single thread has to remember that an exception was already +reported in order to prevent multiple reports for a single exception. +The reported exceptions are stored in a list and each thread has own +list of reported exceptions. These lists are stored in a global map. + +Refrences: commit 4144d9dade18645642f4360a9a4cd2fd318b4de4, issue #11 + +ThreadStart, ThreadEnd and Exception callbacks are called from different +threads but all of the access the thread to reported exception map. +Therefore access to internal data must be serialized through +lock-protected critical section. + +Related to rhbz#1026208 +Related to rhbz#1051483 +--- + src/jthread_map.c | 23 +++++++++++++++++++++-- + 1 file changed, 21 insertions(+), 2 deletions(-) + +diff --git a/src/jthread_map.c b/src/jthread_map.c +index 7b70953..29c5c29 100644 +--- a/src/jthread_map.c ++++ b/src/jthread_map.c +@@ -20,6 +20,7 @@ + #include "jthrowable_circular_buf.h" + + #include ++#include + #include + + +@@ -42,6 +43,7 @@ typedef struct jthread_map_item { + + struct jthread_map { + T_jthreadMapItem *items[MAP_SIZE]; ///< map elements ++ pthread_mutex_t mutex; + }; + + +@@ -54,6 +56,8 @@ T_jthreadMap *jthread_map_new() + fprintf(stderr, __FILE__ ":" STRINGIZE(__LINE__) ": calloc() error\n"); + } + ++ pthread_mutex_init(&map->mutex, /*use default attributes*/NULL); ++ + return map; + } + +@@ -66,6 +70,7 @@ void jthread_map_free(T_jthreadMap *map) + return; + } + ++ pthread_mutex_destroy(&map->mutex); + free(map); + } + +@@ -104,6 +109,8 @@ void jthread_map_push(T_jthreadMap *map, jlong tid, T_jthrowableCircularBuf *buf + { + assert(NULL != map); + ++ pthread_mutex_lock(&map->mutex); ++ + const long index = tid % MAP_SIZE; + T_jthreadMapItem *last = NULL; + T_jthreadMapItem *itm = map->items[index]; +@@ -125,6 +132,8 @@ void jthread_map_push(T_jthreadMap *map, jlong tid, T_jthrowableCircularBuf *buf + last->next = new; + } + } ++ ++ pthread_mutex_unlock(&map->mutex); + } + + +@@ -133,17 +142,23 @@ T_jthrowableCircularBuf *jthread_map_get(T_jthreadMap *map, jlong tid) + { + assert(NULL != map); + ++ pthread_mutex_lock(&map->mutex); ++ + const size_t index = tid % MAP_SIZE; ++ T_jthrowableCircularBuf *buffer = NULL; + + for (T_jthreadMapItem *itm = map->items[index]; NULL != itm; itm = itm->next) + { + if (itm->tid == tid) + { +- return itm->buffer; ++ buffer = itm->buffer; ++ break; + } + } + +- return NULL; ++ pthread_mutex_unlock(&map->mutex); ++ ++ return buffer; + } + + +@@ -152,6 +167,8 @@ T_jthrowableCircularBuf *jthread_map_pop(T_jthreadMap *map, jlong tid) + { + assert(NULL != map); + ++ pthread_mutex_lock(&map->mutex); ++ + const size_t index = tid % MAP_SIZE; + T_jthrowableCircularBuf *buffer = NULL; + if (NULL != map->items[index]) +@@ -181,6 +198,8 @@ T_jthrowableCircularBuf *jthread_map_pop(T_jthreadMap *map, jlong tid) + } + } + ++ pthread_mutex_unlock(&map->mutex); ++ + return buffer; + } + +-- +1.8.3.1 + diff --git a/SOURCES/0003-Add-thread-stress-test.patch b/SOURCES/0003-Add-thread-stress-test.patch new file mode 100644 index 0000000..9582784 --- /dev/null +++ b/SOURCES/0003-Add-thread-stress-test.patch @@ -0,0 +1,128 @@ +From a0de4614f4cb8f8340f4df31049b9144e94a5f49 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Tue, 5 Nov 2013 10:20:15 +0100 +Subject: [PATCH 03/39] Add thread stress test + +Related to #21 +Related to rhbz#1051483 +--- + test/CMakeLists.txt | 9 ++++++ + test/ThreadStressTest.java | 79 ++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 88 insertions(+) + create mode 100644 test/ThreadStressTest.java + +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index 22187da..c84ebe5 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -52,6 +52,7 @@ _add_class_target(TryFinallyTest TEST_JAVA_TARGETS SimpleTest) + _add_class_target(InnerExceptions TEST_JAVA_TARGETS SimpleTest) + _add_class_target(OverridenEqualExceptionTest TEST_JAVA_TARGETS) + _add_class_target(NoException TEST_JAVA_TARGETS) ++_add_class_target(ThreadStressTest TEST_JAVA_TARGETS SimpleTest) + + _add_jar_target(JarTest JAR_TEST_PATH SimpleTest) + set(REMOTE_JAR_PATH ${HTTP_DIR}/JarTest.jar) +@@ -200,6 +201,14 @@ _add_test_target( + #_add_test(run_overriden_eqauls 2) + + add_custom_target( ++ run_thread_stress ++ COMMAND LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/src ${Java_JAVA_EXECUTABLE} -agentlib:${AGENT_NAME}=caught=java.lang.ArrayIndexOutOfBoundsException,output= ThreadStressTest ++ DEPENDS ${TEST_JAVA_TARGETS} ++ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ++) ++add_test(test_thread_stress make run_thread_stress) ++ ++add_custom_target( + run_empty_command_line_options + COMMAND LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/src ${Java_JAVA_EXECUTABLE} -agentlib:${AGENT_NAME} NoException + DEPENDS AbrtChecker ${TEST_JAVA_TARGETS} +diff --git a/test/ThreadStressTest.java b/test/ThreadStressTest.java +new file mode 100644 +index 0000000..3ebf9e0 +--- /dev/null ++++ b/test/ThreadStressTest.java +@@ -0,0 +1,79 @@ ++import java.io.*; ++import java.util.*; ++import java.net.*; ++ ++ ++/** ++ * @author Jakub Filak <jfilak@redhat.com> ++ */ ++ ++class ThreadCaughtException extends Thread { ++ private void level_three() { ++ SimpleTest.throwAndCatchAllExceptions(); ++ } ++ ++ private void level_two() { ++ try { ++ Thread.currentThread().sleep(5); ++ } ++ catch (InterruptedException ex) { ++ System.out.println("Interrupted"); ++ } ++ level_three(); ++ } ++ ++ private void level_one() { ++ try { ++ Thread.currentThread().sleep(5); ++ } ++ catch (InterruptedException ex) { ++ System.out.println("Interrupted"); ++ } ++ level_two(); ++ } ++ ++ public void run() { ++ level_one(); ++ } ++} ++ ++public class ThreadStressTest { ++ /** ++ * Entry point to this multi thread test. ++ */ ++ public static void main(String args[]) { ++ System.out.println("Test.java"); ++ ++ List tojoin = new LinkedList(); ++ ++ for (int i = 100; i != 0; --i) { ++ for (int j = 300; j != 0; --j) { ++ Thread t = new ThreadCaughtException(); ++ tojoin.add(t); ++ System.out.println("Starting Thread: " + Integer.toString((i * j) + j)); ++ t.start(); ++ } ++ ++ try { ++ Thread.currentThread().sleep(1000); ++ } ++ catch (InterruptedException ex) { ++ System.out.println("Interrupted"); ++ } ++ } ++ ++ for (Thread t : tojoin) { ++ try { ++ t.join(); ++ } ++ catch(InterruptedException ex) { ++ System.err.println("Can't join a thread because thread join() was interrupted."); ++ } ++ } ++ ++ System.exit(0); ++ } ++} ++ ++// finito ++ +-- +1.8.3.1 + diff --git a/SOURCES/0004-Make-thread-stress-test-more-robust.patch b/SOURCES/0004-Make-thread-stress-test-more-robust.patch new file mode 100644 index 0000000..414dffe --- /dev/null +++ b/SOURCES/0004-Make-thread-stress-test-more-robust.patch @@ -0,0 +1,63 @@ +From c884a17bfaa3f3ff4a802b3de9e06d48c494eb68 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Tue, 5 Nov 2013 14:00:03 +0100 +Subject: [PATCH 04/39] Make thread stress test more robust + +Related to #21 +Related to rhbz#1051483 +--- + test/ThreadStressTest.java | 22 +++++++++++++++------- + 1 file changed, 15 insertions(+), 7 deletions(-) + +diff --git a/test/ThreadStressTest.java b/test/ThreadStressTest.java +index 3ebf9e0..981ba91 100644 +--- a/test/ThreadStressTest.java ++++ b/test/ThreadStressTest.java +@@ -46,22 +46,29 @@ public class ThreadStressTest { + + List tojoin = new LinkedList(); + +- for (int i = 100; i != 0; --i) { +- for (int j = 300; j != 0; --j) { +- Thread t = new ThreadCaughtException(); +- tojoin.add(t); +- System.out.println("Starting Thread: " + Integer.toString((i * j) + j)); +- t.start(); ++ for (int i = 60; i != 0; --i) { ++ for (int j = 600; j != 0; --j) { ++ try { ++ Thread t = new ThreadCaughtException(); ++ tojoin.add(t); ++ System.out.println("Starting Thread: " + Integer.toString((i * j) + j)); ++ t.start(); ++ } ++ catch(Throwable t) { ++ System.out.println("Thread start: " + t.toString()); ++ System.exit(1); ++ } + } + + try { +- Thread.currentThread().sleep(1000); ++ Thread.currentThread().sleep(500); + } + catch (InterruptedException ex) { + System.out.println("Interrupted"); + } + } + ++ System.out.println("All Threads Started"); + for (Thread t : tojoin) { + try { + t.join(); +@@ -71,6 +78,7 @@ public class ThreadStressTest { + } + } + ++ System.out.println("All Threads Finished"); + System.exit(0); + } + } +-- +1.8.3.1 + diff --git a/SOURCES/0005-Unify-reason-message-format.patch b/SOURCES/0005-Unify-reason-message-format.patch new file mode 100644 index 0000000..332324f --- /dev/null +++ b/SOURCES/0005-Unify-reason-message-format.patch @@ -0,0 +1,189 @@ +From 9eaeea7851ff8682b7b6289dd9bded87d29c6fdd Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Fri, 25 Oct 2013 15:46:43 +0200 +Subject: [PATCH 05/39] Unify reason message format + +Use the same message for abrt and log: + +(Caught|Uncaght) exception $FQDN_TYPE in method $FQDN_METHOD + +The new format misses thread name and method signature. Thread's name is +available in stack trace and method's signature is useful only for +debugging. + +Length of the reason message is limited to 255 characters. If the +message exceeds that limit, algorithm tries to generate the message +according to the following formats: + +(Caught|Uncaght) exception $FQDN_TYPE in method $CLASS_NAME_METHOD +(Caught|Uncaght) exception $EXCEPTION_CLASS in method $CLASS_NAME_METHOD +(Caught|Uncaght) exception $EXCEPTION_CLASS in method $METHOD + +The first suitable message is used. If none of these formats generate an +acceptable message, the last format is used and the message is truncated. + +Related to rhbz#1023081 +Related to rhbz#1055581 + +Signed-off-by: Jakub Filak +--- + src/abrt-checker.c | 99 ++++++++++++++++++++++++++++++++++++++++++++++-------- + 1 file changed, 85 insertions(+), 14 deletions(-) + +diff --git a/src/abrt-checker.c b/src/abrt-checker.c +index 22f772e..23e76b0 100644 +--- a/src/abrt-checker.c ++++ b/src/abrt-checker.c +@@ -87,6 +87,9 @@ + /* Don't need to be changed */ + #define MAX_THREAD_NAME_LENGTH 40 + ++/* Max. length of reason message */ ++#define MAX_REASON_MESSAGE_STRING_LENGTH 255 ++ + /* Max. length of stack trace */ + #define MAX_STACK_TRACE_STRING_LENGTH 10000 + +@@ -402,7 +405,7 @@ static void add_process_properties_data(problem_data_t *pd) + * Register new ABRT event using given message and a method name. + * If reportErrosTo global flags doesn't contain ED_ABRT, this function does nothing. + */ +-static void register_abrt_event(char * executable, char * message, unsigned char * method, char * backtrace) ++static void register_abrt_event(char * executable, char * message, char * backtrace) + { + if ((reportErrosTo & ED_ABRT) == 0) + { +@@ -410,7 +413,6 @@ static void register_abrt_event(char * executable, char * message, unsigned char + return; + } + +- char abrt_message[1000]; + char s[11]; + problem_data_t *pd = problem_data_new(); + +@@ -421,14 +423,12 @@ static void register_abrt_event(char * executable, char * message, unsigned char + get_uid_as_string(s); + problem_data_add_text_editable(pd, FILENAME_UID, s); + +- sprintf(abrt_message, "%s in method %s", message, method); +- + /* executable must belong to some package otherwise ABRT refuse it */ + problem_data_add_text_editable(pd, FILENAME_EXECUTABLE, executable); + problem_data_add_text_editable(pd, FILENAME_BACKTRACE, backtrace); + + /* type and analyzer are the same for abrt, we keep both just for sake of comaptibility */ +- problem_data_add_text_editable(pd, FILENAME_REASON, abrt_message); ++ problem_data_add_text_editable(pd, FILENAME_REASON, message); + /* end of required fields */ + + /* add optional fields */ +@@ -489,6 +489,66 @@ static int get_tid( + + + ++static char *format_exception_reason_message( ++ int caught, ++ const char *exception_fqdn, ++ const char *class_fqdn, ++ const char *method) ++{ ++ const char *exception_name = exception_fqdn; ++ const char *class_name = class_fqdn; ++ const char *prefix = caught ? "Caught" : "Uncaught"; ++ ++ char *message = (char*)calloc(MAX_REASON_MESSAGE_STRING_LENGTH + 1, sizeof(char)); ++ if (message == NULL) ++ { ++ fprintf(stderr, __FILE__ ":" STRINGIZE(__LINE__) ": calloc(): out of memory"); ++ return NULL; ++ } ++ ++ while (1) ++ { ++ const int message_len = snprintf(message, MAX_REASON_MESSAGE_STRING_LENGTH, ++ "%s exception %s in method %s%s%s()", prefix, ++ exception_name, class_name, ('\0' != class_name[0] ? "." : ""), ++ method); ++ ++ if (message_len <= 0) ++ { ++ fprintf(stderr, __FILE__ ":" STRINGIZE(__LINE__) ": snprintf(): can't print reason message to memory on stack\n"); ++ free(message); ++ return NULL; ++ } ++ else if (message_len >= MAX_REASON_MESSAGE_STRING_LENGTH) ++ { ++ const char *ptr = NULL; ++ if (NULL != (ptr = strrchr(class_name, '.'))) ++ { ++ /* Drop name space from method signature */ ++ class_name = ptr + 1; ++ continue; ++ } ++ else if(NULL != (ptr = strrchr(exception_name, '.'))) ++ { ++ /* Drop name space from exception class signature */ ++ exception_name = ptr + 1; ++ continue; ++ } ++ else if (class_name[0] != '\0') ++ { ++ /* Drop class name from method signature */ ++ class_name += strlen(class_name); ++ continue; ++ } ++ /* No more place for shortening. The message will remain truncated. */ ++ } ++ ++ return message; ++ } ++} ++ ++ ++ + /* + * Format class signature into a printable form. + * Class names have form "Ljava/lang/String;" +@@ -1892,19 +1952,30 @@ static void JNICALL callback_on_exception( + jthrowable_circular_buf_push(threads_exc_buf, exception_object); + } + +- log_print("%s %s exception in thread \"%s\" ", (catch_method == NULL ? "Uncaught" : "Caught"), updated_exception_name_ptr, tname); +- log_print("in a method %s%s() with signature %s\n", class_name_ptr, method_name_ptr, method_signature_ptr); ++ /* Remove trailing '.' */ ++ const ssize_t class_name_len = strlen(class_name_ptr); ++ if (class_name_len > 0) ++ class_name_ptr[class_name_len - 1] = '\0'; ++ ++ char *message = format_exception_reason_message(/*caught?*/NULL != catch_method, ++ updated_exception_name_ptr, class_name_ptr, method_name_ptr); + +- //char *stack_trace_str = generate_stack_trace(jvmti_env, jni_env, thr, tname, updated_exception_name_ptr); +- char *stack_trace_str = generate_thread_stack_trace(jvmti_env, jni_env, tname, exception_object); +- if (NULL != stack_trace_str) ++ if (NULL != message) + { +- log_print("%s", stack_trace_str); +- if (NULL != threads_exc_buf) ++ log_print("%s\n", message); ++ ++ //char *stack_trace_str = generate_stack_trace(jvmti_env, jni_env, thr, tname, updated_exception_name_ptr); ++ char *stack_trace_str = generate_thread_stack_trace(jvmti_env, jni_env, tname, exception_object); ++ if (NULL != stack_trace_str) + { +- register_abrt_event(processProperties.main_class, (catch_method == NULL ? "Uncaught exception" : "Caught exception"), (unsigned char *)method_name_ptr, stack_trace_str); ++ log_print("%s", stack_trace_str); ++ if (NULL != threads_exc_buf) ++ { ++ register_abrt_event(processProperties.main_class, message, stack_trace_str); ++ } ++ free(stack_trace_str); + } +- free(stack_trace_str); ++ free(message); + } + } + else +-- +1.8.3.1 + diff --git a/SOURCES/0006-Adapt-tests-to-the-recent-changes-in-formats.patch b/SOURCES/0006-Adapt-tests-to-the-recent-changes-in-formats.patch new file mode 100644 index 0000000..866c474 --- /dev/null +++ b/SOURCES/0006-Adapt-tests-to-the-recent-changes-in-formats.patch @@ -0,0 +1,1035 @@ +From 2f5da8dbb85c74cc0df0ec8223282c92351fcea3 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Fri, 25 Oct 2013 16:32:52 +0200 +Subject: [PATCH 06/39] Adapt tests to the recent changes in formats + +Related to rhbz#1023081 +Related to rhbz#1055581 +--- + test/outputs/Linux-armv7l/run_test.log.in | 34 +++++++++++++++--------------- + test/outputs/Linux-ppc/run_test.log.in | 34 +++++++++++++++--------------- + test/outputs/Linux-ppc64/run_test.log.in | 34 +++++++++++++++--------------- + test/outputs/Linux-s390/run_test.log.in | 34 +++++++++++++++--------------- + test/outputs/Linux-s390x/run_test.log.in | 34 +++++++++++++++--------------- + test/outputs/run.log.in | 4 ++-- + test/outputs/run_bad_class.log.in | 2 +- + test/outputs/run_inner.log.in | 4 ++-- + test/outputs/run_jar.log.in | 4 ++-- + test/outputs/run_missing_class_test.log.in | 2 +- + test/outputs/run_package.log.in | 4 ++-- + test/outputs/run_remote.log.in | 4 ++-- + test/outputs/run_test.log.in | 34 +++++++++++++++--------------- + test/outputs/run_threads.log.in | 4 ++-- + test/outputs/run_try_finally.log.in | 4 ++-- + 15 files changed, 118 insertions(+), 118 deletions(-) + +diff --git a/test/outputs/Linux-armv7l/run_test.log.in b/test/outputs/Linux-armv7l/run_test.log.in +index 768ff41..5c9e7f7 100644 +--- a/test/outputs/Linux-armv7l/run_test.log.in ++++ b/test/outputs/Linux-armv7l/run_test.log.in +@@ -1,18 +1,18 @@ +-Caught java.io.FileNotFoundException exception in thread "main" in a method java.io.FileInputStream.() with signature (Ljava/io/File;)V ++Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.() + Exception in thread "main" java.io.FileNotFoundException: _wrong_file_ (No such file or directory) + at java.io.FileInputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] + at java.io.FileInputStream.(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] + at Test.readWrongFile(Test.java:89) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:461) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.io.FileNotFoundException exception in thread "main" in a method java.io.FileInputStream.() with signature (Ljava/io/File;)V ++Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.() + Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied) + at java.io.FileInputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] + at java.io.FileInputStream.(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] + at Test.readUnreadableFile(Test.java:111) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:462) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.io.FileNotFoundException exception in thread "main" in a method java.io.FileOutputStream.() with signature (Ljava/io/File;Z)V ++Caught exception java.io.FileNotFoundException in method java.io.FileOutputStream.() + Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied) + at java.io.FileOutputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class] + at java.io.FileOutputStream.(FileOutputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class] +@@ -20,7 +20,7 @@ Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permiss + at Test.writeToUnwritableFile(Test.java:134) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:463) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.NumberFormatException exception in thread "main" in a method java.lang.Integer.parseInt() with signature (Ljava/lang/String;I)I ++Caught exception java.lang.NumberFormatException in method java.lang.Integer.parseInt() + Exception in thread "main" java.lang.NumberFormatException: null + at java.lang.Integer.parseInt(Integer.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Integer.class] + at java.lang.Integer.(Integer.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Integer.class] +@@ -38,7 +38,7 @@ Exception in thread "main" java.lang.NumberFormatException: null + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.net.UnknownHostException exception in thread "main" in a method java.net.InetAddress$1.lookupAllHostAddr() with signature (Ljava/lang/String;)[Ljava/net/InetAddress; ++Caught exception java.net.UnknownHostException in method java.net.InetAddress$1.lookupAllHostAddr() + Exception in thread "main" java.net.UnknownHostException: xyzzy: Name or service not known + at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/Inet6AddressImpl.class] + at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/InetAddress$1.class] +@@ -52,7 +52,7 @@ Exception in thread "main" java.net.UnknownHostException: xyzzy: Name or service + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.net.UnknownHostException exception in thread "main" in a method java.net.AbstractPlainSocketImpl.connect() with signature (Ljava/net/SocketAddress;I)V ++Caught exception java.net.UnknownHostException in method java.net.AbstractPlainSocketImpl.connect() + Exception in thread "main" java.net.UnknownHostException: xyzzy + at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/AbstractPlainSocketImpl.class] + at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/SocksSocketImpl.class] +@@ -63,7 +63,7 @@ Exception in thread "main" java.net.UnknownHostException: xyzzy + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.net.ConnectException exception in thread "main" in a method java.net.AbstractPlainSocketImpl.doConnect() with signature (Ljava/net/InetAddress;II)V ++Caught exception java.net.ConnectException in method java.net.AbstractPlainSocketImpl.doConnect() + Exception in thread "main" java.net.ConnectException: Connection refused + at java.net.PlainSocketImpl.socketConnect(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/PlainSocketImpl.class] + at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/AbstractPlainSocketImpl.class] +@@ -77,7 +77,7 @@ Exception in thread "main" java.net.ConnectException: Connection refused + at Test.readFromSocket(Test.java:177) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:474) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.NumberFormatException exception in thread "main" in a method java.lang.Long.parseLong() with signature (Ljava/lang/String;I)J ++Caught exception java.lang.NumberFormatException in method java.lang.Long.parseLong() + Exception in thread "main" java.lang.NumberFormatException: null + at java.lang.Long.parseLong(Long.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Long.class] + at java.lang.Long.parseLong(Long.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Long.class] +@@ -86,14 +86,14 @@ Exception in thread "main" java.lang.NumberFormatException: null + at Test.readFromURL(Test.java:237) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:475) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.io.FileNotFoundException exception in thread "main" in a method sun.net.www.protocol.http.HttpURLConnection.getInputStream() with signature ()Ljava/io/InputStream; ++Caught exception java.io.FileNotFoundException in method sun.net.www.protocol.http.HttpURLConnection.getInputStream() + Exception in thread "main" java.io.FileNotFoundException: http://localhost:54321/_this_does_not_exists_ + at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/sun/net/www/protocol/http/HttpURLConnection.class] + at java.net.URL.openStream(URL.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URL.class] + at Test.readFromURL(Test.java:237) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:475) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.net.MalformedURLException exception in thread "main" in a method java.net.URL.() with signature (Ljava/net/URL;Ljava/lang/String;Ljava/net/URLStreamHandler;)V ++Caught exception java.net.MalformedURLException in method java.net.URL.() + Exception in thread "main" java.net.MalformedURLException: no protocol: @#$%^&malformed URL@#$%^&*() + at java.net.URL.(URL.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URL.class] + at java.net.URL.(URL.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URL.class] +@@ -101,32 +101,32 @@ Exception in thread "main" java.net.MalformedURLException: no protocol: @#$%^&ma + at Test.malformedURL(Test.java:194) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:476) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.ArrayIndexOutOfBoundsException exception in thread "main" in a method Test.throwIndexOutOfBoundsException() with signature ()V ++Caught exception java.lang.ArrayIndexOutOfBoundsException in method Test.throwIndexOutOfBoundsException() + Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 42 + at Test.throwIndexOutOfBoundsException(Test.java:266) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchIndexOutOfBoundsException(Test.java:347) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:486) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.StringIndexOutOfBoundsException exception in thread "main" in a method java.lang.String.charAt() with signature (I)C ++Caught exception java.lang.StringIndexOutOfBoundsException in method java.lang.String.charAt() + Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1 + at java.lang.String.charAt(String.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/String.class] + at Test.throwStringIndexOutOfBoundsException(Test.java:278) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchStringIndexOutOfBoundsException(Test.java:362) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:487) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.NullPointerException exception in thread "main" in a method Test.throwNullPointerException() with signature ()V ++Caught exception java.lang.NullPointerException in method Test.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at Test.throwNullPointerException(Test.java:290) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchNullPointerException(Test.java:377) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:488) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.ClassCastException exception in thread "main" in a method Test.throwClassCastException() with signature ()V ++Caught exception java.lang.ClassCastException in method Test.throwClassCastException() + Exception in thread "main" java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String + at Test.throwClassCastException(Test.java:302) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchClassCastException(Test.java:392) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:489) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.UnsatisfiedLinkError exception in thread "main" in a method java.lang.Runtime.load0() with signature (Ljava/lang/Class;Ljava/lang/String;)V ++Caught exception java.lang.UnsatisfiedLinkError in method java.lang.Runtime.load0() + Exception in thread "main" java.lang.UnsatisfiedLinkError: Expecting an absolute path of the library: xyzzy + at java.lang.Runtime.load0(Runtime.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Runtime.class] + at java.lang.System.load(System.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/System.class] +@@ -134,7 +134,7 @@ Exception in thread "main" java.lang.UnsatisfiedLinkError: Expecting an absolute + at Test.catchUnsatisfiedLinkErrorUserLibrary(Test.java:422) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:491) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.UnsatisfiedLinkError exception in thread "main" in a method java.lang.ClassLoader.loadLibrary() with signature (Ljava/lang/Class;Ljava/lang/String;Z)V ++Caught exception java.lang.UnsatisfiedLinkError in method java.lang.ClassLoader.loadLibrary() + Exception in thread "main" java.lang.UnsatisfiedLinkError: no xyzzy in java.library.path + at java.lang.ClassLoader.loadLibrary(ClassLoader.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/ClassLoader.class] + at java.lang.Runtime.loadLibrary0(Runtime.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Runtime.class] +@@ -143,7 +143,7 @@ Exception in thread "main" java.lang.UnsatisfiedLinkError: no xyzzy in java.libr + at Test.catchUnsatisfiedLinkErrorSystemLibrary(Test.java:437) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:492) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Uncaught java.lang.NullPointerException exception in thread "main" in a method Test.throwNullPointerException() with signature ()V ++Uncaught exception java.lang.NullPointerException in method Test.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at Test.throwNullPointerException(Test.java:290) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndDontCatchException(Test.java:501) [file:@CMAKE_BINARY_DIR@/test/Test.class] +diff --git a/test/outputs/Linux-ppc/run_test.log.in b/test/outputs/Linux-ppc/run_test.log.in +index 768ff41..5c9e7f7 100644 +--- a/test/outputs/Linux-ppc/run_test.log.in ++++ b/test/outputs/Linux-ppc/run_test.log.in +@@ -1,18 +1,18 @@ +-Caught java.io.FileNotFoundException exception in thread "main" in a method java.io.FileInputStream.() with signature (Ljava/io/File;)V ++Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.() + Exception in thread "main" java.io.FileNotFoundException: _wrong_file_ (No such file or directory) + at java.io.FileInputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] + at java.io.FileInputStream.(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] + at Test.readWrongFile(Test.java:89) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:461) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.io.FileNotFoundException exception in thread "main" in a method java.io.FileInputStream.() with signature (Ljava/io/File;)V ++Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.() + Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied) + at java.io.FileInputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] + at java.io.FileInputStream.(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] + at Test.readUnreadableFile(Test.java:111) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:462) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.io.FileNotFoundException exception in thread "main" in a method java.io.FileOutputStream.() with signature (Ljava/io/File;Z)V ++Caught exception java.io.FileNotFoundException in method java.io.FileOutputStream.() + Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied) + at java.io.FileOutputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class] + at java.io.FileOutputStream.(FileOutputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class] +@@ -20,7 +20,7 @@ Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permiss + at Test.writeToUnwritableFile(Test.java:134) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:463) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.NumberFormatException exception in thread "main" in a method java.lang.Integer.parseInt() with signature (Ljava/lang/String;I)I ++Caught exception java.lang.NumberFormatException in method java.lang.Integer.parseInt() + Exception in thread "main" java.lang.NumberFormatException: null + at java.lang.Integer.parseInt(Integer.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Integer.class] + at java.lang.Integer.(Integer.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Integer.class] +@@ -38,7 +38,7 @@ Exception in thread "main" java.lang.NumberFormatException: null + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.net.UnknownHostException exception in thread "main" in a method java.net.InetAddress$1.lookupAllHostAddr() with signature (Ljava/lang/String;)[Ljava/net/InetAddress; ++Caught exception java.net.UnknownHostException in method java.net.InetAddress$1.lookupAllHostAddr() + Exception in thread "main" java.net.UnknownHostException: xyzzy: Name or service not known + at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/Inet6AddressImpl.class] + at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/InetAddress$1.class] +@@ -52,7 +52,7 @@ Exception in thread "main" java.net.UnknownHostException: xyzzy: Name or service + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.net.UnknownHostException exception in thread "main" in a method java.net.AbstractPlainSocketImpl.connect() with signature (Ljava/net/SocketAddress;I)V ++Caught exception java.net.UnknownHostException in method java.net.AbstractPlainSocketImpl.connect() + Exception in thread "main" java.net.UnknownHostException: xyzzy + at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/AbstractPlainSocketImpl.class] + at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/SocksSocketImpl.class] +@@ -63,7 +63,7 @@ Exception in thread "main" java.net.UnknownHostException: xyzzy + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.net.ConnectException exception in thread "main" in a method java.net.AbstractPlainSocketImpl.doConnect() with signature (Ljava/net/InetAddress;II)V ++Caught exception java.net.ConnectException in method java.net.AbstractPlainSocketImpl.doConnect() + Exception in thread "main" java.net.ConnectException: Connection refused + at java.net.PlainSocketImpl.socketConnect(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/PlainSocketImpl.class] + at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/AbstractPlainSocketImpl.class] +@@ -77,7 +77,7 @@ Exception in thread "main" java.net.ConnectException: Connection refused + at Test.readFromSocket(Test.java:177) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:474) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.NumberFormatException exception in thread "main" in a method java.lang.Long.parseLong() with signature (Ljava/lang/String;I)J ++Caught exception java.lang.NumberFormatException in method java.lang.Long.parseLong() + Exception in thread "main" java.lang.NumberFormatException: null + at java.lang.Long.parseLong(Long.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Long.class] + at java.lang.Long.parseLong(Long.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Long.class] +@@ -86,14 +86,14 @@ Exception in thread "main" java.lang.NumberFormatException: null + at Test.readFromURL(Test.java:237) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:475) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.io.FileNotFoundException exception in thread "main" in a method sun.net.www.protocol.http.HttpURLConnection.getInputStream() with signature ()Ljava/io/InputStream; ++Caught exception java.io.FileNotFoundException in method sun.net.www.protocol.http.HttpURLConnection.getInputStream() + Exception in thread "main" java.io.FileNotFoundException: http://localhost:54321/_this_does_not_exists_ + at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/sun/net/www/protocol/http/HttpURLConnection.class] + at java.net.URL.openStream(URL.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URL.class] + at Test.readFromURL(Test.java:237) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:475) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.net.MalformedURLException exception in thread "main" in a method java.net.URL.() with signature (Ljava/net/URL;Ljava/lang/String;Ljava/net/URLStreamHandler;)V ++Caught exception java.net.MalformedURLException in method java.net.URL.() + Exception in thread "main" java.net.MalformedURLException: no protocol: @#$%^&malformed URL@#$%^&*() + at java.net.URL.(URL.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URL.class] + at java.net.URL.(URL.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URL.class] +@@ -101,32 +101,32 @@ Exception in thread "main" java.net.MalformedURLException: no protocol: @#$%^&ma + at Test.malformedURL(Test.java:194) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:476) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.ArrayIndexOutOfBoundsException exception in thread "main" in a method Test.throwIndexOutOfBoundsException() with signature ()V ++Caught exception java.lang.ArrayIndexOutOfBoundsException in method Test.throwIndexOutOfBoundsException() + Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 42 + at Test.throwIndexOutOfBoundsException(Test.java:266) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchIndexOutOfBoundsException(Test.java:347) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:486) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.StringIndexOutOfBoundsException exception in thread "main" in a method java.lang.String.charAt() with signature (I)C ++Caught exception java.lang.StringIndexOutOfBoundsException in method java.lang.String.charAt() + Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1 + at java.lang.String.charAt(String.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/String.class] + at Test.throwStringIndexOutOfBoundsException(Test.java:278) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchStringIndexOutOfBoundsException(Test.java:362) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:487) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.NullPointerException exception in thread "main" in a method Test.throwNullPointerException() with signature ()V ++Caught exception java.lang.NullPointerException in method Test.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at Test.throwNullPointerException(Test.java:290) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchNullPointerException(Test.java:377) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:488) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.ClassCastException exception in thread "main" in a method Test.throwClassCastException() with signature ()V ++Caught exception java.lang.ClassCastException in method Test.throwClassCastException() + Exception in thread "main" java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String + at Test.throwClassCastException(Test.java:302) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchClassCastException(Test.java:392) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:489) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.UnsatisfiedLinkError exception in thread "main" in a method java.lang.Runtime.load0() with signature (Ljava/lang/Class;Ljava/lang/String;)V ++Caught exception java.lang.UnsatisfiedLinkError in method java.lang.Runtime.load0() + Exception in thread "main" java.lang.UnsatisfiedLinkError: Expecting an absolute path of the library: xyzzy + at java.lang.Runtime.load0(Runtime.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Runtime.class] + at java.lang.System.load(System.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/System.class] +@@ -134,7 +134,7 @@ Exception in thread "main" java.lang.UnsatisfiedLinkError: Expecting an absolute + at Test.catchUnsatisfiedLinkErrorUserLibrary(Test.java:422) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:491) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.UnsatisfiedLinkError exception in thread "main" in a method java.lang.ClassLoader.loadLibrary() with signature (Ljava/lang/Class;Ljava/lang/String;Z)V ++Caught exception java.lang.UnsatisfiedLinkError in method java.lang.ClassLoader.loadLibrary() + Exception in thread "main" java.lang.UnsatisfiedLinkError: no xyzzy in java.library.path + at java.lang.ClassLoader.loadLibrary(ClassLoader.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/ClassLoader.class] + at java.lang.Runtime.loadLibrary0(Runtime.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Runtime.class] +@@ -143,7 +143,7 @@ Exception in thread "main" java.lang.UnsatisfiedLinkError: no xyzzy in java.libr + at Test.catchUnsatisfiedLinkErrorSystemLibrary(Test.java:437) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:492) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Uncaught java.lang.NullPointerException exception in thread "main" in a method Test.throwNullPointerException() with signature ()V ++Uncaught exception java.lang.NullPointerException in method Test.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at Test.throwNullPointerException(Test.java:290) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndDontCatchException(Test.java:501) [file:@CMAKE_BINARY_DIR@/test/Test.class] +diff --git a/test/outputs/Linux-ppc64/run_test.log.in b/test/outputs/Linux-ppc64/run_test.log.in +index 768ff41..5c9e7f7 100644 +--- a/test/outputs/Linux-ppc64/run_test.log.in ++++ b/test/outputs/Linux-ppc64/run_test.log.in +@@ -1,18 +1,18 @@ +-Caught java.io.FileNotFoundException exception in thread "main" in a method java.io.FileInputStream.() with signature (Ljava/io/File;)V ++Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.() + Exception in thread "main" java.io.FileNotFoundException: _wrong_file_ (No such file or directory) + at java.io.FileInputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] + at java.io.FileInputStream.(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] + at Test.readWrongFile(Test.java:89) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:461) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.io.FileNotFoundException exception in thread "main" in a method java.io.FileInputStream.() with signature (Ljava/io/File;)V ++Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.() + Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied) + at java.io.FileInputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] + at java.io.FileInputStream.(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] + at Test.readUnreadableFile(Test.java:111) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:462) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.io.FileNotFoundException exception in thread "main" in a method java.io.FileOutputStream.() with signature (Ljava/io/File;Z)V ++Caught exception java.io.FileNotFoundException in method java.io.FileOutputStream.() + Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied) + at java.io.FileOutputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class] + at java.io.FileOutputStream.(FileOutputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class] +@@ -20,7 +20,7 @@ Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permiss + at Test.writeToUnwritableFile(Test.java:134) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:463) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.NumberFormatException exception in thread "main" in a method java.lang.Integer.parseInt() with signature (Ljava/lang/String;I)I ++Caught exception java.lang.NumberFormatException in method java.lang.Integer.parseInt() + Exception in thread "main" java.lang.NumberFormatException: null + at java.lang.Integer.parseInt(Integer.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Integer.class] + at java.lang.Integer.(Integer.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Integer.class] +@@ -38,7 +38,7 @@ Exception in thread "main" java.lang.NumberFormatException: null + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.net.UnknownHostException exception in thread "main" in a method java.net.InetAddress$1.lookupAllHostAddr() with signature (Ljava/lang/String;)[Ljava/net/InetAddress; ++Caught exception java.net.UnknownHostException in method java.net.InetAddress$1.lookupAllHostAddr() + Exception in thread "main" java.net.UnknownHostException: xyzzy: Name or service not known + at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/Inet6AddressImpl.class] + at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/InetAddress$1.class] +@@ -52,7 +52,7 @@ Exception in thread "main" java.net.UnknownHostException: xyzzy: Name or service + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.net.UnknownHostException exception in thread "main" in a method java.net.AbstractPlainSocketImpl.connect() with signature (Ljava/net/SocketAddress;I)V ++Caught exception java.net.UnknownHostException in method java.net.AbstractPlainSocketImpl.connect() + Exception in thread "main" java.net.UnknownHostException: xyzzy + at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/AbstractPlainSocketImpl.class] + at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/SocksSocketImpl.class] +@@ -63,7 +63,7 @@ Exception in thread "main" java.net.UnknownHostException: xyzzy + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.net.ConnectException exception in thread "main" in a method java.net.AbstractPlainSocketImpl.doConnect() with signature (Ljava/net/InetAddress;II)V ++Caught exception java.net.ConnectException in method java.net.AbstractPlainSocketImpl.doConnect() + Exception in thread "main" java.net.ConnectException: Connection refused + at java.net.PlainSocketImpl.socketConnect(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/PlainSocketImpl.class] + at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/AbstractPlainSocketImpl.class] +@@ -77,7 +77,7 @@ Exception in thread "main" java.net.ConnectException: Connection refused + at Test.readFromSocket(Test.java:177) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:474) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.NumberFormatException exception in thread "main" in a method java.lang.Long.parseLong() with signature (Ljava/lang/String;I)J ++Caught exception java.lang.NumberFormatException in method java.lang.Long.parseLong() + Exception in thread "main" java.lang.NumberFormatException: null + at java.lang.Long.parseLong(Long.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Long.class] + at java.lang.Long.parseLong(Long.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Long.class] +@@ -86,14 +86,14 @@ Exception in thread "main" java.lang.NumberFormatException: null + at Test.readFromURL(Test.java:237) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:475) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.io.FileNotFoundException exception in thread "main" in a method sun.net.www.protocol.http.HttpURLConnection.getInputStream() with signature ()Ljava/io/InputStream; ++Caught exception java.io.FileNotFoundException in method sun.net.www.protocol.http.HttpURLConnection.getInputStream() + Exception in thread "main" java.io.FileNotFoundException: http://localhost:54321/_this_does_not_exists_ + at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/sun/net/www/protocol/http/HttpURLConnection.class] + at java.net.URL.openStream(URL.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URL.class] + at Test.readFromURL(Test.java:237) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:475) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.net.MalformedURLException exception in thread "main" in a method java.net.URL.() with signature (Ljava/net/URL;Ljava/lang/String;Ljava/net/URLStreamHandler;)V ++Caught exception java.net.MalformedURLException in method java.net.URL.() + Exception in thread "main" java.net.MalformedURLException: no protocol: @#$%^&malformed URL@#$%^&*() + at java.net.URL.(URL.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URL.class] + at java.net.URL.(URL.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URL.class] +@@ -101,32 +101,32 @@ Exception in thread "main" java.net.MalformedURLException: no protocol: @#$%^&ma + at Test.malformedURL(Test.java:194) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:476) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.ArrayIndexOutOfBoundsException exception in thread "main" in a method Test.throwIndexOutOfBoundsException() with signature ()V ++Caught exception java.lang.ArrayIndexOutOfBoundsException in method Test.throwIndexOutOfBoundsException() + Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 42 + at Test.throwIndexOutOfBoundsException(Test.java:266) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchIndexOutOfBoundsException(Test.java:347) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:486) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.StringIndexOutOfBoundsException exception in thread "main" in a method java.lang.String.charAt() with signature (I)C ++Caught exception java.lang.StringIndexOutOfBoundsException in method java.lang.String.charAt() + Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1 + at java.lang.String.charAt(String.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/String.class] + at Test.throwStringIndexOutOfBoundsException(Test.java:278) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchStringIndexOutOfBoundsException(Test.java:362) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:487) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.NullPointerException exception in thread "main" in a method Test.throwNullPointerException() with signature ()V ++Caught exception java.lang.NullPointerException in method Test.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at Test.throwNullPointerException(Test.java:290) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchNullPointerException(Test.java:377) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:488) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.ClassCastException exception in thread "main" in a method Test.throwClassCastException() with signature ()V ++Caught exception java.lang.ClassCastException in method Test.throwClassCastException() + Exception in thread "main" java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String + at Test.throwClassCastException(Test.java:302) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchClassCastException(Test.java:392) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:489) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.UnsatisfiedLinkError exception in thread "main" in a method java.lang.Runtime.load0() with signature (Ljava/lang/Class;Ljava/lang/String;)V ++Caught exception java.lang.UnsatisfiedLinkError in method java.lang.Runtime.load0() + Exception in thread "main" java.lang.UnsatisfiedLinkError: Expecting an absolute path of the library: xyzzy + at java.lang.Runtime.load0(Runtime.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Runtime.class] + at java.lang.System.load(System.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/System.class] +@@ -134,7 +134,7 @@ Exception in thread "main" java.lang.UnsatisfiedLinkError: Expecting an absolute + at Test.catchUnsatisfiedLinkErrorUserLibrary(Test.java:422) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:491) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.UnsatisfiedLinkError exception in thread "main" in a method java.lang.ClassLoader.loadLibrary() with signature (Ljava/lang/Class;Ljava/lang/String;Z)V ++Caught exception java.lang.UnsatisfiedLinkError in method java.lang.ClassLoader.loadLibrary() + Exception in thread "main" java.lang.UnsatisfiedLinkError: no xyzzy in java.library.path + at java.lang.ClassLoader.loadLibrary(ClassLoader.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/ClassLoader.class] + at java.lang.Runtime.loadLibrary0(Runtime.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Runtime.class] +@@ -143,7 +143,7 @@ Exception in thread "main" java.lang.UnsatisfiedLinkError: no xyzzy in java.libr + at Test.catchUnsatisfiedLinkErrorSystemLibrary(Test.java:437) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:492) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Uncaught java.lang.NullPointerException exception in thread "main" in a method Test.throwNullPointerException() with signature ()V ++Uncaught exception java.lang.NullPointerException in method Test.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at Test.throwNullPointerException(Test.java:290) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndDontCatchException(Test.java:501) [file:@CMAKE_BINARY_DIR@/test/Test.class] +diff --git a/test/outputs/Linux-s390/run_test.log.in b/test/outputs/Linux-s390/run_test.log.in +index 768ff41..5c9e7f7 100644 +--- a/test/outputs/Linux-s390/run_test.log.in ++++ b/test/outputs/Linux-s390/run_test.log.in +@@ -1,18 +1,18 @@ +-Caught java.io.FileNotFoundException exception in thread "main" in a method java.io.FileInputStream.() with signature (Ljava/io/File;)V ++Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.() + Exception in thread "main" java.io.FileNotFoundException: _wrong_file_ (No such file or directory) + at java.io.FileInputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] + at java.io.FileInputStream.(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] + at Test.readWrongFile(Test.java:89) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:461) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.io.FileNotFoundException exception in thread "main" in a method java.io.FileInputStream.() with signature (Ljava/io/File;)V ++Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.() + Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied) + at java.io.FileInputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] + at java.io.FileInputStream.(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] + at Test.readUnreadableFile(Test.java:111) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:462) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.io.FileNotFoundException exception in thread "main" in a method java.io.FileOutputStream.() with signature (Ljava/io/File;Z)V ++Caught exception java.io.FileNotFoundException in method java.io.FileOutputStream.() + Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied) + at java.io.FileOutputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class] + at java.io.FileOutputStream.(FileOutputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class] +@@ -20,7 +20,7 @@ Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permiss + at Test.writeToUnwritableFile(Test.java:134) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:463) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.NumberFormatException exception in thread "main" in a method java.lang.Integer.parseInt() with signature (Ljava/lang/String;I)I ++Caught exception java.lang.NumberFormatException in method java.lang.Integer.parseInt() + Exception in thread "main" java.lang.NumberFormatException: null + at java.lang.Integer.parseInt(Integer.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Integer.class] + at java.lang.Integer.(Integer.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Integer.class] +@@ -38,7 +38,7 @@ Exception in thread "main" java.lang.NumberFormatException: null + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.net.UnknownHostException exception in thread "main" in a method java.net.InetAddress$1.lookupAllHostAddr() with signature (Ljava/lang/String;)[Ljava/net/InetAddress; ++Caught exception java.net.UnknownHostException in method java.net.InetAddress$1.lookupAllHostAddr() + Exception in thread "main" java.net.UnknownHostException: xyzzy: Name or service not known + at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/Inet6AddressImpl.class] + at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/InetAddress$1.class] +@@ -52,7 +52,7 @@ Exception in thread "main" java.net.UnknownHostException: xyzzy: Name or service + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.net.UnknownHostException exception in thread "main" in a method java.net.AbstractPlainSocketImpl.connect() with signature (Ljava/net/SocketAddress;I)V ++Caught exception java.net.UnknownHostException in method java.net.AbstractPlainSocketImpl.connect() + Exception in thread "main" java.net.UnknownHostException: xyzzy + at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/AbstractPlainSocketImpl.class] + at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/SocksSocketImpl.class] +@@ -63,7 +63,7 @@ Exception in thread "main" java.net.UnknownHostException: xyzzy + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.net.ConnectException exception in thread "main" in a method java.net.AbstractPlainSocketImpl.doConnect() with signature (Ljava/net/InetAddress;II)V ++Caught exception java.net.ConnectException in method java.net.AbstractPlainSocketImpl.doConnect() + Exception in thread "main" java.net.ConnectException: Connection refused + at java.net.PlainSocketImpl.socketConnect(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/PlainSocketImpl.class] + at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/AbstractPlainSocketImpl.class] +@@ -77,7 +77,7 @@ Exception in thread "main" java.net.ConnectException: Connection refused + at Test.readFromSocket(Test.java:177) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:474) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.NumberFormatException exception in thread "main" in a method java.lang.Long.parseLong() with signature (Ljava/lang/String;I)J ++Caught exception java.lang.NumberFormatException in method java.lang.Long.parseLong() + Exception in thread "main" java.lang.NumberFormatException: null + at java.lang.Long.parseLong(Long.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Long.class] + at java.lang.Long.parseLong(Long.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Long.class] +@@ -86,14 +86,14 @@ Exception in thread "main" java.lang.NumberFormatException: null + at Test.readFromURL(Test.java:237) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:475) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.io.FileNotFoundException exception in thread "main" in a method sun.net.www.protocol.http.HttpURLConnection.getInputStream() with signature ()Ljava/io/InputStream; ++Caught exception java.io.FileNotFoundException in method sun.net.www.protocol.http.HttpURLConnection.getInputStream() + Exception in thread "main" java.io.FileNotFoundException: http://localhost:54321/_this_does_not_exists_ + at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/sun/net/www/protocol/http/HttpURLConnection.class] + at java.net.URL.openStream(URL.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URL.class] + at Test.readFromURL(Test.java:237) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:475) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.net.MalformedURLException exception in thread "main" in a method java.net.URL.() with signature (Ljava/net/URL;Ljava/lang/String;Ljava/net/URLStreamHandler;)V ++Caught exception java.net.MalformedURLException in method java.net.URL.() + Exception in thread "main" java.net.MalformedURLException: no protocol: @#$%^&malformed URL@#$%^&*() + at java.net.URL.(URL.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URL.class] + at java.net.URL.(URL.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URL.class] +@@ -101,32 +101,32 @@ Exception in thread "main" java.net.MalformedURLException: no protocol: @#$%^&ma + at Test.malformedURL(Test.java:194) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:476) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.ArrayIndexOutOfBoundsException exception in thread "main" in a method Test.throwIndexOutOfBoundsException() with signature ()V ++Caught exception java.lang.ArrayIndexOutOfBoundsException in method Test.throwIndexOutOfBoundsException() + Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 42 + at Test.throwIndexOutOfBoundsException(Test.java:266) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchIndexOutOfBoundsException(Test.java:347) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:486) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.StringIndexOutOfBoundsException exception in thread "main" in a method java.lang.String.charAt() with signature (I)C ++Caught exception java.lang.StringIndexOutOfBoundsException in method java.lang.String.charAt() + Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1 + at java.lang.String.charAt(String.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/String.class] + at Test.throwStringIndexOutOfBoundsException(Test.java:278) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchStringIndexOutOfBoundsException(Test.java:362) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:487) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.NullPointerException exception in thread "main" in a method Test.throwNullPointerException() with signature ()V ++Caught exception java.lang.NullPointerException in method Test.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at Test.throwNullPointerException(Test.java:290) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchNullPointerException(Test.java:377) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:488) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.ClassCastException exception in thread "main" in a method Test.throwClassCastException() with signature ()V ++Caught exception java.lang.ClassCastException in method Test.throwClassCastException() + Exception in thread "main" java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String + at Test.throwClassCastException(Test.java:302) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchClassCastException(Test.java:392) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:489) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.UnsatisfiedLinkError exception in thread "main" in a method java.lang.Runtime.load0() with signature (Ljava/lang/Class;Ljava/lang/String;)V ++Caught exception java.lang.UnsatisfiedLinkError in method java.lang.Runtime.load0() + Exception in thread "main" java.lang.UnsatisfiedLinkError: Expecting an absolute path of the library: xyzzy + at java.lang.Runtime.load0(Runtime.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Runtime.class] + at java.lang.System.load(System.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/System.class] +@@ -134,7 +134,7 @@ Exception in thread "main" java.lang.UnsatisfiedLinkError: Expecting an absolute + at Test.catchUnsatisfiedLinkErrorUserLibrary(Test.java:422) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:491) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.UnsatisfiedLinkError exception in thread "main" in a method java.lang.ClassLoader.loadLibrary() with signature (Ljava/lang/Class;Ljava/lang/String;Z)V ++Caught exception java.lang.UnsatisfiedLinkError in method java.lang.ClassLoader.loadLibrary() + Exception in thread "main" java.lang.UnsatisfiedLinkError: no xyzzy in java.library.path + at java.lang.ClassLoader.loadLibrary(ClassLoader.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/ClassLoader.class] + at java.lang.Runtime.loadLibrary0(Runtime.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Runtime.class] +@@ -143,7 +143,7 @@ Exception in thread "main" java.lang.UnsatisfiedLinkError: no xyzzy in java.libr + at Test.catchUnsatisfiedLinkErrorSystemLibrary(Test.java:437) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:492) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Uncaught java.lang.NullPointerException exception in thread "main" in a method Test.throwNullPointerException() with signature ()V ++Uncaught exception java.lang.NullPointerException in method Test.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at Test.throwNullPointerException(Test.java:290) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndDontCatchException(Test.java:501) [file:@CMAKE_BINARY_DIR@/test/Test.class] +diff --git a/test/outputs/Linux-s390x/run_test.log.in b/test/outputs/Linux-s390x/run_test.log.in +index 768ff41..5c9e7f7 100644 +--- a/test/outputs/Linux-s390x/run_test.log.in ++++ b/test/outputs/Linux-s390x/run_test.log.in +@@ -1,18 +1,18 @@ +-Caught java.io.FileNotFoundException exception in thread "main" in a method java.io.FileInputStream.() with signature (Ljava/io/File;)V ++Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.() + Exception in thread "main" java.io.FileNotFoundException: _wrong_file_ (No such file or directory) + at java.io.FileInputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] + at java.io.FileInputStream.(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] + at Test.readWrongFile(Test.java:89) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:461) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.io.FileNotFoundException exception in thread "main" in a method java.io.FileInputStream.() with signature (Ljava/io/File;)V ++Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.() + Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied) + at java.io.FileInputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] + at java.io.FileInputStream.(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] + at Test.readUnreadableFile(Test.java:111) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:462) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.io.FileNotFoundException exception in thread "main" in a method java.io.FileOutputStream.() with signature (Ljava/io/File;Z)V ++Caught exception java.io.FileNotFoundException in method java.io.FileOutputStream.() + Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied) + at java.io.FileOutputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class] + at java.io.FileOutputStream.(FileOutputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class] +@@ -20,7 +20,7 @@ Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permiss + at Test.writeToUnwritableFile(Test.java:134) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:463) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.NumberFormatException exception in thread "main" in a method java.lang.Integer.parseInt() with signature (Ljava/lang/String;I)I ++Caught exception java.lang.NumberFormatException in method java.lang.Integer.parseInt() + Exception in thread "main" java.lang.NumberFormatException: null + at java.lang.Integer.parseInt(Integer.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Integer.class] + at java.lang.Integer.(Integer.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Integer.class] +@@ -38,7 +38,7 @@ Exception in thread "main" java.lang.NumberFormatException: null + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.net.UnknownHostException exception in thread "main" in a method java.net.InetAddress$1.lookupAllHostAddr() with signature (Ljava/lang/String;)[Ljava/net/InetAddress; ++Caught exception java.net.UnknownHostException in method java.net.InetAddress$1.lookupAllHostAddr() + Exception in thread "main" java.net.UnknownHostException: xyzzy: Name or service not known + at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/Inet6AddressImpl.class] + at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/InetAddress$1.class] +@@ -52,7 +52,7 @@ Exception in thread "main" java.net.UnknownHostException: xyzzy: Name or service + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.net.UnknownHostException exception in thread "main" in a method java.net.AbstractPlainSocketImpl.connect() with signature (Ljava/net/SocketAddress;I)V ++Caught exception java.net.UnknownHostException in method java.net.AbstractPlainSocketImpl.connect() + Exception in thread "main" java.net.UnknownHostException: xyzzy + at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/AbstractPlainSocketImpl.class] + at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/SocksSocketImpl.class] +@@ -63,7 +63,7 @@ Exception in thread "main" java.net.UnknownHostException: xyzzy + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.net.ConnectException exception in thread "main" in a method java.net.AbstractPlainSocketImpl.doConnect() with signature (Ljava/net/InetAddress;II)V ++Caught exception java.net.ConnectException in method java.net.AbstractPlainSocketImpl.doConnect() + Exception in thread "main" java.net.ConnectException: Connection refused + at java.net.PlainSocketImpl.socketConnect(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/PlainSocketImpl.class] + at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/AbstractPlainSocketImpl.class] +@@ -77,7 +77,7 @@ Exception in thread "main" java.net.ConnectException: Connection refused + at Test.readFromSocket(Test.java:177) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:474) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.NumberFormatException exception in thread "main" in a method java.lang.Long.parseLong() with signature (Ljava/lang/String;I)J ++Caught exception java.lang.NumberFormatException in method java.lang.Long.parseLong() + Exception in thread "main" java.lang.NumberFormatException: null + at java.lang.Long.parseLong(Long.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Long.class] + at java.lang.Long.parseLong(Long.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Long.class] +@@ -86,14 +86,14 @@ Exception in thread "main" java.lang.NumberFormatException: null + at Test.readFromURL(Test.java:237) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:475) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.io.FileNotFoundException exception in thread "main" in a method sun.net.www.protocol.http.HttpURLConnection.getInputStream() with signature ()Ljava/io/InputStream; ++Caught exception java.io.FileNotFoundException in method sun.net.www.protocol.http.HttpURLConnection.getInputStream() + Exception in thread "main" java.io.FileNotFoundException: http://localhost:54321/_this_does_not_exists_ + at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/sun/net/www/protocol/http/HttpURLConnection.class] + at java.net.URL.openStream(URL.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URL.class] + at Test.readFromURL(Test.java:237) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:475) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.net.MalformedURLException exception in thread "main" in a method java.net.URL.() with signature (Ljava/net/URL;Ljava/lang/String;Ljava/net/URLStreamHandler;)V ++Caught exception java.net.MalformedURLException in method java.net.URL.() + Exception in thread "main" java.net.MalformedURLException: no protocol: @#$%^&malformed URL@#$%^&*() + at java.net.URL.(URL.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URL.class] + at java.net.URL.(URL.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URL.class] +@@ -101,32 +101,32 @@ Exception in thread "main" java.net.MalformedURLException: no protocol: @#$%^&ma + at Test.malformedURL(Test.java:194) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:476) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.ArrayIndexOutOfBoundsException exception in thread "main" in a method Test.throwIndexOutOfBoundsException() with signature ()V ++Caught exception java.lang.ArrayIndexOutOfBoundsException in method Test.throwIndexOutOfBoundsException() + Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 42 + at Test.throwIndexOutOfBoundsException(Test.java:266) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchIndexOutOfBoundsException(Test.java:347) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:486) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.StringIndexOutOfBoundsException exception in thread "main" in a method java.lang.String.charAt() with signature (I)C ++Caught exception java.lang.StringIndexOutOfBoundsException in method java.lang.String.charAt() + Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1 + at java.lang.String.charAt(String.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/String.class] + at Test.throwStringIndexOutOfBoundsException(Test.java:278) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchStringIndexOutOfBoundsException(Test.java:362) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:487) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.NullPointerException exception in thread "main" in a method Test.throwNullPointerException() with signature ()V ++Caught exception java.lang.NullPointerException in method Test.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at Test.throwNullPointerException(Test.java:290) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchNullPointerException(Test.java:377) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:488) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.ClassCastException exception in thread "main" in a method Test.throwClassCastException() with signature ()V ++Caught exception java.lang.ClassCastException in method Test.throwClassCastException() + Exception in thread "main" java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String + at Test.throwClassCastException(Test.java:302) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchClassCastException(Test.java:392) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:489) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.UnsatisfiedLinkError exception in thread "main" in a method java.lang.Runtime.load0() with signature (Ljava/lang/Class;Ljava/lang/String;)V ++Caught exception java.lang.UnsatisfiedLinkError in method java.lang.Runtime.load0() + Exception in thread "main" java.lang.UnsatisfiedLinkError: Expecting an absolute path of the library: xyzzy + at java.lang.Runtime.load0(Runtime.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Runtime.class] + at java.lang.System.load(System.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/System.class] +@@ -134,7 +134,7 @@ Exception in thread "main" java.lang.UnsatisfiedLinkError: Expecting an absolute + at Test.catchUnsatisfiedLinkErrorUserLibrary(Test.java:422) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:491) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.UnsatisfiedLinkError exception in thread "main" in a method java.lang.ClassLoader.loadLibrary() with signature (Ljava/lang/Class;Ljava/lang/String;Z)V ++Caught exception java.lang.UnsatisfiedLinkError in method java.lang.ClassLoader.loadLibrary() + Exception in thread "main" java.lang.UnsatisfiedLinkError: no xyzzy in java.library.path + at java.lang.ClassLoader.loadLibrary(ClassLoader.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/ClassLoader.class] + at java.lang.Runtime.loadLibrary0(Runtime.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Runtime.class] +@@ -143,7 +143,7 @@ Exception in thread "main" java.lang.UnsatisfiedLinkError: no xyzzy in java.libr + at Test.catchUnsatisfiedLinkErrorSystemLibrary(Test.java:437) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:492) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Uncaught java.lang.NullPointerException exception in thread "main" in a method Test.throwNullPointerException() with signature ()V ++Uncaught exception java.lang.NullPointerException in method Test.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at Test.throwNullPointerException(Test.java:290) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndDontCatchException(Test.java:501) [file:@CMAKE_BINARY_DIR@/test/Test.class] +diff --git a/test/outputs/run.log.in b/test/outputs/run.log.in +index 8ab7269..4dc5c62 100644 +--- a/test/outputs/run.log.in ++++ b/test/outputs/run.log.in +@@ -1,10 +1,10 @@ +-Caught java.lang.ArrayIndexOutOfBoundsException exception in thread "main" in a method SimpleTest.throwIndexOutOfBoundsException() with signature ()V ++Caught exception java.lang.ArrayIndexOutOfBoundsException in method SimpleTest.throwIndexOutOfBoundsException() + Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 42 + at SimpleTest.throwIndexOutOfBoundsException(SimpleTest.java:24) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] + at SimpleTest.catchIndexOutOfBoundsException(SimpleTest.java:47) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] + at SimpleTest.throwAndCatchAllExceptions(SimpleTest.java:61) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] + at SimpleTest.main(SimpleTest.java:81) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] +-Uncaught java.lang.NullPointerException exception in thread "main" in a method SimpleTest.throwNullPointerException() with signature ()V ++Uncaught exception java.lang.NullPointerException in method SimpleTest.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at SimpleTest.throwNullPointerException(SimpleTest.java:36) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] + at SimpleTest.throwAndDontCatchException(SimpleTest.java:71) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] +diff --git a/test/outputs/run_bad_class.log.in b/test/outputs/run_bad_class.log.in +index 237950b..a540d89 100644 +--- a/test/outputs/run_bad_class.log.in ++++ b/test/outputs/run_bad_class.log.in +@@ -1,4 +1,4 @@ +-Uncaught java.lang.ClassNotFoundException exception in thread "main" in a method java.lang.ClassLoader.loadClass() with signature (Ljava/lang/String;Z)Ljava/lang/Class; ++Uncaught exception java.lang.ClassNotFoundException in method java.lang.ClassLoader.loadClass() + Exception in thread "main" java.lang.ClassNotFoundException: foobar + at java.net.URLClassLoader$1.run(URLClassLoader.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URLClassLoader$1.class] + at java.net.URLClassLoader$1.run(URLClassLoader.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URLClassLoader$1.class] +diff --git a/test/outputs/run_inner.log.in b/test/outputs/run_inner.log.in +index 054456e..4789aeb 100644 +--- a/test/outputs/run_inner.log.in ++++ b/test/outputs/run_inner.log.in +@@ -1,11 +1,11 @@ +-Caught java.lang.ArrayIndexOutOfBoundsException exception in thread "main" in a method SimpleTest.throwIndexOutOfBoundsException() with signature ()V ++Caught exception java.lang.ArrayIndexOutOfBoundsException in method SimpleTest.throwIndexOutOfBoundsException() + Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 42 + at SimpleTest.throwIndexOutOfBoundsException(SimpleTest.java:24) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] + at SimpleTest.catchIndexOutOfBoundsException(SimpleTest.java:47) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] + at SimpleTest.throwAndCatchAllExceptions(SimpleTest.java:61) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] + at InnerExceptions.run(InnerExceptions.java:11) [file:@CMAKE_BINARY_DIR@/test/InnerExceptions.class] + at InnerExceptions.main(InnerExceptions.java:28) [file:@CMAKE_BINARY_DIR@/test/InnerExceptions.class] +-Uncaught java.lang.RuntimeException exception in thread "main" in a method InnerExceptions.run() with signature ()V ++Uncaught exception java.lang.RuntimeException in method InnerExceptions.run() + Exception in thread "main" java.lang.RuntimeException: java.lang.NullPointerException + at InnerExceptions.run(InnerExceptions.java:17) [file:@CMAKE_BINARY_DIR@/test/InnerExceptions.class] + at InnerExceptions.main(InnerExceptions.java:28) [file:@CMAKE_BINARY_DIR@/test/InnerExceptions.class] +diff --git a/test/outputs/run_jar.log.in b/test/outputs/run_jar.log.in +index f863306..6e10d2d 100644 +--- a/test/outputs/run_jar.log.in ++++ b/test/outputs/run_jar.log.in +@@ -1,10 +1,10 @@ +-Caught java.lang.ArrayIndexOutOfBoundsException exception in thread "main" in a method SimpleTest.throwIndexOutOfBoundsException() with signature ()V ++Caught exception java.lang.ArrayIndexOutOfBoundsException in method SimpleTest.throwIndexOutOfBoundsException() + Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 42 + at SimpleTest.throwIndexOutOfBoundsException(SimpleTest.java:24) [jar:file:@CMAKE_BINARY_DIR@/test/JarTest.jar!/SimpleTest.class] + at SimpleTest.catchIndexOutOfBoundsException(SimpleTest.java:47) [jar:file:@CMAKE_BINARY_DIR@/test/JarTest.jar!/SimpleTest.class] + at SimpleTest.throwAndCatchAllExceptions(SimpleTest.java:61) [jar:file:@CMAKE_BINARY_DIR@/test/JarTest.jar!/SimpleTest.class] + at SimpleTest.main(SimpleTest.java:81) [jar:file:@CMAKE_BINARY_DIR@/test/JarTest.jar!/SimpleTest.class] +-Uncaught java.lang.NullPointerException exception in thread "main" in a method SimpleTest.throwNullPointerException() with signature ()V ++Uncaught exception java.lang.NullPointerException in method SimpleTest.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at SimpleTest.throwNullPointerException(SimpleTest.java:36) [jar:file:@CMAKE_BINARY_DIR@/test/JarTest.jar!/SimpleTest.class] + at SimpleTest.throwAndDontCatchException(SimpleTest.java:71) [jar:file:@CMAKE_BINARY_DIR@/test/JarTest.jar!/SimpleTest.class] +diff --git a/test/outputs/run_missing_class_test.log.in b/test/outputs/run_missing_class_test.log.in +index 377d67a..df77057 100644 +--- a/test/outputs/run_missing_class_test.log.in ++++ b/test/outputs/run_missing_class_test.log.in +@@ -1,4 +1,4 @@ +-Uncaught java.lang.ClassNotFoundException exception in thread "main" in a method java.lang.ClassLoader.loadClass() with signature (Ljava/lang/String;Z)Ljava/lang/Class; ++Uncaught exception java.lang.ClassNotFoundException in method java.lang.ClassLoader.loadClass() + Exception in thread "main" java.lang.ClassNotFoundException: MissingClassTest + at java.net.URLClassLoader$1.run(URLClassLoader.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URLClassLoader$1.class] + at java.net.URLClassLoader$1.run(URLClassLoader.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URLClassLoader$1.class] +diff --git a/test/outputs/run_package.log.in b/test/outputs/run_package.log.in +index fd1f590..d8fbc79 100644 +--- a/test/outputs/run_package.log.in ++++ b/test/outputs/run_package.log.in +@@ -1,10 +1,10 @@ +-Caught java.lang.ArrayIndexOutOfBoundsException exception in thread "main" in a method com.redhat.abrt.test.Test.throwIndexOutOfBoundsException() with signature ()V ++Caught exception java.lang.ArrayIndexOutOfBoundsException in method com.redhat.abrt.test.Test.throwIndexOutOfBoundsException() + Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 42 + at com.redhat.abrt.test.Test.throwIndexOutOfBoundsException(Test.java:26) [file:@CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/Test.class] + at com.redhat.abrt.test.Test.catchIndexOutOfBoundsException(Test.java:49) [file:@CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/Test.class] + at com.redhat.abrt.test.Test.throwAndCatchAllExceptions(Test.java:63) [file:@CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/Test.class] + at com.redhat.abrt.test.Test.main(Test.java:82) [file:@CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/Test.class] +-Uncaught java.lang.NullPointerException exception in thread "main" in a method com.redhat.abrt.test.Test.throwNullPointerException() with signature ()V ++Uncaught exception java.lang.NullPointerException in method com.redhat.abrt.test.Test.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at com.redhat.abrt.test.Test.throwNullPointerException(Test.java:38) [file:@CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/Test.class] + at com.redhat.abrt.test.Test.throwAndDontCatchException(Test.java:72) [file:@CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/Test.class] +diff --git a/test/outputs/run_remote.log.in b/test/outputs/run_remote.log.in +index a3f93fe..a18e90d 100644 +--- a/test/outputs/run_remote.log.in ++++ b/test/outputs/run_remote.log.in +@@ -1,4 +1,4 @@ +-Caught java.lang.ArrayIndexOutOfBoundsException exception in thread "main" in a method SimpleTest.throwIndexOutOfBoundsException() with signature ()V ++Caught exception java.lang.ArrayIndexOutOfBoundsException in method SimpleTest.throwIndexOutOfBoundsException() + Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 42 + at SimpleTest.throwIndexOutOfBoundsException(SimpleTest.java:24) [jar:http://localhost:54321/JarTest.jar!/SimpleTest.class] + at SimpleTest.catchIndexOutOfBoundsException(SimpleTest.java:47) [jar:http://localhost:54321/JarTest.jar!/SimpleTest.class] +@@ -8,7 +8,7 @@ Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 42 + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/sun/reflect/DelegatingMethodAccessorImpl.class] + at java.lang.reflect.Method.invoke(Method.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/reflect/Method.class] + at RemoteTest.main(RemoteTest.java:83) [file:@CMAKE_BINARY_DIR@/test/RemoteTest.class] +-Uncaught java.lang.NullPointerException exception in thread "main" in a method SimpleTest.throwNullPointerException() with signature ()V ++Uncaught exception java.lang.NullPointerException in method SimpleTest.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at SimpleTest.throwNullPointerException(SimpleTest.java:36) [jar:http://localhost:54321/JarTest.jar!/SimpleTest.class] + at SimpleTest.throwAndDontCatchException(SimpleTest.java:71) [jar:http://localhost:54321/JarTest.jar!/SimpleTest.class] +diff --git a/test/outputs/run_test.log.in b/test/outputs/run_test.log.in +index 02970e8..95f477b 100644 +--- a/test/outputs/run_test.log.in ++++ b/test/outputs/run_test.log.in +@@ -1,18 +1,18 @@ +-Caught java.io.FileNotFoundException exception in thread "main" in a method java.io.FileInputStream.open() with signature (Ljava/lang/String;)V ++Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.open() + Exception in thread "main" java.io.FileNotFoundException: _wrong_file_ (No such file or directory) + at java.io.FileInputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] + at java.io.FileInputStream.(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] + at Test.readWrongFile(Test.java:89) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:461) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.io.FileNotFoundException exception in thread "main" in a method java.io.FileInputStream.open() with signature (Ljava/lang/String;)V ++Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.open() + Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied) + at java.io.FileInputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] + at java.io.FileInputStream.(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] + at Test.readUnreadableFile(Test.java:111) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:462) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.io.FileNotFoundException exception in thread "main" in a method java.io.FileOutputStream.open() with signature (Ljava/lang/String;Z)V ++Caught exception java.io.FileNotFoundException in method java.io.FileOutputStream.open() + Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied) + at java.io.FileOutputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class] + at java.io.FileOutputStream.(FileOutputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class] +@@ -20,7 +20,7 @@ Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permiss + at Test.writeToUnwritableFile(Test.java:134) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:463) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.NumberFormatException exception in thread "main" in a method java.lang.Integer.parseInt() with signature (Ljava/lang/String;I)I ++Caught exception java.lang.NumberFormatException in method java.lang.Integer.parseInt() + Exception in thread "main" java.lang.NumberFormatException: null + at java.lang.Integer.parseInt(Integer.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Integer.class] + at java.lang.Integer.(Integer.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Integer.class] +@@ -38,7 +38,7 @@ Exception in thread "main" java.lang.NumberFormatException: null + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.net.UnknownHostException exception in thread "main" in a method java.net.Inet6AddressImpl.lookupAllHostAddr() with signature (Ljava/lang/String;)[Ljava/net/InetAddress; ++Caught exception java.net.UnknownHostException in method java.net.Inet6AddressImpl.lookupAllHostAddr() + Exception in thread "main" java.net.UnknownHostException: xyzzy: Name or service not known + at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/Inet6AddressImpl.class] + at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/InetAddress$1.class] +@@ -52,7 +52,7 @@ Exception in thread "main" java.net.UnknownHostException: xyzzy: Name or service + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.net.UnknownHostException exception in thread "main" in a method java.net.AbstractPlainSocketImpl.connect() with signature (Ljava/net/SocketAddress;I)V ++Caught exception java.net.UnknownHostException in method java.net.AbstractPlainSocketImpl.connect() + Exception in thread "main" java.net.UnknownHostException: xyzzy + at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/AbstractPlainSocketImpl.class] + at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/SocksSocketImpl.class] +@@ -63,7 +63,7 @@ Exception in thread "main" java.net.UnknownHostException: xyzzy + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.net.ConnectException exception in thread "main" in a method java.net.PlainSocketImpl.socketConnect() with signature (Ljava/net/InetAddress;II)V ++Caught exception java.net.ConnectException in method java.net.PlainSocketImpl.socketConnect() + Exception in thread "main" java.net.ConnectException: Connection refused + at java.net.PlainSocketImpl.socketConnect(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/PlainSocketImpl.class] + at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/AbstractPlainSocketImpl.class] +@@ -77,7 +77,7 @@ Exception in thread "main" java.net.ConnectException: Connection refused + at Test.readFromSocket(Test.java:177) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:474) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.NumberFormatException exception in thread "main" in a method java.lang.Long.parseLong() with signature (Ljava/lang/String;I)J ++Caught exception java.lang.NumberFormatException in method java.lang.Long.parseLong() + Exception in thread "main" java.lang.NumberFormatException: null + at java.lang.Long.parseLong(Long.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Long.class] + at java.lang.Long.parseLong(Long.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Long.class] +@@ -86,14 +86,14 @@ Exception in thread "main" java.lang.NumberFormatException: null + at Test.readFromURL(Test.java:237) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:475) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.io.FileNotFoundException exception in thread "main" in a method sun.net.www.protocol.http.HttpURLConnection.getInputStream() with signature ()Ljava/io/InputStream; ++Caught exception java.io.FileNotFoundException in method sun.net.www.protocol.http.HttpURLConnection.getInputStream() + Exception in thread "main" java.io.FileNotFoundException: http://localhost:54321/_this_does_not_exists_ + at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/sun/net/www/protocol/http/HttpURLConnection.class] + at java.net.URL.openStream(URL.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URL.class] + at Test.readFromURL(Test.java:237) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:475) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.net.MalformedURLException exception in thread "main" in a method java.net.URL.() with signature (Ljava/net/URL;Ljava/lang/String;Ljava/net/URLStreamHandler;)V ++Caught exception java.net.MalformedURLException in method java.net.URL.() + Exception in thread "main" java.net.MalformedURLException: no protocol: @#$%^&malformed URL@#$%^&*() + at java.net.URL.(URL.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URL.class] + at java.net.URL.(URL.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URL.class] +@@ -101,32 +101,32 @@ Exception in thread "main" java.net.MalformedURLException: no protocol: @#$%^&ma + at Test.malformedURL(Test.java:194) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:476) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.ArrayIndexOutOfBoundsException exception in thread "main" in a method Test.throwIndexOutOfBoundsException() with signature ()V ++Caught exception java.lang.ArrayIndexOutOfBoundsException in method Test.throwIndexOutOfBoundsException() + Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 42 + at Test.throwIndexOutOfBoundsException(Test.java:266) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchIndexOutOfBoundsException(Test.java:347) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:486) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.StringIndexOutOfBoundsException exception in thread "main" in a method java.lang.String.charAt() with signature (I)C ++Caught exception java.lang.StringIndexOutOfBoundsException in method java.lang.String.charAt() + Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1 + at java.lang.String.charAt(String.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/String.class] + at Test.throwStringIndexOutOfBoundsException(Test.java:278) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchStringIndexOutOfBoundsException(Test.java:362) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:487) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.NullPointerException exception in thread "main" in a method Test.throwNullPointerException() with signature ()V ++Caught exception java.lang.NullPointerException in method Test.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at Test.throwNullPointerException(Test.java:290) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchNullPointerException(Test.java:377) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:488) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.ClassCastException exception in thread "main" in a method Test.throwClassCastException() with signature ()V ++Caught exception java.lang.ClassCastException in method Test.throwClassCastException() + Exception in thread "main" java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String + at Test.throwClassCastException(Test.java:302) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchClassCastException(Test.java:392) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:489) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.UnsatisfiedLinkError exception in thread "main" in a method java.lang.Runtime.load0() with signature (Ljava/lang/Class;Ljava/lang/String;)V ++Caught exception java.lang.UnsatisfiedLinkError in method java.lang.Runtime.load0() + Exception in thread "main" java.lang.UnsatisfiedLinkError: Expecting an absolute path of the library: xyzzy + at java.lang.Runtime.load0(Runtime.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Runtime.class] + at java.lang.System.load(System.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/System.class] +@@ -134,7 +134,7 @@ Exception in thread "main" java.lang.UnsatisfiedLinkError: Expecting an absolute + at Test.catchUnsatisfiedLinkErrorUserLibrary(Test.java:422) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:491) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Caught java.lang.UnsatisfiedLinkError exception in thread "main" in a method java.lang.ClassLoader.loadLibrary() with signature (Ljava/lang/Class;Ljava/lang/String;Z)V ++Caught exception java.lang.UnsatisfiedLinkError in method java.lang.ClassLoader.loadLibrary() + Exception in thread "main" java.lang.UnsatisfiedLinkError: no xyzzy in java.library.path + at java.lang.ClassLoader.loadLibrary(ClassLoader.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/ClassLoader.class] + at java.lang.Runtime.loadLibrary0(Runtime.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Runtime.class] +@@ -143,7 +143,7 @@ Exception in thread "main" java.lang.UnsatisfiedLinkError: no xyzzy in java.libr + at Test.catchUnsatisfiedLinkErrorSystemLibrary(Test.java:437) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:492) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-Uncaught java.lang.NullPointerException exception in thread "main" in a method Test.throwNullPointerException() with signature ()V ++Uncaught exception java.lang.NullPointerException in method Test.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at Test.throwNullPointerException(Test.java:290) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndDontCatchException(Test.java:501) [file:@CMAKE_BINARY_DIR@/test/Test.class] +diff --git a/test/outputs/run_threads.log.in b/test/outputs/run_threads.log.in +index 902cb3c..ad80099 100644 +--- a/test/outputs/run_threads.log.in ++++ b/test/outputs/run_threads.log.in +@@ -1,10 +1,10 @@ +-Caught java.lang.ArrayIndexOutOfBoundsException exception in thread "Thread-0" in a method SimpleTest.throwIndexOutOfBoundsException() with signature ()V ++Caught exception java.lang.ArrayIndexOutOfBoundsException in method SimpleTest.throwIndexOutOfBoundsException() + Exception in thread "Thread-0" java.lang.ArrayIndexOutOfBoundsException: 42 + at SimpleTest.throwIndexOutOfBoundsException(SimpleTest.java:24) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] + at SimpleTest.catchIndexOutOfBoundsException(SimpleTest.java:47) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] + at SimpleTest.throwAndCatchAllExceptions(SimpleTest.java:61) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] + at ThreadCaughtException.run(MultiThreadTest.java:13) [file:@CMAKE_BINARY_DIR@/test/ThreadCaughtException.class] +-Uncaught java.lang.NullPointerException exception in thread "Thread-1" in a method SimpleTest.throwNullPointerException() with signature ()V ++Uncaught exception java.lang.NullPointerException in method SimpleTest.throwNullPointerException() + Exception in thread "Thread-1" java.lang.NullPointerException + at SimpleTest.throwNullPointerException(SimpleTest.java:36) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] + at SimpleTest.throwAndDontCatchException(SimpleTest.java:71) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] +diff --git a/test/outputs/run_try_finally.log.in b/test/outputs/run_try_finally.log.in +index 0b02bc6..d690017 100644 +--- a/test/outputs/run_try_finally.log.in ++++ b/test/outputs/run_try_finally.log.in +@@ -1,11 +1,11 @@ +-Caught java.lang.ArrayIndexOutOfBoundsException exception in thread "main" in a method SimpleTest.throwIndexOutOfBoundsException() with signature ()V ++Caught exception java.lang.ArrayIndexOutOfBoundsException in method SimpleTest.throwIndexOutOfBoundsException() + Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 42 + at SimpleTest.throwIndexOutOfBoundsException(SimpleTest.java:24) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] + at SimpleTest.catchIndexOutOfBoundsException(SimpleTest.java:47) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] + at SimpleTest.throwAndCatchAllExceptions(SimpleTest.java:61) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] + at TryFinallyTest.run(TryFinallyTest.java:13) [file:@CMAKE_BINARY_DIR@/test/TryFinallyTest.class] + at TryFinallyTest.main(TryFinallyTest.java:27) [file:@CMAKE_BINARY_DIR@/test/TryFinallyTest.class] +-Caught java.lang.NullPointerException exception in thread "main" in a method SimpleTest.throwNullPointerException() with signature ()V ++Caught exception java.lang.NullPointerException in method SimpleTest.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at SimpleTest.throwNullPointerException(SimpleTest.java:36) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] + at SimpleTest.throwAndDontCatchException(SimpleTest.java:71) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] +-- +1.8.3.1 + diff --git a/SOURCES/0007-Add-tests-for-reason-message-shortening.patch b/SOURCES/0007-Add-tests-for-reason-message-shortening.patch new file mode 100644 index 0000000..0c5088d --- /dev/null +++ b/SOURCES/0007-Add-tests-for-reason-message-shortening.patch @@ -0,0 +1,207 @@ +From 306de4dcbe3fdc7fc4037e0feda58a0ec1d6efc5 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Sat, 26 Oct 2013 21:01:28 +0200 +Subject: [PATCH 07/39] Add tests for reason message shortening + +Related to rhbz#1023081 +Related to rhbz#1055581 + +Signed-off-by: Jakub Filak +--- + test/CMakeLists.txt | 34 +++++++++ + ...eHavingExtremlyLongAndSenselessMethodNames.java | 83 ++++++++++++++++++++++ + test/outputs/run_cut_exception_namespace.log.in | 4 ++ + test/outputs/run_cut_method_class.log.in | 4 ++ + test/outputs/run_cut_method_namespace.log.in | 4 ++ + test/outputs/run_cut_reason_message.log.in | 4 ++ + 6 files changed, 133 insertions(+) + create mode 100644 test/com/redhat/abrt/test/UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.java + create mode 100644 test/outputs/run_cut_exception_namespace.log.in + create mode 100644 test/outputs/run_cut_method_class.log.in + create mode 100644 test/outputs/run_cut_method_namespace.log.in + create mode 100644 test/outputs/run_cut_reason_message.log.in + +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index c84ebe5..5d3aa0d 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -45,6 +45,7 @@ _add_class_target(RemoteTest TEST_JAVA_TARGETS SimpleTest) + _add_class_target(MultiThreadTest TEST_JAVA_TARGETS SimpleTest) + _add_class_target(Test TEST_JAVA_TARGETS) + _add_class_target(com/redhat/abrt/test/Test TEST_JAVA_TARGETS) ++_add_class_target(com/redhat/abrt/test/UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames TEST_JAVA_TARGETS) + _add_class_target(BadClassTest TEST_JAVA_TARGETS) + _add_class_target(MissingClass TEST_JAVA_TARGETS) + _add_class_target(MissingClassTest TEST_JAVA_TARGETS MissingClass) +@@ -200,6 +201,39 @@ _add_test_target( + ) + #_add_test(run_overriden_eqauls 2) + ++_add_test_target( ++ run_cut_method_namespace ++ com/redhat/abrt/test/UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames ++ 3 ++ DEPENDS ${TEST_JAVA_TARGETS} ++) ++_add_test(run_cut_method_namespace 2) ++ ++_add_test_target( ++ run_cut_exception_namespace ++ com/redhat/abrt/test/UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames ++ 2 ++ DEPENDS ${TEST_JAVA_TARGETS} ++) ++_add_test(run_cut_exception_namespace 2) ++ ++_add_test_target( ++ run_cut_method_class ++ com/redhat/abrt/test/UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames ++ 1 ++ DEPENDS ${TEST_JAVA_TARGETS} ++) ++_add_test(run_cut_method_class 2) ++ ++_add_test_target( ++ run_cut_reason_message ++ com/redhat/abrt/test/UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames ++ 0 ++ DEPENDS ${TEST_JAVA_TARGETS} ++) ++_add_test(run_cut_reason_message 2) ++ ++ + add_custom_target( + run_thread_stress + COMMAND LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/src ${Java_JAVA_EXECUTABLE} -agentlib:${AGENT_NAME}=caught=java.lang.ArrayIndexOutOfBoundsException,output= ThreadStressTest +diff --git a/test/com/redhat/abrt/test/UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.java b/test/com/redhat/abrt/test/UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.java +new file mode 100644 +index 0000000..4a12322 +--- /dev/null ++++ b/test/com/redhat/abrt/test/UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.java +@@ -0,0 +1,83 @@ ++package com.redhat.abrt.test; ++ ++ ++ ++/** ++ * An exception class with very long name for test of message shortening ++ * algorithm. ++ * ++ * @author Jakub Filak <jfilak@redhat.com> ++ */ ++class UnbelievableLongJavaClassNameException extends RuntimeException { ++ public UnbelievableLongJavaClassNameException() { super(); } ++ public UnbelievableLongJavaClassNameException(String message) { super(message); } ++ public UnbelievableLongJavaClassNameException(String message, Throwable cause) { super(message, cause); } ++ public UnbelievableLongJavaClassNameException(Throwable cause) { super(cause); } ++} ++ ++ ++ ++/** ++ * A class with very long name, method names and throwing an exception with ++ * very long name for test of message shortening algorithm. ++ * ++ * @author Jakub Filak <jfilak@redhat.com> ++ */ ++public class UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames ++{ ++ public static void oneTwoThreeFroFiveSixSevenEightNineTenElevenTwelveThirteenSixteenSeventeenEighteenNineteenTwentyTwentyOneTwentyTwooTwentyThreeTwentyFourTwentyFiveTwentySixTwentySevenTwentyEightTwentyNineUpToOneHundredThousand() ++ { ++ throw new UnbelievableLongJavaClassNameException(); ++ } ++ ++ public static void oneTwoThreeFroFiveSixSevenEightNineTenElevenTwelveThirteenSixteenSeventeenEighteenNineteenTwentyUpToOneHundredThousand() ++ { ++ throw new UnbelievableLongJavaClassNameException(); ++ } ++ ++ public static void oneTwoThreeFroFiveSixSevenEightNineTenElevenTwelveThirteenSixteenSeventeenUpToOneHundredThousand() ++ { ++ throw new UnbelievableLongJavaClassNameException(); ++ } ++ ++ public static void oneTwoThreeFroFiveSixSevenEightNineTenElevenTwelveThirteenSixteenUpToOneHundredThousand() ++ { ++ throw new UnbelievableLongJavaClassNameException(); ++ } ++ ++ /** ++ * Entry point to this shortening test. ++ */ ++ public static void main(String args[]) { ++ System.out.println("Long names handling started"); ++ if (args.length == 0) { ++ System.out.println("You better pass an argument from [0, 1, 2]"); ++ oneTwoThreeFroFiveSixSevenEightNineTenElevenTwelveThirteenSixteenSeventeenEighteenNineteenTwentyUpToOneHundredThousand(); ++ } ++ else { ++ switch(args[0]) { ++ case "0": ++ System.out.println("Last Twenty Nine"); ++ oneTwoThreeFroFiveSixSevenEightNineTenElevenTwelveThirteenSixteenSeventeenEighteenNineteenTwentyTwentyOneTwentyTwooTwentyThreeTwentyFourTwentyFiveTwentySixTwentySevenTwentyEightTwentyNineUpToOneHundredThousand(); ++ break; ++ case "1": ++ System.out.println("Last Twenty"); ++ oneTwoThreeFroFiveSixSevenEightNineTenElevenTwelveThirteenSixteenSeventeenEighteenNineteenTwentyUpToOneHundredThousand(); ++ break; ++ case "2": ++ System.out.println("Last Seventeen"); ++ oneTwoThreeFroFiveSixSevenEightNineTenElevenTwelveThirteenSixteenSeventeenUpToOneHundredThousand(); ++ break; ++ case "3": ++ System.out.println("Last Sixteen"); ++ oneTwoThreeFroFiveSixSevenEightNineTenElevenTwelveThirteenSixteenUpToOneHundredThousand(); ++ break; ++ default: ++ System.err.println("Argument is not in range [0, 1, 2]: " + args[0]); ++ System.exit(1); ++ } ++ } ++ ++ System.exit(0); ++ } ++} +diff --git a/test/outputs/run_cut_exception_namespace.log.in b/test/outputs/run_cut_exception_namespace.log.in +new file mode 100644 +index 0000000..75b54c1 +--- /dev/null ++++ b/test/outputs/run_cut_exception_namespace.log.in +@@ -0,0 +1,4 @@ ++Uncaught exception UnbelievableLongJavaClassNameException in method UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.oneTwoThreeFroFiveSixSevenEightNineTenElevenTwelveThirteenSixteenSeventeenUpToOneHundredThousand() ++Exception in thread "main" com.redhat.abrt.test.UnbelievableLongJavaClassNameException ++ at com.redhat.abrt.test.UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.oneTwoThreeFroFiveSixSevenEightNineTenElevenTwelveThirteenSixteenSeventeenUpToOneHundredThousand(UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.java:40) [file:@CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.class] ++ at com.redhat.abrt.test.UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.main(UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.java:69) [file:@CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.class] +diff --git a/test/outputs/run_cut_method_class.log.in b/test/outputs/run_cut_method_class.log.in +new file mode 100644 +index 0000000..eb464a7 +--- /dev/null ++++ b/test/outputs/run_cut_method_class.log.in +@@ -0,0 +1,4 @@ ++Uncaught exception UnbelievableLongJavaClassNameException in method oneTwoThreeFroFiveSixSevenEightNineTenElevenTwelveThirteenSixteenSeventeenEighteenNineteenTwentyUpToOneHundredThousand() ++Exception in thread "main" com.redhat.abrt.test.UnbelievableLongJavaClassNameException ++ at com.redhat.abrt.test.UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.oneTwoThreeFroFiveSixSevenEightNineTenElevenTwelveThirteenSixteenSeventeenEighteenNineteenTwentyUpToOneHundredThousand(UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.java:35) [file:@CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.class] ++ at com.redhat.abrt.test.UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.main(UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.java:65) [file:@CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.class] +diff --git a/test/outputs/run_cut_method_namespace.log.in b/test/outputs/run_cut_method_namespace.log.in +new file mode 100644 +index 0000000..0ec2438 +--- /dev/null ++++ b/test/outputs/run_cut_method_namespace.log.in +@@ -0,0 +1,4 @@ ++Uncaught exception com.redhat.abrt.test.UnbelievableLongJavaClassNameException in method UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.oneTwoThreeFroFiveSixSevenEightNineTenElevenTwelveThirteenSixteenUpToOneHundredThousand() ++Exception in thread "main" com.redhat.abrt.test.UnbelievableLongJavaClassNameException ++ at com.redhat.abrt.test.UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.oneTwoThreeFroFiveSixSevenEightNineTenElevenTwelveThirteenSixteenUpToOneHundredThousand(UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.java:45) [file:@CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.class] ++ at com.redhat.abrt.test.UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.main(UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.java:73) [file:@CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.class] +diff --git a/test/outputs/run_cut_reason_message.log.in b/test/outputs/run_cut_reason_message.log.in +new file mode 100644 +index 0000000..5364f65 +--- /dev/null ++++ b/test/outputs/run_cut_reason_message.log.in +@@ -0,0 +1,4 @@ ++Uncaught exception UnbelievableLongJavaClassNameException in method oneTwoThreeFroFiveSixSevenEightNineTenElevenTwelveThirteenSixteenSeventeenEighteenNineteenTwentyTwentyOneTwentyTwooTwentyThreeTwentyFourTwentyFiveTwentySixTwentySevenTwentyEightTwentyNin ++Exception in thread "main" com.redhat.abrt.test.UnbelievableLongJavaClassNameException ++ at com.redhat.abrt.test.UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.oneTwoThreeFroFiveSixSevenEightNineTenElevenTwelveThirteenSixteenSeventeenEighteenNineteenTwentyTwentyOneTwentyTwooTwentyThreeTwentyFourTwentyFiveTwentySixTwentySevenTwentyEightTwentyNineUpToOneHundredThousand(UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.java:30) [file:@CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.class] ++ at com.redhat.abrt.test.UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.main(UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.java:61) [file:@CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.class] +-- +1.8.3.1 + diff --git a/SOURCES/0008-Fix-a-bug-in-testdriver.patch b/SOURCES/0008-Fix-a-bug-in-testdriver.patch new file mode 100644 index 0000000..0cb2494 --- /dev/null +++ b/SOURCES/0008-Fix-a-bug-in-testdriver.patch @@ -0,0 +1,28 @@ +From 043a273e153c39c96d032639f5c42dadf7317ae2 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Sat, 26 Oct 2013 21:14:40 +0200 +Subject: [PATCH 08/39] Fix a bug in testdriver + +Related to rhbz#1055581 + +Signed-off-by: Jakub Filak +--- + test/testdriver | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/testdriver b/test/testdriver +index 72ac41e..9e5c2b8 100644 +--- a/test/testdriver ++++ b/test/testdriver +@@ -17,7 +17,7 @@ fi + + TMP_RESULT=`mktemp /tmp/abrt_java_connector.XXXXXXX` + +-if [ 1 -eq "$5" ]; then ++if [ -n "$5" ] && [ 1 -eq $5 ]; then + tac $4 | awk \ + 'BEGIN { main = 0 } + /^(Unc|C)aught/ { if (main == 1) { print $0; main = 0 } } +-- +1.8.3.1 + diff --git a/SOURCES/0009-Add-support-for-changing-log-directory.patch b/SOURCES/0009-Add-support-for-changing-log-directory.patch new file mode 100644 index 0000000..b0d62f1 --- /dev/null +++ b/SOURCES/0009-Add-support-for-changing-log-directory.patch @@ -0,0 +1,157 @@ +From 4807caad927d71fc10dd09259356260e365c4834 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Tue, 29 Oct 2013 16:28:09 +0100 +Subject: [PATCH 09/39] Add support for changing log directory + +The current implementation writes to a file in CWD. + +This patch allows users to pass a path to a directory in output command +line argument. If a value of the output argument points to a directory, +the log file path is set to $output/abrt_checker_$PID.log + +Related to rhbz#1023081 +Related to rhbz#1055581 + +Signed-off-by: Jakub Filak +--- + README | 8 +++++-- + src/abrt-checker.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++- + test/CMakeLists.txt | 7 ++++++ + 3 files changed, 80 insertions(+), 3 deletions(-) + +diff --git a/README b/README +index 773a2f3..28cefda 100644 +--- a/README ++++ b/README +@@ -34,11 +34,15 @@ Example3: + - this example shows how to configure the log output destination + - output option is designed for this purpose + - by default abrt-java-connector prints the log to abrt_checker_$PID.log file in the current directory +-- the first command prints agent's output to /tmp/abrt-agent.log file ++- the first command prints logs to /tmp/abrt_checker_$PID.log ++ ++$ java -agentlib:abrt-java-connector=output=/tmp $MyClass -platform.jvmtiSupported true ++ ++- the second command prints agent's output to /tmp/abrt-agent.log file + + $ java -agentlib:abrt-java-connector=output=/tmp/abrt-agent.log $MyClass -platform.jvmtiSupported true + +-- the second command completely disables logging to file ++- the thirs command completely disables logging to file + + $ java -agentlib:abrt-java-connector=output= $MyClass -platform.jvmtiSupported true + +diff --git a/src/abrt-checker.c b/src/abrt-checker.c +index 23e76b0..c403d00 100644 +--- a/src/abrt-checker.c ++++ b/src/abrt-checker.c +@@ -37,6 +37,8 @@ + #include + #include + #include ++#include ++#include + + /* Shared macros and so on */ + #include "abrt-checker.h" +@@ -238,6 +240,43 @@ static const char *get_default_log_file_name() + + + /* ++ * Appends file_name to *path and returns a pointer to result. Returns NULL on ++ * error and leaves *path untouched. ++ */ ++static char *append_file_to_path(char **path, const char *file_name) ++{ ++ if (NULL == file_name) ++ { ++ return NULL; ++ } ++ ++ const size_t outlen = strlen(*path); ++ const int need_trailing = (*path)[outlen -1] != '/'; ++ char *result = malloc(outlen + strlen(file_name) + need_trailing + 1); ++ if (NULL == result) ++ { ++ fprintf(stderr, __FILE__ ":" STRINGIZE(__LINE__) ": malloc(): out of memory\n"); ++ return NULL; ++ } ++ ++ char *tmp = strcpy(result, *path); ++ tmp += outlen; ++ if (need_trailing) ++ { ++ *tmp = '/'; ++ ++tmp; ++ } ++ ++ strcpy(tmp, file_name); ++ ++ free(*path); ++ *path = result; ++ return result; ++} ++ ++ ++ ++/* + * Gets the log file + */ + static FILE *get_log_file() +@@ -248,7 +287,34 @@ static FILE *get_log_file() + && DISABLED_LOG_OUTPUT != outputFileName) + { + /* try to open output log file */ +- const char *fn = (outputFileName != NULL ? outputFileName : get_default_log_file_name()); ++ const char *fn = outputFileName; ++ if (NULL != fn) ++ { ++ struct stat sb; ++ if (0 > stat(fn, &sb)) ++ { ++ if (ENOENT != errno) ++ { ++ fprintf(stderr, __FILE__ ":" STRINGIZE(__LINE__) ": cannot stat log file %s: %s\n", fn, strerror(errno)); ++ return NULL; ++ } ++ } ++ else if (S_ISDIR(sb.st_mode)) ++ { ++ fn = append_file_to_path(&outputFileName, get_default_log_file_name()); ++ } ++ } ++ else ++ { ++ fn = get_default_log_file_name(); ++ } ++ ++ if (NULL == fn) ++ { ++ fprintf(stderr, __FILE__ ":" STRINGIZE(__LINE__) ": cannot build log file name."); ++ return NULL; ++ } ++ + VERBOSE_PRINT("Path to the log file: %s\n", fn); + fout = fopen(fn, "wt"); + if (NULL == fout) +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index 5d3aa0d..4e0d836 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -258,6 +258,13 @@ add_custom_target( + ) + add_test(test_no_log_file make run_no_log_file) + ++add_custom_target( ++ run_log_file_in_directory ++ COMMAND rm -rf ${CMAKE_CURRENT_BINARY_DIR}/lid && mkdir ${CMAKE_CURRENT_BINARY_DIR}/lid && LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/src ${Java_JAVA_EXECUTABLE} -agentlib:${AGENT_NAME}=output=${CMAKE_CURRENT_BINARY_DIR}/lid Test || test -n `find ${CMAKE_CURRENT_BINARY_DIR}/lid -name "abrt_checker_*.log"` ++ DEPENDS AbrtChecker ${TEST_JAVA_TARGETS} ++ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ++) ++add_test(test_log_file_in_directory make run_log_file_in_directory) + + get_directory_property(all_run_targets ALL_RUN_TARGETS) + add_custom_target(run_all DEPENDS ${all_run_targets}) +-- +1.8.3.1 + diff --git a/SOURCES/0010-Make-log-output-disabled-by-default.patch b/SOURCES/0010-Make-log-output-disabled-by-default.patch new file mode 100644 index 0000000..053be6b --- /dev/null +++ b/SOURCES/0010-Make-log-output-disabled-by-default.patch @@ -0,0 +1,86 @@ +From 6f4c2c6d88956b282ce5992f87c86995de5a774f Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Tue, 29 Oct 2013 17:47:48 +0100 +Subject: [PATCH 10/39] Make log output disabled by default + +Related to rhbz#1023081 +Related to rhbz#1055581 + +Signed-off-by: Jakub Filak +--- + README | 6 +----- + src/abrt-checker.c | 7 ++++++- + test/CMakeLists.txt | 9 +++++++++ + 3 files changed, 16 insertions(+), 6 deletions(-) + +diff --git a/README b/README +index 28cefda..abbed4f 100644 +--- a/README ++++ b/README +@@ -33,7 +33,7 @@ $ java -agentlib:abrt-java-connector=abrt=on $MyClass -platform.jvmtiSupported + Example3: + - this example shows how to configure the log output destination + - output option is designed for this purpose +-- by default abrt-java-connector prints the log to abrt_checker_$PID.log file in the current directory ++- abrt-java-connector does not print any logs by default + - the first command prints logs to /tmp/abrt_checker_$PID.log + + $ java -agentlib:abrt-java-connector=output=/tmp $MyClass -platform.jvmtiSupported true +@@ -42,10 +42,6 @@ $ java -agentlib:abrt-java-connector=output=/tmp $MyClass -platform.jvmtiSuppor + + $ java -agentlib:abrt-java-connector=output=/tmp/abrt-agent.log $MyClass -platform.jvmtiSupported true + +-- the thirs command completely disables logging to file +- +-$ java -agentlib:abrt-java-connector=output= $MyClass -platform.jvmtiSupported true +- + + Example4: + - this example shows how to enable reporting of caught exceptions +diff --git a/src/abrt-checker.c b/src/abrt-checker.c +index c403d00..3eac971 100644 +--- a/src/abrt-checker.c ++++ b/src/abrt-checker.c +@@ -194,7 +194,7 @@ T_processProperties processProperties; + T_errorDestination reportErrosTo; + + /* Path (not necessary absolute) to output file */ +-char *outputFileName; ++char *outputFileName = DISABLED_LOG_OUTPUT; + + /* Path (not necessary absolute) to output file */ + char **reportedCaughExceptionTypes; +@@ -2604,6 +2604,11 @@ void parse_commandline_options(char *options) + } + else if(strcmp("output", key) == 0) + { ++ if (DISABLED_LOG_OUTPUT != outputFileName) ++ { ++ free(outputFileName); ++ } ++ + if (value == NULL || value[0] == '\0') + { + VERBOSE_PRINT("Disabling output to log file\n"); +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index 4e0d836..f322e9f 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -266,5 +266,14 @@ add_custom_target( + ) + add_test(test_log_file_in_directory make run_log_file_in_directory) + ++add_custom_target( ++ run_default_no_log_file ++ COMMAND LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/src ${Java_JAVA_EXECUTABLE} -agentlib:${AGENT_NAME} Test || test -z "`find -name abrt_checker_*.log`" ++ DEPENDS AbrtChecker ${TEST_JAVA_TARGETS} ++ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} ++) ++add_test(test_default_no_log_file make run_default_no_log_file) ++ ++ + get_directory_property(all_run_targets ALL_RUN_TARGETS) + add_custom_target(run_all DEPENDS ${all_run_targets}) +-- +1.8.3.1 + diff --git a/SOURCES/0011-Add-support-for-journald-and-syslog.patch b/SOURCES/0011-Add-support-for-journald-and-syslog.patch new file mode 100644 index 0000000..7b24d28 --- /dev/null +++ b/SOURCES/0011-Add-support-for-journald-and-syslog.patch @@ -0,0 +1,229 @@ +From 73a5eb055170e761f1815a3d68d0931bae2cc405 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Tue, 29 Oct 2013 18:39:20 +0100 +Subject: [PATCH 11/39] Add support for journald and syslog + +Two new command line arguments: + syslog=(on|yes) + - disabled by default + - logs a stack trace to syslog with LOG_ERR level + + journald=(off|no) + - disabled by default + - logs a stack trace to journald with LOG_ERR level + - the stack trace is saved in STACK_TRACE field + +Related to rhbz#1023081 +Related to rhbz#1055581 + +Signed-off-by: Jakub Filak +--- + README | 13 ++++++ + package/abrt-java-connector.spec | 1 + + src/CMakeLists.txt | 3 ++ + src/abrt-checker.c | 92 ++++++++++++++++++++++++++++++++-------- + 4 files changed, 91 insertions(+), 18 deletions(-) + +diff --git a/README b/README +index abbed4f..f9545bd 100644 +--- a/README ++++ b/README +@@ -50,3 +50,16 @@ Example4: + - user must provide a colon separated list of exception type names + + $ java -agentlib:abrt-java-connector=caught=java.io.FileNotFoundException:java.io.FileNotFoundException $MyClass -platform.jvmtiSupported true ++ ++Example5: ++- this example shows hot to enable syslog and disable journald ++- abrt-java-connector reports detected problems to journald by default ++- problems reported to journald has stack trace stored in STACK_TRACE field ++- problems reported to syslog are written to syslog with entire backtrace ++ ++- disable journald ++$ java -agentlib:abrt-java-connector=journald=off $MyClass -platform.jvmtiSupported true ++ ++ ++- enable syslog ++$ java -agentlib:abrt-java-connector=syslog=on $MyClass -platform.jvmtiSupported true +diff --git a/package/abrt-java-connector.spec b/package/abrt-java-connector.spec +index abb0fee..88ecfc6 100644 +--- a/package/abrt-java-connector.spec ++++ b/package/abrt-java-connector.spec +@@ -14,6 +14,7 @@ Source0: https://github.com/jfilak/%{name}/archive/%{commit}/%{name}-%{version}- + BuildRequires: cmake + BuildRequires: libreport-devel + BuildRequires: java-1.7.0-openjdk-devel ++BuildRequires: systemd-devel + + Requires: abrt + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index e7c8a8e..a00fe77 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -3,7 +3,9 @@ include_directories(${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2}) + + include(FindPkgConfig) + pkg_check_modules(PC_ABRT REQUIRED libreport) ++pkg_check_modules(PC_JOURNALD REQUIRED libsystemd-journal) + include_directories(${PC_ABRT_INCLUDE_DIRS}) ++include_directories(${PC_JOURNALD_INCLUDE_DIRS}) + + add_definitions(-D_GNU_SOURCE) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -std=c99 -pedantic") +@@ -19,5 +21,6 @@ set_target_properties( + OUTPUT_NAME abrt-java-connector) + + target_link_libraries(AbrtChecker ${PC_ABRT_LIBRARIES}) ++target_link_libraries(AbrtChecker ${PC_JOURNALD_LIBRARIES}) + + install(TARGETS AbrtChecker DESTINATION ${LIB_INSTALL_DIR}) +diff --git a/src/abrt-checker.c b/src/abrt-checker.c +index 3eac971..26665d6 100644 +--- a/src/abrt-checker.c ++++ b/src/abrt-checker.c +@@ -39,6 +39,8 @@ + #include + #include + #include ++#include ++#include + + /* Shared macros and so on */ + #include "abrt-checker.h" +@@ -168,6 +170,8 @@ typedef struct { + typedef enum { + ED_TERMINAL = 1, ///< Report errors to the terminal + ED_ABRT = ED_TERMINAL << 1, ///< Submit error reports to ABRT ++ ED_SYSLOG = ED_ABRT << 1, ///< Submit error reports to syslog ++ ED_JOURNALD = ED_SYSLOG << 1, ///< Submit error reports to journald + } T_errorDestination; + + /* Global monitor lock */ +@@ -191,7 +195,7 @@ T_jvmEnvironment jvmEnvironment; + T_processProperties processProperties; + + /* Global configuration of report destination */ +-T_errorDestination reportErrosTo; ++T_errorDestination reportErrosTo = ED_JOURNALD; + + /* Path (not necessary absolute) to output file */ + char *outputFileName = DISABLED_LOG_OUTPUT; +@@ -471,7 +475,10 @@ static void add_process_properties_data(problem_data_t *pd) + * Register new ABRT event using given message and a method name. + * If reportErrosTo global flags doesn't contain ED_ABRT, this function does nothing. + */ +-static void register_abrt_event(char * executable, char * message, char * backtrace) ++static void register_abrt_event( ++ const char *executable, ++ const char *message, ++ const char *backtrace) + { + if ((reportErrosTo & ED_ABRT) == 0) + { +@@ -510,6 +517,46 @@ static void register_abrt_event(char * executable, char * message, char * backtr + + + /* ++ * Report a stack trace to all systems ++ */ ++static void report_stacktrace( ++ const char *message, ++ const char *stacktrace, ++ int sure_unique) ++{ ++ if (reportErrosTo & ED_SYSLOG) ++ { ++ VERBOSE_PRINT("Reporting stack trace to syslog\n"); ++ syslog(LOG_ERR, "%s\n%s", message, stacktrace); ++ } ++ ++ if (reportErrosTo & ED_JOURNALD) ++ { ++ VERBOSE_PRINT("Reporting stack trace to JournalD\n"); ++ sd_journal_send("MESSAGE=%s", message, ++ "PRIORITY=%d", LOG_ERR, ++ "STACK_TRACE=%s", stacktrace ? stacktrace : "no stack trace", ++ NULL); ++ ++ } ++ ++ log_print("%s\n", message); ++ ++ if (stacktrace) ++ { ++ log_print("%s", stacktrace); ++ } ++ ++ if (NULL != stacktrace && sure_unique) ++ { ++ VERBOSE_PRINT("Reporting stack trace to ABRT"); ++ register_abrt_event(processProperties.main_class, message, stacktrace); ++ } ++} ++ ++ ++ ++/* + * Print a message when any JVM TI error occurs. + */ + static void print_jvmti_error( +@@ -2026,23 +2073,16 @@ static void JNICALL callback_on_exception( + char *message = format_exception_reason_message(/*caught?*/NULL != catch_method, + updated_exception_name_ptr, class_name_ptr, method_name_ptr); + +- if (NULL != message) +- { +- log_print("%s\n", message); ++ char *stack_trace_str = generate_thread_stack_trace(jvmti_env, jni_env, tname, exception_object); + +- //char *stack_trace_str = generate_stack_trace(jvmti_env, jni_env, thr, tname, updated_exception_name_ptr); +- char *stack_trace_str = generate_thread_stack_trace(jvmti_env, jni_env, tname, exception_object); +- if (NULL != stack_trace_str) +- { +- log_print("%s", stack_trace_str); +- if (NULL != threads_exc_buf) +- { +- register_abrt_event(processProperties.main_class, message, stack_trace_str); +- } +- free(stack_trace_str); +- } +- free(message); +- } ++ const char *report_message = message; ++ if (NULL == report_message) ++ report_message = (NULL != catch_method) ? "Caught exception" : "Uncaught exception"; ++ ++ report_stacktrace(report_message, stack_trace_str, NULL != threads_exc_buf); ++ ++ free(message); ++ free(stack_trace_str); + } + else + { +@@ -2602,6 +2642,22 @@ void parse_commandline_options(char *options) + reportErrosTo |= ED_ABRT; + } + } ++ else if (strcmp("syslog", key) == 0) ++ { ++ if (value != NULL && (strcasecmp("on", value) == 0 || strcasecmp("yes", value) == 0)) ++ { ++ VERBOSE_PRINT("Enabling errors reporting to syslog\n"); ++ reportErrosTo |= ED_SYSLOG; ++ } ++ } ++ else if (strcmp("journald", key) == 0) ++ { ++ if (value != NULL && (strcasecmp("off", value) == 0 || strcasecmp("no", value) == 0)) ++ { ++ VERBOSE_PRINT("Disable errors reporting to JournalD\n"); ++ reportErrosTo &= ~ED_JOURNALD; ++ } ++ } + else if(strcmp("output", key) == 0) + { + if (DISABLED_LOG_OUTPUT != outputFileName) +-- +1.8.3.1 + diff --git a/SOURCES/0012-Completely-disable-logging-in-ThreadStressTest.patch b/SOURCES/0012-Completely-disable-logging-in-ThreadStressTest.patch new file mode 100644 index 0000000..2d873b6 --- /dev/null +++ b/SOURCES/0012-Completely-disable-logging-in-ThreadStressTest.patch @@ -0,0 +1,26 @@ +From 478d6ee63ed8952b72e1b8f8fb993d891a75088a Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Tue, 5 Nov 2013 14:27:16 +0100 +Subject: [PATCH 12/39] Completely disable logging in ThreadStressTest + +Related to rhbz#1055581 +--- + test/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index f322e9f..d208fdf 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -236,7 +236,7 @@ _add_test(run_cut_reason_message 2) + + add_custom_target( + run_thread_stress +- COMMAND LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/src ${Java_JAVA_EXECUTABLE} -agentlib:${AGENT_NAME}=caught=java.lang.ArrayIndexOutOfBoundsException,output= ThreadStressTest ++ COMMAND LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/src ${Java_JAVA_EXECUTABLE} -agentlib:${AGENT_NAME}=caught=java.lang.ArrayIndexOutOfBoundsException,journald=no ThreadStressTest + DEPENDS ${TEST_JAVA_TARGETS} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) +-- +1.8.3.1 + diff --git a/SOURCES/0013-Make-ThreadStressTest-configurable.patch b/SOURCES/0013-Make-ThreadStressTest-configurable.patch new file mode 100644 index 0000000..049b095 --- /dev/null +++ b/SOURCES/0013-Make-ThreadStressTest-configurable.patch @@ -0,0 +1,76 @@ +From c7ad6b92f423eecb0f6fe85ba422dde18af77fb7 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Wed, 13 Nov 2013 14:49:53 +0100 +Subject: [PATCH 13/39] Make ThreadStressTest configurable + +Related to rhbz#1055581 +--- + test/ThreadStressTest.java | 35 ++++++++++++++++++++++++++++++----- + 1 file changed, 30 insertions(+), 5 deletions(-) + +diff --git a/test/ThreadStressTest.java b/test/ThreadStressTest.java +index 981ba91..508190d 100644 +--- a/test/ThreadStressTest.java ++++ b/test/ThreadStressTest.java +@@ -1,5 +1,6 @@ + import java.io.*; + import java.util.*; ++import java.util.regex.*; + import java.net.*; + + +@@ -7,7 +8,7 @@ import java.net.*; + * @author Jakub Filak <jfilak@redhat.com> + */ + +-class ThreadCaughtException extends Thread { ++class StressThreadCaughtException extends Thread { + private void level_three() { + SimpleTest.throwAndCatchAllExceptions(); + } +@@ -42,14 +43,38 @@ public class ThreadStressTest { + * Entry point to this multi thread test. + */ + public static void main(String args[]) { ++ int repeats = 60; ++ int threads = 600; ++ ++ for (String arg : args) { ++ Scanner s = new Scanner(arg); ++ s.findInLine("^([^=]+)=(\\d+)$"); ++ MatchResult r = s.match(); ++ if (r.groupCount() != 2) { ++ System.err.println("Invalid argument format [reps|threads=number]: '" + arg + "'"); ++ System.exit(1); ++ } ++ switch (r.group(1)) { ++ case "reps": ++ repeats = Integer.parseInt(r.group(2)); ++ break; ++ case "threads": ++ threads = Integer.parseInt(r.group(2)); ++ break; ++ default: ++ System.err.println("Unknown argument '" + r.group(1) + "'"); ++ System.exit(1); ++ break; ++ } ++ } ++ + System.out.println("Test.java"); + + List tojoin = new LinkedList(); +- +- for (int i = 60; i != 0; --i) { +- for (int j = 600; j != 0; --j) { ++ for (int i = repeats; i != 0; --i) { ++ for (int j = threads; j != 0; --j) { + try { +- Thread t = new ThreadCaughtException(); ++ Thread t = new StressThreadCaughtException(); + tojoin.add(t); + System.out.println("Starting Thread: " + Integer.toString((i * j) + j)); + t.start(); +-- +1.8.3.1 + diff --git a/SOURCES/0014-Add-an-abstract-to-README.patch b/SOURCES/0014-Add-an-abstract-to-README.patch new file mode 100644 index 0000000..462863d --- /dev/null +++ b/SOURCES/0014-Add-an-abstract-to-README.patch @@ -0,0 +1,35 @@ +From aae392dd807e84b8742c42cd40090a0e25c6b7d3 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Mon, 2 Dec 2013 16:49:30 +0100 +Subject: [PATCH 14/39] Add an abstract to README + +Related to rhbz#1055581 +--- + README | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/README b/README +index f9545bd..bf0f8f3 100644 +--- a/README ++++ b/README +@@ -1,6 +1,17 @@ + README + ------ + ++ABRT Java Connector is a JVM agent which reports a Java exceptions to ABRT. The ++agent can report both caught and uncaught exceptions but by default it reports ++only uncaught exceptions. In order to be able to report even uncaught ++exceptions, the agent must register several JVMTI event callbacks and the ++processing inside of those callbacks have not-insignificant impact on the ++performance of an entire application. ++ ++ ++Usage ++----- ++ + It needs to be compiled as a shared native library (.so) and then loaded into + JVM using -agentlib command line parameter. + +-- +1.8.3.1 + diff --git a/SOURCES/0015-Check-error-codes-of-jvmti-functions.patch b/SOURCES/0015-Check-error-codes-of-jvmti-functions.patch new file mode 100644 index 0000000..8f76a0c --- /dev/null +++ b/SOURCES/0015-Check-error-codes-of-jvmti-functions.patch @@ -0,0 +1,323 @@ +From 4507e990bfaada71ebeeec800a1e22e869317b8b Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Sat, 4 Jan 2014 21:10:00 +0100 +Subject: [PATCH 15/39] Check error codes of jvmti functions + +Closes #24 +Related to rhbz#1051483 +--- + src/abrt-checker.c | 134 +++++++++++++++++++++++++++++++++++------------------ + 1 file changed, 90 insertions(+), 44 deletions(-) + +diff --git a/src/abrt-checker.c b/src/abrt-checker.c +index 26665d6..23101bd 100644 +--- a/src/abrt-checker.c ++++ b/src/abrt-checker.c +@@ -573,6 +573,9 @@ static void print_jvmti_error( + (void)(*jvmti_env)->GetErrorName(jvmti_env, error_code, &errnum_str); + msg_err = errnum_str == NULL ? "Unknown" : errnum_str; + fprintf(stderr, "ERROR: JVMTI: %d(%s): %s\n", error_code, msg_err, msg_str); ++ ++ if (NULL != errnum_str) ++ (*jvmti_env)->Deallocate(jvmti_env, (unsigned char *)errnum_str); + } + + +@@ -1547,6 +1550,7 @@ static jclass find_class_in_loaded_class( + JNIEnv *jni_env, + const char *searched_class_name) + { ++ jclass result = NULL; + jint num_classes = 0; + jclass *loaded_classes; + jvmtiError error = (*jvmti_env)->GetLoadedClasses(jvmti_env, &num_classes, &loaded_classes); +@@ -1559,7 +1563,7 @@ static jclass find_class_in_loaded_class( + if (NULL == class_class) + { + VERBOSE_PRINT("Cannot find java/lang/Class class"); +- return NULL; ++ goto find_class_in_loaded_class_cleanup; + } + + jmethodID get_name_method = (*jni_env)->GetMethodID(jni_env, class_class, "getName", "()Ljava/lang/String;"); +@@ -1567,10 +1571,9 @@ static jclass find_class_in_loaded_class( + { + VERBOSE_PRINT("Cannot find java.lang.Class.getName.()Ljava/lang/String;"); + (*jni_env)->DeleteLocalRef(jni_env, class_class); +- return NULL; ++ goto find_class_in_loaded_class_cleanup; + } + +- jclass result = NULL; + for (jint i = 0; NULL == result && i < num_classes; ++i) + { + jobject class_name = (*jni_env)->CallObjectMethod(jni_env, loaded_classes[i], get_name_method); +@@ -1590,7 +1593,10 @@ static jclass find_class_in_loaded_class( + (*jni_env)->DeleteLocalRef(jni_env, class_name); + } + +- /* Not calling DeleteLocalRef() on items in loaded_classes. Hopefully they will be deleted automatically */ ++find_class_in_loaded_class_cleanup: ++ if (NULL != loaded_classes) ++ (*jvmti_env)->Deallocate(jvmti_env, (unsigned char *)loaded_classes); ++ + return result; + } + +@@ -1866,8 +1872,9 @@ static void print_one_method_from_stack( + { + jvmtiError error_code; + jclass declaring_class; +- char *method_name = ""; +- char *declaring_class_name = ""; ++ char *method_name = NULL; ++ char *declaring_class_name = NULL; ++ char *source_file_name = NULL; + + error_code = (*jvmti_env)->GetMethodName(jvmti_env, stack_frame.method, &method_name, NULL, NULL); + if (error_code != JVMTI_ERROR_NONE) +@@ -1875,9 +1882,12 @@ static void print_one_method_from_stack( + return; + } + error_code = (*jvmti_env)->GetMethodDeclaringClass(jvmti_env, stack_frame.method, &declaring_class); +- check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__)); ++ if (check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__))) ++ goto print_one_method_from_stack_cleanup; ++ + error_code = (*jvmti_env)->GetClassSignature(jvmti_env, declaring_class, &declaring_class_name, NULL); +- check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__)); ++ if (check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__))) ++ goto print_one_method_from_stack_cleanup; + + if (error_code != JVMTI_ERROR_NONE) + { +@@ -1885,11 +1895,11 @@ static void print_one_method_from_stack( + } + char *updated_class_name = format_class_name_for_JNI_call(declaring_class_name); + int line_number = get_line_number(jvmti_env, stack_frame.method, stack_frame.location); +- char *source_file_name; + if (declaring_class != NULL) + { + error_code = (*jvmti_env)->GetSourceFileName(jvmti_env, declaring_class, &source_file_name); +- check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__)); ++ if (check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__))) ++ goto print_one_method_from_stack_cleanup; + } + + char buf[1000]; +@@ -1919,17 +1929,23 @@ static void print_one_method_from_stack( + } + #endif + ++print_one_method_from_stack_cleanup: + /* cleanup */ +- if (method_name != NULL) ++ if (NULL != method_name) + { + error_code = (*jvmti_env)->Deallocate(jvmti_env, (unsigned char*)method_name); + check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__)); + } +- if (declaring_class_name != NULL) ++ if (NULL != declaring_class_name) + { + error_code = (*jvmti_env)->Deallocate(jvmti_env, (unsigned char*)declaring_class_name); + check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__)); + } ++ if (NULL != source_file_name) ++ { ++ error_code = (*jvmti_env)->Deallocate(jvmti_env, (unsigned char*)source_file_name); ++ check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__)); ++ } + } + #endif /* GENERATE_JVMTI_STACK_TRACE */ + +@@ -1950,7 +1966,7 @@ static char *generate_stack_trace( + + char *stack_trace_str; + char buf[1000]; +- int count; ++ int count = -1; + int i; + + /* allocate string which will contain stack trace */ +@@ -1963,12 +1979,10 @@ static char *generate_stack_trace( + + /* get stack trace */ + error_code = (*jvmti_env)->GetStackTrace(jvmti_env, thread, 0, MAX_STACK_TRACE_DEPTH, stack_frames, &count); +- check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__)); +- + VERBOSE_PRINT("Number of records filled: %d\n", count); +- +- /* is stack trace empty? */ +- if (count < 1) ++ /* error or is stack trace empty? */ ++ if (check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__)) ++ || count < 1) + { + free(stack_trace_str); + return NULL; +@@ -2011,12 +2025,12 @@ static void JNICALL callback_on_exception( + { + jvmtiError error_code; + +- char *method_name_ptr; +- char *method_signature_ptr; +- char *class_name_ptr; +- char *class_signature_ptr; +- char *exception_name_ptr; +- char *updated_exception_name_ptr; ++ char *method_name_ptr = NULL; ++ char *method_signature_ptr = NULL; ++ char *class_name_ptr = NULL; ++ char *class_signature_ptr = NULL; ++ char *exception_name_ptr = NULL; ++ char *updated_exception_name_ptr = NULL; + + jclass method_class; + jclass exception_class; +@@ -2030,10 +2044,21 @@ static void JNICALL callback_on_exception( + exception_class = (*jni_env)->GetObjectClass(jni_env, exception_object); + + /* retrieve all required informations */ +- (*jvmti_env)->GetMethodName(jvmti_env, method, &method_name_ptr, &method_signature_ptr, NULL); +- (*jvmti_env)->GetMethodDeclaringClass(jvmti_env, method, &method_class); +- (*jvmti_env)->GetClassSignature(jvmti_env, method_class, &class_signature_ptr, NULL); +- (*jvmti_env)->GetClassSignature(jvmti_env, exception_class, &exception_name_ptr, NULL); ++ error_code = (*jvmti_env)->GetMethodName(jvmti_env, method, &method_name_ptr, &method_signature_ptr, NULL); ++ if (check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__))) ++ goto callback_on_exception_cleanup; ++ ++ error_code = (*jvmti_env)->GetMethodDeclaringClass(jvmti_env, method, &method_class); ++ if (check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__))) ++ goto callback_on_exception_cleanup; ++ ++ error_code = (*jvmti_env)->GetClassSignature(jvmti_env, method_class, &class_signature_ptr, NULL); ++ if (check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__))) ++ goto callback_on_exception_cleanup; ++ ++ error_code = (*jvmti_env)->GetClassSignature(jvmti_env, exception_class, &exception_name_ptr, NULL); ++ if (check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__))) ++ goto callback_on_exception_cleanup; + + /* readable class names */ + class_name_ptr = format_class_name(class_signature_ptr, '.'); +@@ -2090,6 +2115,7 @@ static void JNICALL callback_on_exception( + } + } + ++callback_on_exception_cleanup: + /* cleapup */ + if (method_name_ptr != NULL) + { +@@ -2131,9 +2157,9 @@ static void JNICALL callback_on_exception_catch( + { + jvmtiError error_code; + +- char *method_name_ptr; +- char *method_signature_ptr; +- char *class_signature_ptr; ++ char *method_name_ptr = NULL; ++ char *method_signature_ptr = NULL; ++ char *class_signature_ptr = NULL; + + jclass class; + +@@ -2141,9 +2167,17 @@ static void JNICALL callback_on_exception_catch( + enter_critical_section(jvmti_env, shared_lock); + + /* retrieve all required informations */ +- (*jvmti_env)->GetMethodName(jvmti_env, method, &method_name_ptr, &method_signature_ptr, NULL); +- (*jvmti_env)->GetMethodDeclaringClass(jvmti_env, method, &class); +- (*jvmti_env)->GetClassSignature(jvmti_env, class, &class_signature_ptr, NULL); ++ error_code = (*jvmti_env)->GetMethodName(jvmti_env, method, &method_name_ptr, &method_signature_ptr, NULL); ++ if (check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__))) ++ goto callback_on_exception_catch_cleanup; ++ ++ error_code = (*jvmti_env)->GetMethodDeclaringClass(jvmti_env, method, &class); ++ if (check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__))) ++ goto callback_on_exception_catch_cleanup; ++ ++ error_code = (*jvmti_env)->GetClassSignature(jvmti_env, class, &class_signature_ptr, NULL); ++ if (check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__))) ++ goto callback_on_exception_catch_cleanup; + + #ifdef VERBOSE + /* readable class name */ +@@ -2152,6 +2186,7 @@ static void JNICALL callback_on_exception_catch( + + VERBOSE_PRINT("An exception was caught in a method %s%s() with signature %s\n", class_name_ptr, method_name_ptr, method_signature_ptr); + ++callback_on_exception_catch_cleanup: + /* cleapup */ + if (method_name_ptr != NULL) + { +@@ -2187,15 +2222,18 @@ static void JNICALL callback_on_object_alloc( + jclass object_klass, + jlong size) + { +- char *signature_ptr; ++ char *signature_ptr = NULL; + + enter_critical_section(jvmti_env, shared_lock); +- (*jvmti_env)->GetClassSignature(jvmti_env, object_klass, &signature_ptr, NULL); ++ jvmtiError error_code = (*jvmti_env)->GetClassSignature(jvmti_env, object_klass, &signature_ptr, NULL); ++ if (check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__))) ++ return; + + if (size >= VM_MEMORY_ALLOCATION_THRESHOLD) + { + INFO_PRINT("object allocation: instance of class %s, allocated %ld bytes\n", signature_ptr, (long int)size); + } ++ + (*jvmti_env)->Deallocate(jvmti_env, (unsigned char *)signature_ptr); + exit_critical_section(jvmti_env, shared_lock); + } +@@ -2281,17 +2319,23 @@ static void JNICALL callback_on_compiled_method_load( + enter_critical_section(jvmti_env, shared_lock); + + error_code = (*jvmti_env)->GetMethodName(jvmti_env, method, &name, &signature, &generic_ptr); +- check_jvmti_error(jvmti_env, error_code, "get method name"); ++ if (check_jvmti_error(jvmti_env, error_code, "get method name")) ++ goto callback_on_compiled_method_load_cleanup; + + error_code = (*jvmti_env)->GetMethodDeclaringClass(jvmti_env, method, &class); +- check_jvmti_error(jvmti_env, error_code, "get method declaring class"); +- (*jvmti_env)->GetClassSignature(jvmti_env, class, &class_signature, NULL); ++ if (check_jvmti_error(jvmti_env, error_code, "get method declaring class")) ++ goto callback_on_compiled_method_load_cleanup; ++ ++ error_code = (*jvmti_env)->GetClassSignature(jvmti_env, class, &class_signature, NULL); ++ if (check_jvmti_error(jvmti_env, error_code, "get method name")) ++ goto callback_on_compiled_method_load_cleanup; + + INFO_PRINT("Compiling method: %s.%s with signature %s %s Code size: %5d\n", + class_signature == NULL ? "" : class_signature, + name, signature, + generic_ptr == NULL ? "" : generic_ptr, (int)code_size); + ++callback_on_compiled_method_load_cleanup: + if (name != NULL) + { + error_code = (*jvmti_env)->Deallocate(jvmti_env, (unsigned char*)name); +@@ -2533,11 +2577,13 @@ jvmtiError print_jvmti_version(jvmtiEnv *jvmti_env __UNUSED_VAR) + jint cmajor, cminor, cmicro; + + error_code = (*jvmti_env)->GetVersionNumber(jvmti_env, &version); +- +- cmajor = (version & JVMTI_VERSION_MASK_MAJOR) >> JVMTI_VERSION_SHIFT_MAJOR; +- cminor = (version & JVMTI_VERSION_MASK_MINOR) >> JVMTI_VERSION_SHIFT_MINOR; +- cmicro = (version & JVMTI_VERSION_MASK_MICRO) >> JVMTI_VERSION_SHIFT_MICRO; +- printf("Compile Time JVMTI Version: %d.%d.%d (0x%08x)\n", cmajor, cminor, cmicro, version); ++ if (!check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__))) ++ { ++ cmajor = (version & JVMTI_VERSION_MASK_MAJOR) >> JVMTI_VERSION_SHIFT_MAJOR; ++ cminor = (version & JVMTI_VERSION_MASK_MINOR) >> JVMTI_VERSION_SHIFT_MINOR; ++ cmicro = (version & JVMTI_VERSION_MASK_MICRO) >> JVMTI_VERSION_SHIFT_MICRO; ++ printf("Compile Time JVMTI Version: %d.%d.%d (0x%08x)\n", cmajor, cminor, cmicro, version); ++ } + + return error_code; + #else +-- +1.8.3.1 + diff --git a/SOURCES/0016-Use-the-last-frame-s-class-path-for-executable.patch b/SOURCES/0016-Use-the-last-frame-s-class-path-for-executable.patch new file mode 100644 index 0000000..79b9353 --- /dev/null +++ b/SOURCES/0016-Use-the-last-frame-s-class-path-for-executable.patch @@ -0,0 +1,1245 @@ +From 76e0ad5d08d88f7535291ea7b4f1807f52cdd494 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Mon, 6 Jan 2014 17:08:21 +0100 +Subject: [PATCH 16/39] Use the last frame's class path for executable + +Fixes #26 +Related to rhbz#1054737 +--- + src/abrt-checker.c | 84 ++++++++++++++++--------- + test/CMakeLists.txt | 17 ++++- + test/MultiThreadTest.java | 22 +++---- + test/RemoteTest.java | 33 +++++++--- + test/ThreadCaughtException.java | 9 +++ + test/ThreadUncaughtException.java | 9 +++ + test/outputs/Linux-armv7l/run_test.log.in | 17 +++++ + test/outputs/Linux-ppc/run_test.log.in | 16 +++++ + test/outputs/Linux-ppc64/run_test.log.in | 16 +++++ + test/outputs/Linux-s390/run_test.log.in | 16 +++++ + test/outputs/Linux-s390x/run_test.log.in | 16 +++++ + test/outputs/run.log.in | 2 + + test/outputs/run_bad_class.log.in | 1 + + test/outputs/run_cut_exception_namespace.log.in | 1 + + test/outputs/run_cut_method_class.log.in | 1 + + test/outputs/run_cut_method_namespace.log.in | 1 + + test/outputs/run_cut_reason_message.log.in | 1 + + test/outputs/run_inner.log.in | 2 + + test/outputs/run_jar.log.in | 2 + + test/outputs/run_missing_class_test.log.in | 1 + + test/outputs/run_package.log.in | 2 + + test/outputs/run_remote.log.in | 6 +- + test/outputs/run_remote_thread.log.in | 13 ++++ + test/outputs/run_threads.log.in | 6 +- + test/outputs/run_try_finally.log.in | 2 + + 25 files changed, 241 insertions(+), 55 deletions(-) + create mode 100644 test/ThreadCaughtException.java + create mode 100644 test/ThreadUncaughtException.java + create mode 100644 test/outputs/run_remote_thread.log.in + +diff --git a/src/abrt-checker.c b/src/abrt-checker.c +index 23101bd..c62d1ef 100644 +--- a/src/abrt-checker.c ++++ b/src/abrt-checker.c +@@ -520,6 +520,7 @@ static void register_abrt_event( + * Report a stack trace to all systems + */ + static void report_stacktrace( ++ const char *executable, + const char *message, + const char *stacktrace, + int sure_unique) +@@ -546,11 +547,15 @@ static void report_stacktrace( + { + log_print("%s", stacktrace); + } ++ if (executable) ++ { ++ log_print("executable: %s\n", executable); ++ } + + if (NULL != stacktrace && sure_unique) + { + VERBOSE_PRINT("Reporting stack trace to ABRT"); +- register_abrt_event(processProperties.main_class, message, stacktrace); ++ register_abrt_event(executable, message, stacktrace); + } + } + +@@ -967,19 +972,16 @@ static char * create_updated_class_name(char *class_name) + * Solution for JAR-style URI: + * file:/home/tester/abrt_connector/bin/JarTest.jar!/SimpleTest.class + */ +-static char * stripped_path_to_main_class(char *path_to_main_class) ++static char *extract_fs_path(char *url_path) + { +- /* strip "file:" from the beginning */ +- char *out = path_to_main_class + sizeof("file:") - 1; ++ char *jar_sfx = strstr(url_path, ".jar!"); ++ if (NULL != jar_sfx) ++ jar_sfx[sizeof(".jar") - 1] = '\0'; + +- char *excl = strchr(out, '!'); ++ if (strncmp("file:", url_path, sizeof("file:") - 1) == 0) ++ memmove(url_path, url_path + (sizeof("file:") - 1), 2 + strlen(url_path) - sizeof("file:")); + +- /* strip everything after '!' */ +- if (excl != NULL) +- { +- *excl = 0; +- } +- return out; ++ return url_path; + } + + +@@ -1053,16 +1055,7 @@ static char *get_main_class( + return UNKNOWN_CLASS_NAME; + } + +- /* Solution for JAR-style URI: +- * file:/home/tester/abrt_connector/bin/JarTest.jar!/SimpleTest.class +- */ +- if (strncpy("file:", path_to_class, sizeof("file:") == 0)) +- { +- return stripped_path_to_main_class(path_to_class); +- } +- +- /* path_to_class is allocated on heap -> ok to return this pointer */ +- return path_to_class; ++ return extract_fs_path(path_to_class); + } + + +@@ -1610,7 +1603,8 @@ static int print_stack_trace_element( + JNIEnv *jni_env, + jobject stack_frame, + char *stack_trace_str, +- unsigned max_length) ++ unsigned max_length, ++ char **class_fs_path) + { + jclass stack_frame_class = (*jni_env)->GetObjectClass(jni_env, stack_frame); + jmethodID get_class_name_method = (*jni_env)->GetMethodID(jni_env, stack_frame_class, "getClassName", "()Ljava/lang/String;"); +@@ -1654,6 +1648,14 @@ static int print_stack_trace_element( + if (updated_cls_name_str != NULL) + { + class_location = get_path_to_class(jvmti_env, jni_env, class_of_frame_method, updated_cls_name_str, TO_EXTERNAL_FORM_METHOD_NAME); ++ ++ if (NULL != class_fs_path) ++ { ++ *class_fs_path = get_path_to_class(jvmti_env, jni_env, class_of_frame_method, updated_cls_name_str, GET_PATH_METHOD_NAME); ++ if (NULL != *class_fs_path) ++ *class_fs_path = extract_fs_path(*class_fs_path); ++ } ++ + free(updated_cls_name_str); + } + (*jni_env)->DeleteLocalRef(jni_env, class_of_frame_method); +@@ -1704,7 +1706,8 @@ static int print_exception_stack_trace( + JNIEnv *jni_env, + jobject exception, + char *stack_trace_str, +- size_t max_stack_trace_lenght) ++ size_t max_stack_trace_lenght, ++ char **executable) + { + + jclass exception_class = (*jni_env)->GetObjectClass(jni_env, exception); +@@ -1769,7 +1772,14 @@ static int print_exception_stack_trace( + for (jint i = 0; i < array_size; ++i) + { + jobject frame_element = (*jni_env)->GetObjectArrayElement(jni_env, stack_trace_array, i); +- const int frame_wrote = print_stack_trace_element(jvmti_env, jni_env, frame_element, stack_trace_str + wrote, max_stack_trace_lenght - wrote); ++ ++ const int frame_wrote = print_stack_trace_element(jvmti_env, ++ jni_env, ++ frame_element, ++ stack_trace_str + wrote, ++ max_stack_trace_lenght - wrote, ++ ((NULL != executable && array_size - 1 == i) ? executable : NULL)); ++ + (*jni_env)->DeleteLocalRef(jni_env, frame_element); + + if (frame_wrote <= 0) +@@ -1791,7 +1801,8 @@ static char *generate_thread_stack_trace( + jvmtiEnv *jvmti_env, + JNIEnv *jni_env, + char *thread_name, +- jobject exception) ++ jobject exception, ++ char **executable) + { + char *stack_trace_str; + /* allocate string which will contain stack trace */ +@@ -1803,7 +1814,13 @@ static char *generate_thread_stack_trace( + } + + int wrote = snprintf(stack_trace_str, MAX_STACK_TRACE_STRING_LENGTH, "Exception in thread \"%s\" ", thread_name); +- int exception_wrote = print_exception_stack_trace(jvmti_env, jni_env, exception, stack_trace_str + wrote, MAX_STACK_TRACE_STRING_LENGTH - wrote); ++ int exception_wrote = print_exception_stack_trace(jvmti_env, ++ jni_env, ++ exception, ++ stack_trace_str + wrote, ++ MAX_STACK_TRACE_STRING_LENGTH - wrote, ++ executable); ++ + if (exception_wrote <= 0) + { + free(stack_trace_str); +@@ -1841,7 +1858,12 @@ static char *generate_thread_stack_trace( + strcat(stack_trace_str + wrote, CAUSED_STACK_TRACE_HEADER); + wrote += sizeof(CAUSED_STACK_TRACE_HEADER) - 1; + +- const int cause_wrote = print_exception_stack_trace(jvmti_env, jni_env, cause, stack_trace_str + wrote, MAX_STACK_TRACE_STRING_LENGTH - wrote); ++ const int cause_wrote = print_exception_stack_trace(jvmti_env, ++ jni_env, ++ cause, ++ stack_trace_str + wrote, ++ MAX_STACK_TRACE_STRING_LENGTH - wrote, ++ /*No executable*/NULL); + + if (cause_wrote <= 0) + { /* < 0 : this should never happen, snprintf() usually works w/o errors */ +@@ -2098,13 +2120,17 @@ static void JNICALL callback_on_exception( + char *message = format_exception_reason_message(/*caught?*/NULL != catch_method, + updated_exception_name_ptr, class_name_ptr, method_name_ptr); + +- char *stack_trace_str = generate_thread_stack_trace(jvmti_env, jni_env, tname, exception_object); ++ char *executable = NULL; ++ char *stack_trace_str = generate_thread_stack_trace(jvmti_env, jni_env, tname, exception_object, &executable); + + const char *report_message = message; + if (NULL == report_message) + report_message = (NULL != catch_method) ? "Caught exception" : "Uncaught exception"; + +- report_stacktrace(report_message, stack_trace_str, NULL != threads_exc_buf); ++ report_stacktrace(NULL != executable ? executable : processProperties.main_class, ++ report_message, ++ stack_trace_str, ++ NULL != threads_exc_buf); + + free(message); + free(stack_trace_str); +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index d208fdf..6be9498 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -42,7 +42,9 @@ endfunction() + + _add_class_target(SimpleTest TEST_JAVA_TARGETS) + _add_class_target(RemoteTest TEST_JAVA_TARGETS SimpleTest) +-_add_class_target(MultiThreadTest TEST_JAVA_TARGETS SimpleTest) ++_add_class_target(ThreadCaughtException TEST_JAVA_TARGETS SimpleTest) ++_add_class_target(ThreadUncaughtException TEST_JAVA_TARGETS SimpleTest) ++_add_class_target(MultiThreadTest TEST_JAVA_TARGETS SimpleTest ThreadCaughtException ThreadUncaughtException) + _add_class_target(Test TEST_JAVA_TARGETS) + _add_class_target(com/redhat/abrt/test/Test TEST_JAVA_TARGETS) + _add_class_target(com/redhat/abrt/test/UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames TEST_JAVA_TARGETS) +@@ -55,7 +57,7 @@ _add_class_target(OverridenEqualExceptionTest TEST_JAVA_TARGETS) + _add_class_target(NoException TEST_JAVA_TARGETS) + _add_class_target(ThreadStressTest TEST_JAVA_TARGETS SimpleTest) + +-_add_jar_target(JarTest JAR_TEST_PATH SimpleTest) ++_add_jar_target(JarTest JAR_TEST_PATH SimpleTest ThreadCaughtException ThreadUncaughtException MultiThreadTest) + set(REMOTE_JAR_PATH ${HTTP_DIR}/JarTest.jar) + + add_custom_target(AllTestClasses DEPENDS ${TEST_JAVA_TARGETS}) +@@ -102,7 +104,7 @@ function(_add_test_target target_name) + add_custom_target( + ${target_name} + ${pre_command} +- COMMAND LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/src ${Java_JAVA_EXECUTABLE} -agentlib:${AGENT_NAME}="${agent_options},abrt=$$ABRT_ENABLED,output=${target_name}.log" ${java_params} -platform.jvmtiSupported true ++ COMMAND LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/src ${Java_JAVA_EXECUTABLE} -agentlib:${AGENT_NAME}="${agent_options},abrt=$$ABRT_ENABLED,output=${target_name}.log" ${java_params} + DEPENDS AbrtChecker ${depends} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) +@@ -274,6 +276,15 @@ add_custom_target( + ) + add_test(test_default_no_log_file make run_default_no_log_file) + ++_add_test_target( ++ run_remote_thread ++ RemoteTest ${JAR_TEST_PATH} MultiThreadTest ++ PRE rm -f SimpleTest.class ThreadCaughtException.class ThreadUncaughtException.class MultiThreadTest.class ++ DEPENDS ${TEST_JAVA_TARGETS} ${JAR_TEST_PATH} ++ AGENT_OPTIONS caught=java.lang.ArrayIndexOutOfBoundsException:java.lang.NullPointerException ++) ++_add_test(run_remote_thread 0) ++ + + get_directory_property(all_run_targets ALL_RUN_TARGETS) + add_custom_target(run_all DEPENDS ${all_run_targets}) +diff --git a/test/MultiThreadTest.java b/test/MultiThreadTest.java +index a200314..316b864 100644 +--- a/test/MultiThreadTest.java ++++ b/test/MultiThreadTest.java +@@ -1,6 +1,5 @@ + import java.io.*; + import java.net.*; +-//import SimpleTest; + + + /** +@@ -8,19 +7,18 @@ import java.net.*; + * @author Jakub Filak <jfilak@redhat.com> + */ + +-class ThreadCaughtException extends Thread { +- public void run() { +- SimpleTest.throwAndCatchAllExceptions(); ++public class MultiThreadTest { ++ ++ public static void throwAndCatchAllExceptions() ++ { ++ runThread(new ThreadCaughtException()); + } +-} + +-class ThreadUncaughtException extends Thread { +- public void run() { +- SimpleTest.throwAndDontCatchException(); ++ public static void throwAndDontCatchException() ++ { ++ runThread(new ThreadUncaughtException()); + } +-} + +-public class MultiThreadTest { + public static void runThread(Thread t) { + t.start(); + try { +@@ -36,9 +34,9 @@ public class MultiThreadTest { + */ + public static void main(String args[]) { + System.out.println("Test.java"); +- runThread(new ThreadCaughtException()); ++ throwAndCatchAllExceptions(); + System.out.println("continue..."); +- runThread(new ThreadUncaughtException()); ++ throwAndDontCatchException(); + System.exit(0); + } + } +diff --git a/test/RemoteTest.java b/test/RemoteTest.java +index e657ae4..6071f8e 100644 +--- a/test/RemoteTest.java ++++ b/test/RemoteTest.java +@@ -57,32 +57,51 @@ public class RemoteTest { + * Entry point to this simple test. + */ + public static void main(String args[]) throws IOException, NoSuchMethodException, MalformedURLException, IllegalAccessException, ClassNotFoundException, InvocationTargetException { ++ String testClassName = "SimpleTest"; ++ Class testClassInstance = null; ++ ++ if (args.length == 2) { ++ testClassName = args[1]; ++ } ++ else if (args.length > 2) { ++ System.out.println("Accepts either none or one argument."); ++ System.exit(1); ++ } ++ + HttpServer server = HttpServer.create(new InetSocketAddress(54321), 0); + server.createContext("/", new JarGetter(args[0])); + server.setExecutor(null); // creates a default executor + server.start(); + +- Class simpleTestClass = null; +- + try { + Method method = URLClassLoader.class.getDeclaredMethod("addURL", new Class[]{URL.class}); + method.setAccessible(true); + method.invoke(ClassLoader.getSystemClassLoader(), new Object[]{new URL("http://localhost:54321/JarTest.jar")}); +- simpleTestClass = Class.forName("SimpleTest"); ++ ++ /* Loaded these classes into cache. */ ++ final String needed[] = {"SimpleTest", "ThreadUncaughtException", "ThreadCaughtException"}; ++ for (String requiredClass : needed) { ++ if (null == Class.forName(requiredClass)) { ++ System.out.println("Cannot get required class: " + requiredClass); ++ System.exit(1); ++ } ++ } ++ ++ testClassInstance = Class.forName(testClassName); + } + finally { + server.stop(0); + } + +- if (null == simpleTestClass) { +- System.out.println("Cannot get SimpleTest class ..."); ++ if (null == testClassInstance) { ++ System.out.println("Cannot get " + testClassName + ".class ..."); + System.exit(1); + } + + System.out.println("RemoteTest.java " + args[0]); +- simpleTestClass.getMethod("throwAndCatchAllExceptions").invoke(null); ++ testClassInstance.getMethod("throwAndCatchAllExceptions").invoke(null); + System.out.println("continue..."); +- simpleTestClass.getMethod("throwAndDontCatchException").invoke(null); ++ testClassInstance.getMethod("throwAndDontCatchException").invoke(null); + System.out.println("If everything works we should not see this message :)"); + System.exit(0); + } +diff --git a/test/ThreadCaughtException.java b/test/ThreadCaughtException.java +new file mode 100644 +index 0000000..5926ee3 +--- /dev/null ++++ b/test/ThreadCaughtException.java +@@ -0,0 +1,9 @@ ++/** ++ * @author Jakub Filak <jfilak@redhat.com> ++ */ ++ ++public class ThreadCaughtException extends Thread { ++ public void run() { ++ SimpleTest.throwAndCatchAllExceptions(); ++ } ++} +diff --git a/test/ThreadUncaughtException.java b/test/ThreadUncaughtException.java +new file mode 100644 +index 0000000..abc4ed1 +--- /dev/null ++++ b/test/ThreadUncaughtException.java +@@ -0,0 +1,9 @@ ++/** ++ * @author Jakub Filak <jfilak@redhat.com> ++ */ ++ ++public class ThreadUncaughtException extends Thread { ++ public void run() { ++ SimpleTest.throwAndDontCatchException(); ++ } ++} +diff --git a/test/outputs/Linux-armv7l/run_test.log.in b/test/outputs/Linux-armv7l/run_test.log.in +index 5c9e7f7..483aed5 100644 +--- a/test/outputs/Linux-armv7l/run_test.log.in ++++ b/test/outputs/Linux-armv7l/run_test.log.in +@@ -5,6 +5,7 @@ Exception in thread "main" java.io.FileNotFoundException: _wrong_file_ (No such + at Test.readWrongFile(Test.java:89) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:461) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable= @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.() + Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied) + at java.io.FileInputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] +@@ -12,6 +13,7 @@ Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permiss + at Test.readUnreadableFile(Test.java:111) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:462) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable= @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.io.FileNotFoundException in method java.io.FileOutputStream.() + Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied) + at java.io.FileOutputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class] +@@ -20,6 +22,7 @@ Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permiss + at Test.writeToUnwritableFile(Test.java:134) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:463) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable= @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.NumberFormatException in method java.lang.Integer.parseInt() + Exception in thread "main" java.lang.NumberFormatException: null + at java.lang.Integer.parseInt(Integer.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Integer.class] +@@ -38,6 +41,7 @@ Exception in thread "main" java.lang.NumberFormatException: null + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable= @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.net.UnknownHostException in method java.net.InetAddress$1.lookupAllHostAddr() + Exception in thread "main" java.net.UnknownHostException: xyzzy: Name or service not known + at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/Inet6AddressImpl.class] +@@ -52,6 +56,7 @@ Exception in thread "main" java.net.UnknownHostException: xyzzy: Name or service + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable= @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.net.UnknownHostException in method java.net.AbstractPlainSocketImpl.connect() + Exception in thread "main" java.net.UnknownHostException: xyzzy + at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/AbstractPlainSocketImpl.class] +@@ -63,6 +68,7 @@ Exception in thread "main" java.net.UnknownHostException: xyzzy + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable= @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.net.ConnectException in method java.net.AbstractPlainSocketImpl.doConnect() + Exception in thread "main" java.net.ConnectException: Connection refused + at java.net.PlainSocketImpl.socketConnect(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/PlainSocketImpl.class] +@@ -77,6 +83,7 @@ Exception in thread "main" java.net.ConnectException: Connection refused + at Test.readFromSocket(Test.java:177) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:474) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable= @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.NumberFormatException in method java.lang.Long.parseLong() + Exception in thread "main" java.lang.NumberFormatException: null + at java.lang.Long.parseLong(Long.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Long.class] +@@ -86,6 +93,7 @@ Exception in thread "main" java.lang.NumberFormatException: null + at Test.readFromURL(Test.java:237) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:475) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable= @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.io.FileNotFoundException in method sun.net.www.protocol.http.HttpURLConnection.getInputStream() + Exception in thread "main" java.io.FileNotFoundException: http://localhost:54321/_this_does_not_exists_ + at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/sun/net/www/protocol/http/HttpURLConnection.class] +@@ -93,6 +101,7 @@ Exception in thread "main" java.io.FileNotFoundException: http://localhost:54321 + at Test.readFromURL(Test.java:237) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:475) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable= @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.net.MalformedURLException in method java.net.URL.() + Exception in thread "main" java.net.MalformedURLException: no protocol: @#$%^&malformed URL@#$%^&*() + at java.net.URL.(URL.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URL.class] +@@ -101,12 +110,14 @@ Exception in thread "main" java.net.MalformedURLException: no protocol: @#$%^&ma + at Test.malformedURL(Test.java:194) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:476) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable= @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.ArrayIndexOutOfBoundsException in method Test.throwIndexOutOfBoundsException() + Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 42 + at Test.throwIndexOutOfBoundsException(Test.java:266) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchIndexOutOfBoundsException(Test.java:347) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:486) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable= @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.StringIndexOutOfBoundsException in method java.lang.String.charAt() + Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1 + at java.lang.String.charAt(String.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/String.class] +@@ -114,18 +125,21 @@ Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String ind + at Test.catchStringIndexOutOfBoundsException(Test.java:362) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:487) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable= @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.NullPointerException in method Test.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at Test.throwNullPointerException(Test.java:290) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchNullPointerException(Test.java:377) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:488) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable= @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.ClassCastException in method Test.throwClassCastException() + Exception in thread "main" java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String + at Test.throwClassCastException(Test.java:302) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchClassCastException(Test.java:392) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:489) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable= @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.UnsatisfiedLinkError in method java.lang.Runtime.load0() + Exception in thread "main" java.lang.UnsatisfiedLinkError: Expecting an absolute path of the library: xyzzy + at java.lang.Runtime.load0(Runtime.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Runtime.class] +@@ -134,6 +148,7 @@ Exception in thread "main" java.lang.UnsatisfiedLinkError: Expecting an absolute + at Test.catchUnsatisfiedLinkErrorUserLibrary(Test.java:422) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:491) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable= @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.UnsatisfiedLinkError in method java.lang.ClassLoader.loadLibrary() + Exception in thread "main" java.lang.UnsatisfiedLinkError: no xyzzy in java.library.path + at java.lang.ClassLoader.loadLibrary(ClassLoader.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/ClassLoader.class] +@@ -143,8 +158,10 @@ Exception in thread "main" java.lang.UnsatisfiedLinkError: no xyzzy in java.libr + at Test.catchUnsatisfiedLinkErrorSystemLibrary(Test.java:437) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:492) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable= @CMAKE_BINARY_DIR@/test/Test.class + Uncaught exception java.lang.NullPointerException in method Test.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at Test.throwNullPointerException(Test.java:290) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndDontCatchException(Test.java:501) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:518) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable= @CMAKE_BINARY_DIR@/test/Test.class +diff --git a/test/outputs/Linux-ppc/run_test.log.in b/test/outputs/Linux-ppc/run_test.log.in +index 5c9e7f7..6134d09 100644 +--- a/test/outputs/Linux-ppc/run_test.log.in ++++ b/test/outputs/Linux-ppc/run_test.log.in +@@ -5,6 +5,7 @@ Exception in thread "main" java.io.FileNotFoundException: _wrong_file_ (No such + at Test.readWrongFile(Test.java:89) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:461) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.() + Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied) + at java.io.FileInputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] +@@ -12,6 +13,7 @@ Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permiss + at Test.readUnreadableFile(Test.java:111) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:462) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.io.FileNotFoundException in method java.io.FileOutputStream.() + Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied) + at java.io.FileOutputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class] +@@ -20,6 +22,7 @@ Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permiss + at Test.writeToUnwritableFile(Test.java:134) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:463) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.NumberFormatException in method java.lang.Integer.parseInt() + Exception in thread "main" java.lang.NumberFormatException: null + at java.lang.Integer.parseInt(Integer.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Integer.class] +@@ -38,6 +41,7 @@ Exception in thread "main" java.lang.NumberFormatException: null + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.net.UnknownHostException in method java.net.InetAddress$1.lookupAllHostAddr() + Exception in thread "main" java.net.UnknownHostException: xyzzy: Name or service not known + at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/Inet6AddressImpl.class] +@@ -52,6 +56,7 @@ Exception in thread "main" java.net.UnknownHostException: xyzzy: Name or service + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.net.UnknownHostException in method java.net.AbstractPlainSocketImpl.connect() + Exception in thread "main" java.net.UnknownHostException: xyzzy + at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/AbstractPlainSocketImpl.class] +@@ -63,6 +68,7 @@ Exception in thread "main" java.net.UnknownHostException: xyzzy + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.net.ConnectException in method java.net.AbstractPlainSocketImpl.doConnect() + Exception in thread "main" java.net.ConnectException: Connection refused + at java.net.PlainSocketImpl.socketConnect(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/PlainSocketImpl.class] +@@ -77,6 +83,7 @@ Exception in thread "main" java.net.ConnectException: Connection refused + at Test.readFromSocket(Test.java:177) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:474) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.NumberFormatException in method java.lang.Long.parseLong() + Exception in thread "main" java.lang.NumberFormatException: null + at java.lang.Long.parseLong(Long.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Long.class] +@@ -86,6 +93,7 @@ Exception in thread "main" java.lang.NumberFormatException: null + at Test.readFromURL(Test.java:237) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:475) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.io.FileNotFoundException in method sun.net.www.protocol.http.HttpURLConnection.getInputStream() + Exception in thread "main" java.io.FileNotFoundException: http://localhost:54321/_this_does_not_exists_ + at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/sun/net/www/protocol/http/HttpURLConnection.class] +@@ -93,6 +101,7 @@ Exception in thread "main" java.io.FileNotFoundException: http://localhost:54321 + at Test.readFromURL(Test.java:237) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:475) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.net.MalformedURLException in method java.net.URL.() + Exception in thread "main" java.net.MalformedURLException: no protocol: @#$%^&malformed URL@#$%^&*() + at java.net.URL.(URL.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URL.class] +@@ -101,12 +110,14 @@ Exception in thread "main" java.net.MalformedURLException: no protocol: @#$%^&ma + at Test.malformedURL(Test.java:194) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:476) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.ArrayIndexOutOfBoundsException in method Test.throwIndexOutOfBoundsException() + Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 42 + at Test.throwIndexOutOfBoundsException(Test.java:266) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchIndexOutOfBoundsException(Test.java:347) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:486) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.StringIndexOutOfBoundsException in method java.lang.String.charAt() + Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1 + at java.lang.String.charAt(String.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/String.class] +@@ -114,18 +125,21 @@ Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String ind + at Test.catchStringIndexOutOfBoundsException(Test.java:362) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:487) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.NullPointerException in method Test.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at Test.throwNullPointerException(Test.java:290) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchNullPointerException(Test.java:377) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:488) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.ClassCastException in method Test.throwClassCastException() + Exception in thread "main" java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String + at Test.throwClassCastException(Test.java:302) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchClassCastException(Test.java:392) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:489) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.UnsatisfiedLinkError in method java.lang.Runtime.load0() + Exception in thread "main" java.lang.UnsatisfiedLinkError: Expecting an absolute path of the library: xyzzy + at java.lang.Runtime.load0(Runtime.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Runtime.class] +@@ -134,6 +148,7 @@ Exception in thread "main" java.lang.UnsatisfiedLinkError: Expecting an absolute + at Test.catchUnsatisfiedLinkErrorUserLibrary(Test.java:422) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:491) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.UnsatisfiedLinkError in method java.lang.ClassLoader.loadLibrary() + Exception in thread "main" java.lang.UnsatisfiedLinkError: no xyzzy in java.library.path + at java.lang.ClassLoader.loadLibrary(ClassLoader.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/ClassLoader.class] +@@ -147,4 +162,5 @@ Uncaught exception java.lang.NullPointerException in method Test.throwNullPointe + Exception in thread "main" java.lang.NullPointerException + at Test.throwNullPointerException(Test.java:290) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndDontCatchException(Test.java:501) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + at Test.main(Test.java:518) [file:@CMAKE_BINARY_DIR@/test/Test.class] +diff --git a/test/outputs/Linux-ppc64/run_test.log.in b/test/outputs/Linux-ppc64/run_test.log.in +index 5c9e7f7..fcf63cb 100644 +--- a/test/outputs/Linux-ppc64/run_test.log.in ++++ b/test/outputs/Linux-ppc64/run_test.log.in +@@ -5,6 +5,7 @@ Exception in thread "main" java.io.FileNotFoundException: _wrong_file_ (No such + at Test.readWrongFile(Test.java:89) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:461) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.() + Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied) + at java.io.FileInputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] +@@ -12,6 +13,7 @@ Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permiss + at Test.readUnreadableFile(Test.java:111) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:462) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.io.FileNotFoundException in method java.io.FileOutputStream.() + Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied) + at java.io.FileOutputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class] +@@ -20,6 +22,7 @@ Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permiss + at Test.writeToUnwritableFile(Test.java:134) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:463) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.NumberFormatException in method java.lang.Integer.parseInt() + Exception in thread "main" java.lang.NumberFormatException: null + at java.lang.Integer.parseInt(Integer.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Integer.class] +@@ -38,6 +41,7 @@ Exception in thread "main" java.lang.NumberFormatException: null + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.net.UnknownHostException in method java.net.InetAddress$1.lookupAllHostAddr() + Exception in thread "main" java.net.UnknownHostException: xyzzy: Name or service not known + at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/Inet6AddressImpl.class] +@@ -52,6 +56,7 @@ Exception in thread "main" java.net.UnknownHostException: xyzzy: Name or service + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.net.UnknownHostException in method java.net.AbstractPlainSocketImpl.connect() + Exception in thread "main" java.net.UnknownHostException: xyzzy + at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/AbstractPlainSocketImpl.class] +@@ -63,6 +68,7 @@ Exception in thread "main" java.net.UnknownHostException: xyzzy + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.net.ConnectException in method java.net.AbstractPlainSocketImpl.doConnect() + Exception in thread "main" java.net.ConnectException: Connection refused + at java.net.PlainSocketImpl.socketConnect(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/PlainSocketImpl.class] +@@ -77,6 +83,7 @@ Exception in thread "main" java.net.ConnectException: Connection refused + at Test.readFromSocket(Test.java:177) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:474) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.NumberFormatException in method java.lang.Long.parseLong() + Exception in thread "main" java.lang.NumberFormatException: null + at java.lang.Long.parseLong(Long.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Long.class] +@@ -86,6 +93,7 @@ Exception in thread "main" java.lang.NumberFormatException: null + at Test.readFromURL(Test.java:237) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:475) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.io.FileNotFoundException in method sun.net.www.protocol.http.HttpURLConnection.getInputStream() + Exception in thread "main" java.io.FileNotFoundException: http://localhost:54321/_this_does_not_exists_ + at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/sun/net/www/protocol/http/HttpURLConnection.class] +@@ -93,6 +101,7 @@ Exception in thread "main" java.io.FileNotFoundException: http://localhost:54321 + at Test.readFromURL(Test.java:237) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:475) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.net.MalformedURLException in method java.net.URL.() + Exception in thread "main" java.net.MalformedURLException: no protocol: @#$%^&malformed URL@#$%^&*() + at java.net.URL.(URL.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URL.class] +@@ -101,12 +110,14 @@ Exception in thread "main" java.net.MalformedURLException: no protocol: @#$%^&ma + at Test.malformedURL(Test.java:194) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:476) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.ArrayIndexOutOfBoundsException in method Test.throwIndexOutOfBoundsException() + Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 42 + at Test.throwIndexOutOfBoundsException(Test.java:266) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchIndexOutOfBoundsException(Test.java:347) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:486) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.StringIndexOutOfBoundsException in method java.lang.String.charAt() + Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1 + at java.lang.String.charAt(String.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/String.class] +@@ -114,18 +125,21 @@ Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String ind + at Test.catchStringIndexOutOfBoundsException(Test.java:362) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:487) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.NullPointerException in method Test.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at Test.throwNullPointerException(Test.java:290) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchNullPointerException(Test.java:377) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:488) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.ClassCastException in method Test.throwClassCastException() + Exception in thread "main" java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String + at Test.throwClassCastException(Test.java:302) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchClassCastException(Test.java:392) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:489) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.UnsatisfiedLinkError in method java.lang.Runtime.load0() + Exception in thread "main" java.lang.UnsatisfiedLinkError: Expecting an absolute path of the library: xyzzy + at java.lang.Runtime.load0(Runtime.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Runtime.class] +@@ -134,6 +148,7 @@ Exception in thread "main" java.lang.UnsatisfiedLinkError: Expecting an absolute + at Test.catchUnsatisfiedLinkErrorUserLibrary(Test.java:422) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:491) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.UnsatisfiedLinkError in method java.lang.ClassLoader.loadLibrary() + Exception in thread "main" java.lang.UnsatisfiedLinkError: no xyzzy in java.library.path + at java.lang.ClassLoader.loadLibrary(ClassLoader.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/ClassLoader.class] +@@ -148,3 +163,4 @@ Exception in thread "main" java.lang.NullPointerException + at Test.throwNullPointerException(Test.java:290) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndDontCatchException(Test.java:501) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:518) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class +diff --git a/test/outputs/Linux-s390/run_test.log.in b/test/outputs/Linux-s390/run_test.log.in +index 5c9e7f7..fcf63cb 100644 +--- a/test/outputs/Linux-s390/run_test.log.in ++++ b/test/outputs/Linux-s390/run_test.log.in +@@ -5,6 +5,7 @@ Exception in thread "main" java.io.FileNotFoundException: _wrong_file_ (No such + at Test.readWrongFile(Test.java:89) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:461) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.() + Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied) + at java.io.FileInputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] +@@ -12,6 +13,7 @@ Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permiss + at Test.readUnreadableFile(Test.java:111) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:462) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.io.FileNotFoundException in method java.io.FileOutputStream.() + Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied) + at java.io.FileOutputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class] +@@ -20,6 +22,7 @@ Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permiss + at Test.writeToUnwritableFile(Test.java:134) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:463) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.NumberFormatException in method java.lang.Integer.parseInt() + Exception in thread "main" java.lang.NumberFormatException: null + at java.lang.Integer.parseInt(Integer.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Integer.class] +@@ -38,6 +41,7 @@ Exception in thread "main" java.lang.NumberFormatException: null + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.net.UnknownHostException in method java.net.InetAddress$1.lookupAllHostAddr() + Exception in thread "main" java.net.UnknownHostException: xyzzy: Name or service not known + at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/Inet6AddressImpl.class] +@@ -52,6 +56,7 @@ Exception in thread "main" java.net.UnknownHostException: xyzzy: Name or service + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.net.UnknownHostException in method java.net.AbstractPlainSocketImpl.connect() + Exception in thread "main" java.net.UnknownHostException: xyzzy + at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/AbstractPlainSocketImpl.class] +@@ -63,6 +68,7 @@ Exception in thread "main" java.net.UnknownHostException: xyzzy + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.net.ConnectException in method java.net.AbstractPlainSocketImpl.doConnect() + Exception in thread "main" java.net.ConnectException: Connection refused + at java.net.PlainSocketImpl.socketConnect(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/PlainSocketImpl.class] +@@ -77,6 +83,7 @@ Exception in thread "main" java.net.ConnectException: Connection refused + at Test.readFromSocket(Test.java:177) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:474) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.NumberFormatException in method java.lang.Long.parseLong() + Exception in thread "main" java.lang.NumberFormatException: null + at java.lang.Long.parseLong(Long.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Long.class] +@@ -86,6 +93,7 @@ Exception in thread "main" java.lang.NumberFormatException: null + at Test.readFromURL(Test.java:237) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:475) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.io.FileNotFoundException in method sun.net.www.protocol.http.HttpURLConnection.getInputStream() + Exception in thread "main" java.io.FileNotFoundException: http://localhost:54321/_this_does_not_exists_ + at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/sun/net/www/protocol/http/HttpURLConnection.class] +@@ -93,6 +101,7 @@ Exception in thread "main" java.io.FileNotFoundException: http://localhost:54321 + at Test.readFromURL(Test.java:237) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:475) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.net.MalformedURLException in method java.net.URL.() + Exception in thread "main" java.net.MalformedURLException: no protocol: @#$%^&malformed URL@#$%^&*() + at java.net.URL.(URL.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URL.class] +@@ -101,12 +110,14 @@ Exception in thread "main" java.net.MalformedURLException: no protocol: @#$%^&ma + at Test.malformedURL(Test.java:194) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:476) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.ArrayIndexOutOfBoundsException in method Test.throwIndexOutOfBoundsException() + Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 42 + at Test.throwIndexOutOfBoundsException(Test.java:266) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchIndexOutOfBoundsException(Test.java:347) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:486) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.StringIndexOutOfBoundsException in method java.lang.String.charAt() + Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1 + at java.lang.String.charAt(String.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/String.class] +@@ -114,18 +125,21 @@ Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String ind + at Test.catchStringIndexOutOfBoundsException(Test.java:362) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:487) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.NullPointerException in method Test.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at Test.throwNullPointerException(Test.java:290) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchNullPointerException(Test.java:377) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:488) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.ClassCastException in method Test.throwClassCastException() + Exception in thread "main" java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String + at Test.throwClassCastException(Test.java:302) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchClassCastException(Test.java:392) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:489) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.UnsatisfiedLinkError in method java.lang.Runtime.load0() + Exception in thread "main" java.lang.UnsatisfiedLinkError: Expecting an absolute path of the library: xyzzy + at java.lang.Runtime.load0(Runtime.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Runtime.class] +@@ -134,6 +148,7 @@ Exception in thread "main" java.lang.UnsatisfiedLinkError: Expecting an absolute + at Test.catchUnsatisfiedLinkErrorUserLibrary(Test.java:422) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:491) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.UnsatisfiedLinkError in method java.lang.ClassLoader.loadLibrary() + Exception in thread "main" java.lang.UnsatisfiedLinkError: no xyzzy in java.library.path + at java.lang.ClassLoader.loadLibrary(ClassLoader.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/ClassLoader.class] +@@ -148,3 +163,4 @@ Exception in thread "main" java.lang.NullPointerException + at Test.throwNullPointerException(Test.java:290) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndDontCatchException(Test.java:501) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:518) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class +diff --git a/test/outputs/Linux-s390x/run_test.log.in b/test/outputs/Linux-s390x/run_test.log.in +index 5c9e7f7..fcf63cb 100644 +--- a/test/outputs/Linux-s390x/run_test.log.in ++++ b/test/outputs/Linux-s390x/run_test.log.in +@@ -5,6 +5,7 @@ Exception in thread "main" java.io.FileNotFoundException: _wrong_file_ (No such + at Test.readWrongFile(Test.java:89) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:461) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.() + Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied) + at java.io.FileInputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] +@@ -12,6 +13,7 @@ Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permiss + at Test.readUnreadableFile(Test.java:111) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:462) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.io.FileNotFoundException in method java.io.FileOutputStream.() + Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied) + at java.io.FileOutputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class] +@@ -20,6 +22,7 @@ Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permiss + at Test.writeToUnwritableFile(Test.java:134) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:463) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.NumberFormatException in method java.lang.Integer.parseInt() + Exception in thread "main" java.lang.NumberFormatException: null + at java.lang.Integer.parseInt(Integer.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Integer.class] +@@ -38,6 +41,7 @@ Exception in thread "main" java.lang.NumberFormatException: null + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.net.UnknownHostException in method java.net.InetAddress$1.lookupAllHostAddr() + Exception in thread "main" java.net.UnknownHostException: xyzzy: Name or service not known + at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/Inet6AddressImpl.class] +@@ -52,6 +56,7 @@ Exception in thread "main" java.net.UnknownHostException: xyzzy: Name or service + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.net.UnknownHostException in method java.net.AbstractPlainSocketImpl.connect() + Exception in thread "main" java.net.UnknownHostException: xyzzy + at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/AbstractPlainSocketImpl.class] +@@ -63,6 +68,7 @@ Exception in thread "main" java.net.UnknownHostException: xyzzy + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.net.ConnectException in method java.net.AbstractPlainSocketImpl.doConnect() + Exception in thread "main" java.net.ConnectException: Connection refused + at java.net.PlainSocketImpl.socketConnect(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/PlainSocketImpl.class] +@@ -77,6 +83,7 @@ Exception in thread "main" java.net.ConnectException: Connection refused + at Test.readFromSocket(Test.java:177) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:474) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.NumberFormatException in method java.lang.Long.parseLong() + Exception in thread "main" java.lang.NumberFormatException: null + at java.lang.Long.parseLong(Long.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Long.class] +@@ -86,6 +93,7 @@ Exception in thread "main" java.lang.NumberFormatException: null + at Test.readFromURL(Test.java:237) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:475) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.io.FileNotFoundException in method sun.net.www.protocol.http.HttpURLConnection.getInputStream() + Exception in thread "main" java.io.FileNotFoundException: http://localhost:54321/_this_does_not_exists_ + at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/sun/net/www/protocol/http/HttpURLConnection.class] +@@ -93,6 +101,7 @@ Exception in thread "main" java.io.FileNotFoundException: http://localhost:54321 + at Test.readFromURL(Test.java:237) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:475) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.net.MalformedURLException in method java.net.URL.() + Exception in thread "main" java.net.MalformedURLException: no protocol: @#$%^&malformed URL@#$%^&*() + at java.net.URL.(URL.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URL.class] +@@ -101,12 +110,14 @@ Exception in thread "main" java.net.MalformedURLException: no protocol: @#$%^&ma + at Test.malformedURL(Test.java:194) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:476) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.ArrayIndexOutOfBoundsException in method Test.throwIndexOutOfBoundsException() + Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 42 + at Test.throwIndexOutOfBoundsException(Test.java:266) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchIndexOutOfBoundsException(Test.java:347) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:486) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.StringIndexOutOfBoundsException in method java.lang.String.charAt() + Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1 + at java.lang.String.charAt(String.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/String.class] +@@ -114,18 +125,21 @@ Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String ind + at Test.catchStringIndexOutOfBoundsException(Test.java:362) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:487) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.NullPointerException in method Test.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at Test.throwNullPointerException(Test.java:290) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchNullPointerException(Test.java:377) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:488) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.ClassCastException in method Test.throwClassCastException() + Exception in thread "main" java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String + at Test.throwClassCastException(Test.java:302) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchClassCastException(Test.java:392) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:489) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.UnsatisfiedLinkError in method java.lang.Runtime.load0() + Exception in thread "main" java.lang.UnsatisfiedLinkError: Expecting an absolute path of the library: xyzzy + at java.lang.Runtime.load0(Runtime.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Runtime.class] +@@ -134,6 +148,7 @@ Exception in thread "main" java.lang.UnsatisfiedLinkError: Expecting an absolute + at Test.catchUnsatisfiedLinkErrorUserLibrary(Test.java:422) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:491) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.UnsatisfiedLinkError in method java.lang.ClassLoader.loadLibrary() + Exception in thread "main" java.lang.UnsatisfiedLinkError: no xyzzy in java.library.path + at java.lang.ClassLoader.loadLibrary(ClassLoader.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/ClassLoader.class] +@@ -148,3 +163,4 @@ Exception in thread "main" java.lang.NullPointerException + at Test.throwNullPointerException(Test.java:290) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndDontCatchException(Test.java:501) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:518) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class +diff --git a/test/outputs/run.log.in b/test/outputs/run.log.in +index 4dc5c62..aa8b2c8 100644 +--- a/test/outputs/run.log.in ++++ b/test/outputs/run.log.in +@@ -4,8 +4,10 @@ Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 42 + at SimpleTest.catchIndexOutOfBoundsException(SimpleTest.java:47) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] + at SimpleTest.throwAndCatchAllExceptions(SimpleTest.java:61) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] + at SimpleTest.main(SimpleTest.java:81) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] ++executable: @CMAKE_BINARY_DIR@/test/SimpleTest.class + Uncaught exception java.lang.NullPointerException in method SimpleTest.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at SimpleTest.throwNullPointerException(SimpleTest.java:36) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] + at SimpleTest.throwAndDontCatchException(SimpleTest.java:71) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] + at SimpleTest.main(SimpleTest.java:83) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] ++executable: @CMAKE_BINARY_DIR@/test/SimpleTest.class +diff --git a/test/outputs/run_bad_class.log.in b/test/outputs/run_bad_class.log.in +index a540d89..348f056 100644 +--- a/test/outputs/run_bad_class.log.in ++++ b/test/outputs/run_bad_class.log.in +@@ -10,3 +10,4 @@ Exception in thread "main" java.lang.ClassNotFoundException: foobar + at java.lang.Class.forName0(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Class.class] + at java.lang.Class.forName(Class.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Class.class] + at BadClassTest.main(BadClassTest.java:13) [file:@CMAKE_BINARY_DIR@/test/BadClassTest.class] ++executable: @CMAKE_BINARY_DIR@/test/BadClassTest.class +diff --git a/test/outputs/run_cut_exception_namespace.log.in b/test/outputs/run_cut_exception_namespace.log.in +index 75b54c1..5519865 100644 +--- a/test/outputs/run_cut_exception_namespace.log.in ++++ b/test/outputs/run_cut_exception_namespace.log.in +@@ -2,3 +2,4 @@ Uncaught exception UnbelievableLongJavaClassNameException in method Unbelievable + Exception in thread "main" com.redhat.abrt.test.UnbelievableLongJavaClassNameException + at com.redhat.abrt.test.UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.oneTwoThreeFroFiveSixSevenEightNineTenElevenTwelveThirteenSixteenSeventeenUpToOneHundredThousand(UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.java:40) [file:@CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.class] + at com.redhat.abrt.test.UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.main(UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.java:69) [file:@CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.class] ++executable: @CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.class +diff --git a/test/outputs/run_cut_method_class.log.in b/test/outputs/run_cut_method_class.log.in +index eb464a7..0a58804 100644 +--- a/test/outputs/run_cut_method_class.log.in ++++ b/test/outputs/run_cut_method_class.log.in +@@ -2,3 +2,4 @@ Uncaught exception UnbelievableLongJavaClassNameException in method oneTwoThreeF + Exception in thread "main" com.redhat.abrt.test.UnbelievableLongJavaClassNameException + at com.redhat.abrt.test.UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.oneTwoThreeFroFiveSixSevenEightNineTenElevenTwelveThirteenSixteenSeventeenEighteenNineteenTwentyUpToOneHundredThousand(UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.java:35) [file:@CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.class] + at com.redhat.abrt.test.UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.main(UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.java:65) [file:@CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.class] ++executable: @CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.class +diff --git a/test/outputs/run_cut_method_namespace.log.in b/test/outputs/run_cut_method_namespace.log.in +index 0ec2438..338819c 100644 +--- a/test/outputs/run_cut_method_namespace.log.in ++++ b/test/outputs/run_cut_method_namespace.log.in +@@ -2,3 +2,4 @@ Uncaught exception com.redhat.abrt.test.UnbelievableLongJavaClassNameException i + Exception in thread "main" com.redhat.abrt.test.UnbelievableLongJavaClassNameException + at com.redhat.abrt.test.UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.oneTwoThreeFroFiveSixSevenEightNineTenElevenTwelveThirteenSixteenUpToOneHundredThousand(UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.java:45) [file:@CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.class] + at com.redhat.abrt.test.UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.main(UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.java:73) [file:@CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.class] ++executable: @CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.class +diff --git a/test/outputs/run_cut_reason_message.log.in b/test/outputs/run_cut_reason_message.log.in +index 5364f65..0055fe7 100644 +--- a/test/outputs/run_cut_reason_message.log.in ++++ b/test/outputs/run_cut_reason_message.log.in +@@ -2,3 +2,4 @@ Uncaught exception UnbelievableLongJavaClassNameException in method oneTwoThreeF + Exception in thread "main" com.redhat.abrt.test.UnbelievableLongJavaClassNameException + at com.redhat.abrt.test.UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.oneTwoThreeFroFiveSixSevenEightNineTenElevenTwelveThirteenSixteenSeventeenEighteenNineteenTwentyTwentyOneTwentyTwooTwentyThreeTwentyFourTwentyFiveTwentySixTwentySevenTwentyEightTwentyNineUpToOneHundredThousand(UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.java:30) [file:@CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.class] + at com.redhat.abrt.test.UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.main(UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.java:61) [file:@CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.class] ++executable: @CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/UnbelievableLongJavaClassNameHavingExtremlyLongAndSenselessMethodNames.class +diff --git a/test/outputs/run_inner.log.in b/test/outputs/run_inner.log.in +index 4789aeb..c1ef063 100644 +--- a/test/outputs/run_inner.log.in ++++ b/test/outputs/run_inner.log.in +@@ -5,6 +5,7 @@ Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 42 + at SimpleTest.throwAndCatchAllExceptions(SimpleTest.java:61) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] + at InnerExceptions.run(InnerExceptions.java:11) [file:@CMAKE_BINARY_DIR@/test/InnerExceptions.class] + at InnerExceptions.main(InnerExceptions.java:28) [file:@CMAKE_BINARY_DIR@/test/InnerExceptions.class] ++executable: @CMAKE_BINARY_DIR@/test/InnerExceptions.class + Uncaught exception java.lang.RuntimeException in method InnerExceptions.run() + Exception in thread "main" java.lang.RuntimeException: java.lang.NullPointerException + at InnerExceptions.run(InnerExceptions.java:17) [file:@CMAKE_BINARY_DIR@/test/InnerExceptions.class] +@@ -14,3 +15,4 @@ Caused by: java.lang.NullPointerException + at SimpleTest.throwAndDontCatchException(SimpleTest.java:71) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] + at InnerExceptions.run(InnerExceptions.java:13) [file:@CMAKE_BINARY_DIR@/test/InnerExceptions.class] + at InnerExceptions.main(InnerExceptions.java:28) [file:@CMAKE_BINARY_DIR@/test/InnerExceptions.class] ++executable: @CMAKE_BINARY_DIR@/test/InnerExceptions.class +diff --git a/test/outputs/run_jar.log.in b/test/outputs/run_jar.log.in +index 6e10d2d..85cf311 100644 +--- a/test/outputs/run_jar.log.in ++++ b/test/outputs/run_jar.log.in +@@ -4,8 +4,10 @@ Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 42 + at SimpleTest.catchIndexOutOfBoundsException(SimpleTest.java:47) [jar:file:@CMAKE_BINARY_DIR@/test/JarTest.jar!/SimpleTest.class] + at SimpleTest.throwAndCatchAllExceptions(SimpleTest.java:61) [jar:file:@CMAKE_BINARY_DIR@/test/JarTest.jar!/SimpleTest.class] + at SimpleTest.main(SimpleTest.java:81) [jar:file:@CMAKE_BINARY_DIR@/test/JarTest.jar!/SimpleTest.class] ++executable: @CMAKE_BINARY_DIR@/test/JarTest.jar + Uncaught exception java.lang.NullPointerException in method SimpleTest.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at SimpleTest.throwNullPointerException(SimpleTest.java:36) [jar:file:@CMAKE_BINARY_DIR@/test/JarTest.jar!/SimpleTest.class] + at SimpleTest.throwAndDontCatchException(SimpleTest.java:71) [jar:file:@CMAKE_BINARY_DIR@/test/JarTest.jar!/SimpleTest.class] + at SimpleTest.main(SimpleTest.java:83) [jar:file:@CMAKE_BINARY_DIR@/test/JarTest.jar!/SimpleTest.class] ++executable: @CMAKE_BINARY_DIR@/test/JarTest.jar +diff --git a/test/outputs/run_missing_class_test.log.in b/test/outputs/run_missing_class_test.log.in +index df77057..ea3dc25 100644 +--- a/test/outputs/run_missing_class_test.log.in ++++ b/test/outputs/run_missing_class_test.log.in +@@ -7,3 +7,4 @@ Exception in thread "main" java.lang.ClassNotFoundException: MissingClassTest + at java.lang.ClassLoader.loadClass(ClassLoader.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/ClassLoader.class] + at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/sun/misc/Launcher$AppClassLoader.class] + at java.lang.ClassLoader.loadClass(ClassLoader.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/ClassLoader.class] ++executable: JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar +diff --git a/test/outputs/run_package.log.in b/test/outputs/run_package.log.in +index d8fbc79..7c7e76f 100644 +--- a/test/outputs/run_package.log.in ++++ b/test/outputs/run_package.log.in +@@ -4,8 +4,10 @@ Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 42 + at com.redhat.abrt.test.Test.catchIndexOutOfBoundsException(Test.java:49) [file:@CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/Test.class] + at com.redhat.abrt.test.Test.throwAndCatchAllExceptions(Test.java:63) [file:@CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/Test.class] + at com.redhat.abrt.test.Test.main(Test.java:82) [file:@CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/Test.class + Uncaught exception java.lang.NullPointerException in method com.redhat.abrt.test.Test.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at com.redhat.abrt.test.Test.throwNullPointerException(Test.java:38) [file:@CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/Test.class] + at com.redhat.abrt.test.Test.throwAndDontCatchException(Test.java:72) [file:@CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/Test.class] + at com.redhat.abrt.test.Test.main(Test.java:84) [file:@CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/com/redhat/abrt/test/Test.class +diff --git a/test/outputs/run_remote.log.in b/test/outputs/run_remote.log.in +index a18e90d..90f5db7 100644 +--- a/test/outputs/run_remote.log.in ++++ b/test/outputs/run_remote.log.in +@@ -7,7 +7,8 @@ Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 42 + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/sun/reflect/NativeMethodAccessorImpl.class] + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/sun/reflect/DelegatingMethodAccessorImpl.class] + at java.lang.reflect.Method.invoke(Method.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/reflect/Method.class] +- at RemoteTest.main(RemoteTest.java:83) [file:@CMAKE_BINARY_DIR@/test/RemoteTest.class] ++ at RemoteTest.main(RemoteTest.java:102) [file:@CMAKE_BINARY_DIR@/test/RemoteTest.class] ++executable: @CMAKE_BINARY_DIR@/test/RemoteTest.class + Uncaught exception java.lang.NullPointerException in method SimpleTest.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at SimpleTest.throwNullPointerException(SimpleTest.java:36) [jar:http://localhost:54321/JarTest.jar!/SimpleTest.class] +@@ -16,4 +17,5 @@ Exception in thread "main" java.lang.NullPointerException + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/sun/reflect/NativeMethodAccessorImpl.class] + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/sun/reflect/DelegatingMethodAccessorImpl.class] + at java.lang.reflect.Method.invoke(Method.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/reflect/Method.class] +- at RemoteTest.main(RemoteTest.java:85) [file:@CMAKE_BINARY_DIR@/test/RemoteTest.class] ++ at RemoteTest.main(RemoteTest.java:104) [file:@CMAKE_BINARY_DIR@/test/RemoteTest.class] ++executable: @CMAKE_BINARY_DIR@/test/RemoteTest.class +diff --git a/test/outputs/run_remote_thread.log.in b/test/outputs/run_remote_thread.log.in +new file mode 100644 +index 0000000..ecca10e +--- /dev/null ++++ b/test/outputs/run_remote_thread.log.in +@@ -0,0 +1,13 @@ ++Caught exception java.lang.ArrayIndexOutOfBoundsException in method SimpleTest.throwIndexOutOfBoundsException() ++Exception in thread "Thread-3" java.lang.ArrayIndexOutOfBoundsException: 42 ++ at SimpleTest.throwIndexOutOfBoundsException(SimpleTest.java:24) [jar:http://localhost:54321/JarTest.jar!/SimpleTest.class] ++ at SimpleTest.catchIndexOutOfBoundsException(SimpleTest.java:47) [jar:http://localhost:54321/JarTest.jar!/SimpleTest.class] ++ at SimpleTest.throwAndCatchAllExceptions(SimpleTest.java:61) [jar:http://localhost:54321/JarTest.jar!/SimpleTest.class] ++ at ThreadCaughtException.run(ThreadCaughtException.java:7) [jar:http://localhost:54321/JarTest.jar!/ThreadCaughtException.class] ++executable: http://localhost:54321/JarTest.jar ++Uncaught exception java.lang.NullPointerException in method SimpleTest.throwNullPointerException() ++Exception in thread "Thread-4" java.lang.NullPointerException ++ at SimpleTest.throwNullPointerException(SimpleTest.java:36) [jar:http://localhost:54321/JarTest.jar!/SimpleTest.class] ++ at SimpleTest.throwAndDontCatchException(SimpleTest.java:71) [jar:http://localhost:54321/JarTest.jar!/SimpleTest.class] ++ at ThreadUncaughtException.run(ThreadUncaughtException.java:7) [jar:http://localhost:54321/JarTest.jar!/ThreadUncaughtException.class] ++executable: http://localhost:54321/JarTest.jar +diff --git a/test/outputs/run_threads.log.in b/test/outputs/run_threads.log.in +index ad80099..b9089b7 100644 +--- a/test/outputs/run_threads.log.in ++++ b/test/outputs/run_threads.log.in +@@ -3,9 +3,11 @@ Exception in thread "Thread-0" java.lang.ArrayIndexOutOfBoundsException: 42 + at SimpleTest.throwIndexOutOfBoundsException(SimpleTest.java:24) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] + at SimpleTest.catchIndexOutOfBoundsException(SimpleTest.java:47) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] + at SimpleTest.throwAndCatchAllExceptions(SimpleTest.java:61) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] +- at ThreadCaughtException.run(MultiThreadTest.java:13) [file:@CMAKE_BINARY_DIR@/test/ThreadCaughtException.class] ++ at ThreadCaughtException.run(ThreadCaughtException.java:7) [file:@CMAKE_BINARY_DIR@/test/ThreadCaughtException.class] ++executable: @CMAKE_BINARY_DIR@/test/ThreadCaughtException.class + Uncaught exception java.lang.NullPointerException in method SimpleTest.throwNullPointerException() + Exception in thread "Thread-1" java.lang.NullPointerException + at SimpleTest.throwNullPointerException(SimpleTest.java:36) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] + at SimpleTest.throwAndDontCatchException(SimpleTest.java:71) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] +- at ThreadUncaughtException.run(MultiThreadTest.java:19) [file:@CMAKE_BINARY_DIR@/test/ThreadUncaughtException.class] ++ at ThreadUncaughtException.run(ThreadUncaughtException.java:7) [file:@CMAKE_BINARY_DIR@/test/ThreadUncaughtException.class] ++executable: @CMAKE_BINARY_DIR@/test/ThreadUncaughtException.class +diff --git a/test/outputs/run_try_finally.log.in b/test/outputs/run_try_finally.log.in +index d690017..877f755 100644 +--- a/test/outputs/run_try_finally.log.in ++++ b/test/outputs/run_try_finally.log.in +@@ -5,9 +5,11 @@ Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 42 + at SimpleTest.throwAndCatchAllExceptions(SimpleTest.java:61) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] + at TryFinallyTest.run(TryFinallyTest.java:13) [file:@CMAKE_BINARY_DIR@/test/TryFinallyTest.class] + at TryFinallyTest.main(TryFinallyTest.java:27) [file:@CMAKE_BINARY_DIR@/test/TryFinallyTest.class] ++executable: @CMAKE_BINARY_DIR@/test/TryFinallyTest.class + Caught exception java.lang.NullPointerException in method SimpleTest.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at SimpleTest.throwNullPointerException(SimpleTest.java:36) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] + at SimpleTest.throwAndDontCatchException(SimpleTest.java:71) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] + at TryFinallyTest.run(TryFinallyTest.java:15) [file:@CMAKE_BINARY_DIR@/test/TryFinallyTest.class] + at TryFinallyTest.main(TryFinallyTest.java:27) [file:@CMAKE_BINARY_DIR@/test/TryFinallyTest.class] ++executable: @CMAKE_BINARY_DIR@/test/TryFinallyTest.class +-- +1.8.3.1 + diff --git a/SOURCES/0017-Provide-Arch-specific-StressTest-configuration.patch b/SOURCES/0017-Provide-Arch-specific-StressTest-configuration.patch new file mode 100644 index 0000000..3e46714 --- /dev/null +++ b/SOURCES/0017-Provide-Arch-specific-StressTest-configuration.patch @@ -0,0 +1,64 @@ +From 9fb4776f57de0948c5256b3b364880dced66e10d Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Thu, 9 Jan 2014 13:30:14 +0100 +Subject: [PATCH 17/39] Provide Arch specific StressTest configuration + +Related to rhbz#1054737 + +Signed-off-by: Jakub Filak +--- + test/CMakeLists.txt | 15 ++++++++++++++- + test/testdriver | 6 ++++-- + 2 files changed, 18 insertions(+), 3 deletions(-) + +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index 6be9498..0a73e2b 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -235,10 +235,23 @@ _add_test_target( + ) + _add_test(run_cut_reason_message 2) + ++if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "^s390x?$") ++ set(STRESS_TEST_REPEATS 30) ++ set(STRESS_TEST_THREADS 200) ++elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^ppc\(64\)?$") ++ set(STRESS_TEST_REPEATS 20) ++ set(STRESS_TEST_THREADS 150) ++elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^armv7l$") ++ set(STRESS_TEST_REPEATS 10) ++ set(STRESS_TEST_THREADS 100) ++else() ++ set(STRESS_TEST_REPEATS 60) ++ set(STRESS_TEST_THREADS 600) ++endif() + + add_custom_target( + run_thread_stress +- COMMAND LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/src ${Java_JAVA_EXECUTABLE} -agentlib:${AGENT_NAME}=caught=java.lang.ArrayIndexOutOfBoundsException,journald=no ThreadStressTest ++ COMMAND LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/src ${Java_JAVA_EXECUTABLE} -agentlib:${AGENT_NAME}=caught=java.lang.ArrayIndexOutOfBoundsException,journald=no ThreadStressTest reps=${STRESS_TEST_REPEATS} threads=${STRESS_TEST_THREADS} + DEPENDS ${TEST_JAVA_TARGETS} + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) +diff --git a/test/testdriver b/test/testdriver +index 9e5c2b8..b02bc5c 100644 +--- a/test/testdriver ++++ b/test/testdriver +@@ -19,10 +19,12 @@ TMP_RESULT=`mktemp /tmp/abrt_java_connector.XXXXXXX` + + if [ -n "$5" ] && [ 1 -eq $5 ]; then + tac $4 | awk \ +-'BEGIN { main = 0 } ++'BEGIN { main = 0; pfx = "" } + /^(Unc|C)aught/ { if (main == 1) { print $0; main = 0 } } + { if (main == 1) { print $0 } } +-/\s*at .*\.main\(/ { if (main == 0) { print $0; main = 1 } }' | tac > $TMP_RESULT ++/\s*at .*\.main\(/ { if (main == 0) { print pfx$0; main = 1 } } ++ { pfx = "" } ++/^executable:/ { pfx = $0"\n" }' | tac > $TMP_RESULT + else + cp $4 $TMP_RESULT + fi +-- +1.8.3.1 + diff --git a/SOURCES/0018-Fix-arch-specific-outputs.patch b/SOURCES/0018-Fix-arch-specific-outputs.patch new file mode 100644 index 0000000..892c3f7 --- /dev/null +++ b/SOURCES/0018-Fix-arch-specific-outputs.patch @@ -0,0 +1,367 @@ +From 581485ff137db949c4972327c2de1f573bc4cf97 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Thu, 9 Jan 2014 10:27:17 -0500 +Subject: [PATCH 18/39] Fix arch specific outputs + +Related to rhbz#1054737 + +Signed-off-by: Jakub Filak +--- + CMakeLists.txt | 2 ++ + test/outputs/Linux-armv7l/run_test.log.in | 34 +++++++++++++++---------------- + test/outputs/Linux-ppc/run_test.log.in | 3 ++- + test/outputs/Linux-ppc64/run_test.log.in | 1 + + test/outputs/Linux-s390/run_test.log.in | 1 + + test/outputs/Linux-s390x/run_test.log.in | 1 + + test/outputs/run_test.log.in | 17 ++++++++++++++++ + 7 files changed, 41 insertions(+), 18 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1804cc5..1504461 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -6,6 +6,8 @@ enable_testing() + # Beware, PROJECT_VERSION will be overridden by information from git + set(PROJECT_VERSION "0.1.1") + ++message("Configuring ${PROJECT_NAME}-${PROJECT_VERSION} on ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}") ++ + execute_process( + COMMAND git log -1 --format=%h + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} +diff --git a/test/outputs/Linux-armv7l/run_test.log.in b/test/outputs/Linux-armv7l/run_test.log.in +index 483aed5..2a41f50 100644 +--- a/test/outputs/Linux-armv7l/run_test.log.in ++++ b/test/outputs/Linux-armv7l/run_test.log.in +@@ -5,7 +5,7 @@ Exception in thread "main" java.io.FileNotFoundException: _wrong_file_ (No such + at Test.readWrongFile(Test.java:89) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:461) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-executable= @CMAKE_BINARY_DIR@/test/Test.class ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.() + Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied) + at java.io.FileInputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] +@@ -13,7 +13,7 @@ Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permiss + at Test.readUnreadableFile(Test.java:111) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:462) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-executable= @CMAKE_BINARY_DIR@/test/Test.class ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.io.FileNotFoundException in method java.io.FileOutputStream.() + Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied) + at java.io.FileOutputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class] +@@ -22,7 +22,7 @@ Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permiss + at Test.writeToUnwritableFile(Test.java:134) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:463) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-executable= @CMAKE_BINARY_DIR@/test/Test.class ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.NumberFormatException in method java.lang.Integer.parseInt() + Exception in thread "main" java.lang.NumberFormatException: null + at java.lang.Integer.parseInt(Integer.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Integer.class] +@@ -41,7 +41,7 @@ Exception in thread "main" java.lang.NumberFormatException: null + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-executable= @CMAKE_BINARY_DIR@/test/Test.class ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.net.UnknownHostException in method java.net.InetAddress$1.lookupAllHostAddr() + Exception in thread "main" java.net.UnknownHostException: xyzzy: Name or service not known + at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/Inet6AddressImpl.class] +@@ -56,7 +56,7 @@ Exception in thread "main" java.net.UnknownHostException: xyzzy: Name or service + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-executable= @CMAKE_BINARY_DIR@/test/Test.class ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.net.UnknownHostException in method java.net.AbstractPlainSocketImpl.connect() + Exception in thread "main" java.net.UnknownHostException: xyzzy + at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/AbstractPlainSocketImpl.class] +@@ -68,7 +68,7 @@ Exception in thread "main" java.net.UnknownHostException: xyzzy + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-executable= @CMAKE_BINARY_DIR@/test/Test.class ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.net.ConnectException in method java.net.AbstractPlainSocketImpl.doConnect() + Exception in thread "main" java.net.ConnectException: Connection refused + at java.net.PlainSocketImpl.socketConnect(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/PlainSocketImpl.class] +@@ -83,7 +83,7 @@ Exception in thread "main" java.net.ConnectException: Connection refused + at Test.readFromSocket(Test.java:177) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:474) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-executable= @CMAKE_BINARY_DIR@/test/Test.class ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.NumberFormatException in method java.lang.Long.parseLong() + Exception in thread "main" java.lang.NumberFormatException: null + at java.lang.Long.parseLong(Long.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Long.class] +@@ -93,7 +93,7 @@ Exception in thread "main" java.lang.NumberFormatException: null + at Test.readFromURL(Test.java:237) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:475) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-executable= @CMAKE_BINARY_DIR@/test/Test.class ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.io.FileNotFoundException in method sun.net.www.protocol.http.HttpURLConnection.getInputStream() + Exception in thread "main" java.io.FileNotFoundException: http://localhost:54321/_this_does_not_exists_ + at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/sun/net/www/protocol/http/HttpURLConnection.class] +@@ -101,7 +101,7 @@ Exception in thread "main" java.io.FileNotFoundException: http://localhost:54321 + at Test.readFromURL(Test.java:237) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:475) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-executable= @CMAKE_BINARY_DIR@/test/Test.class ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.net.MalformedURLException in method java.net.URL.() + Exception in thread "main" java.net.MalformedURLException: no protocol: @#$%^&malformed URL@#$%^&*() + at java.net.URL.(URL.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URL.class] +@@ -110,14 +110,14 @@ Exception in thread "main" java.net.MalformedURLException: no protocol: @#$%^&ma + at Test.malformedURL(Test.java:194) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:476) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-executable= @CMAKE_BINARY_DIR@/test/Test.class ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.ArrayIndexOutOfBoundsException in method Test.throwIndexOutOfBoundsException() + Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 42 + at Test.throwIndexOutOfBoundsException(Test.java:266) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchIndexOutOfBoundsException(Test.java:347) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:486) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-executable= @CMAKE_BINARY_DIR@/test/Test.class ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.StringIndexOutOfBoundsException in method java.lang.String.charAt() + Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1 + at java.lang.String.charAt(String.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/String.class] +@@ -125,21 +125,21 @@ Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String ind + at Test.catchStringIndexOutOfBoundsException(Test.java:362) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:487) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-executable= @CMAKE_BINARY_DIR@/test/Test.class ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.NullPointerException in method Test.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at Test.throwNullPointerException(Test.java:290) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchNullPointerException(Test.java:377) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:488) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-executable= @CMAKE_BINARY_DIR@/test/Test.class ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.ClassCastException in method Test.throwClassCastException() + Exception in thread "main" java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String + at Test.throwClassCastException(Test.java:302) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchClassCastException(Test.java:392) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:489) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-executable= @CMAKE_BINARY_DIR@/test/Test.class ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.UnsatisfiedLinkError in method java.lang.Runtime.load0() + Exception in thread "main" java.lang.UnsatisfiedLinkError: Expecting an absolute path of the library: xyzzy + at java.lang.Runtime.load0(Runtime.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Runtime.class] +@@ -148,7 +148,7 @@ Exception in thread "main" java.lang.UnsatisfiedLinkError: Expecting an absolute + at Test.catchUnsatisfiedLinkErrorUserLibrary(Test.java:422) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:491) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-executable= @CMAKE_BINARY_DIR@/test/Test.class ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.UnsatisfiedLinkError in method java.lang.ClassLoader.loadLibrary() + Exception in thread "main" java.lang.UnsatisfiedLinkError: no xyzzy in java.library.path + at java.lang.ClassLoader.loadLibrary(ClassLoader.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/ClassLoader.class] +@@ -158,10 +158,10 @@ Exception in thread "main" java.lang.UnsatisfiedLinkError: no xyzzy in java.libr + at Test.catchUnsatisfiedLinkErrorSystemLibrary(Test.java:437) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:492) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-executable= @CMAKE_BINARY_DIR@/test/Test.class ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Uncaught exception java.lang.NullPointerException in method Test.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at Test.throwNullPointerException(Test.java:290) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndDontCatchException(Test.java:501) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:518) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-executable= @CMAKE_BINARY_DIR@/test/Test.class ++executable: @CMAKE_BINARY_DIR@/test/Test.class +diff --git a/test/outputs/Linux-ppc/run_test.log.in b/test/outputs/Linux-ppc/run_test.log.in +index 6134d09..2a41f50 100644 +--- a/test/outputs/Linux-ppc/run_test.log.in ++++ b/test/outputs/Linux-ppc/run_test.log.in +@@ -158,9 +158,10 @@ Exception in thread "main" java.lang.UnsatisfiedLinkError: no xyzzy in java.libr + at Test.catchUnsatisfiedLinkErrorSystemLibrary(Test.java:437) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:492) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Uncaught exception java.lang.NullPointerException in method Test.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at Test.throwNullPointerException(Test.java:290) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndDontCatchException(Test.java:501) [file:@CMAKE_BINARY_DIR@/test/Test.class] +-executable: @CMAKE_BINARY_DIR@/test/Test.class + at Test.main(Test.java:518) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class +diff --git a/test/outputs/Linux-ppc64/run_test.log.in b/test/outputs/Linux-ppc64/run_test.log.in +index fcf63cb..2a41f50 100644 +--- a/test/outputs/Linux-ppc64/run_test.log.in ++++ b/test/outputs/Linux-ppc64/run_test.log.in +@@ -158,6 +158,7 @@ Exception in thread "main" java.lang.UnsatisfiedLinkError: no xyzzy in java.libr + at Test.catchUnsatisfiedLinkErrorSystemLibrary(Test.java:437) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:492) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Uncaught exception java.lang.NullPointerException in method Test.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at Test.throwNullPointerException(Test.java:290) [file:@CMAKE_BINARY_DIR@/test/Test.class] +diff --git a/test/outputs/Linux-s390/run_test.log.in b/test/outputs/Linux-s390/run_test.log.in +index fcf63cb..2a41f50 100644 +--- a/test/outputs/Linux-s390/run_test.log.in ++++ b/test/outputs/Linux-s390/run_test.log.in +@@ -158,6 +158,7 @@ Exception in thread "main" java.lang.UnsatisfiedLinkError: no xyzzy in java.libr + at Test.catchUnsatisfiedLinkErrorSystemLibrary(Test.java:437) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:492) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Uncaught exception java.lang.NullPointerException in method Test.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at Test.throwNullPointerException(Test.java:290) [file:@CMAKE_BINARY_DIR@/test/Test.class] +diff --git a/test/outputs/Linux-s390x/run_test.log.in b/test/outputs/Linux-s390x/run_test.log.in +index fcf63cb..2a41f50 100644 +--- a/test/outputs/Linux-s390x/run_test.log.in ++++ b/test/outputs/Linux-s390x/run_test.log.in +@@ -158,6 +158,7 @@ Exception in thread "main" java.lang.UnsatisfiedLinkError: no xyzzy in java.libr + at Test.catchUnsatisfiedLinkErrorSystemLibrary(Test.java:437) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:492) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Uncaught exception java.lang.NullPointerException in method Test.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at Test.throwNullPointerException(Test.java:290) [file:@CMAKE_BINARY_DIR@/test/Test.class] +diff --git a/test/outputs/run_test.log.in b/test/outputs/run_test.log.in +index 95f477b..4d4d3c0 100644 +--- a/test/outputs/run_test.log.in ++++ b/test/outputs/run_test.log.in +@@ -5,6 +5,7 @@ Exception in thread "main" java.io.FileNotFoundException: _wrong_file_ (No such + at Test.readWrongFile(Test.java:89) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:461) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.open() + Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied) + at java.io.FileInputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] +@@ -12,6 +13,7 @@ Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permiss + at Test.readUnreadableFile(Test.java:111) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:462) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.io.FileNotFoundException in method java.io.FileOutputStream.open() + Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied) + at java.io.FileOutputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class] +@@ -20,6 +22,7 @@ Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permiss + at Test.writeToUnwritableFile(Test.java:134) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.fileRelatedIssues(Test.java:463) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.NumberFormatException in method java.lang.Integer.parseInt() + Exception in thread "main" java.lang.NumberFormatException: null + at java.lang.Integer.parseInt(Integer.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Integer.class] +@@ -38,6 +41,7 @@ Exception in thread "main" java.lang.NumberFormatException: null + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.net.UnknownHostException in method java.net.Inet6AddressImpl.lookupAllHostAddr() + Exception in thread "main" java.net.UnknownHostException: xyzzy: Name or service not known + at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/Inet6AddressImpl.class] +@@ -52,6 +56,7 @@ Exception in thread "main" java.net.UnknownHostException: xyzzy: Name or service + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.net.UnknownHostException in method java.net.AbstractPlainSocketImpl.connect() + Exception in thread "main" java.net.UnknownHostException: xyzzy + at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/AbstractPlainSocketImpl.class] +@@ -63,6 +68,7 @@ Exception in thread "main" java.net.UnknownHostException: xyzzy + at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.net.ConnectException in method java.net.PlainSocketImpl.socketConnect() + Exception in thread "main" java.net.ConnectException: Connection refused + at java.net.PlainSocketImpl.socketConnect(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/PlainSocketImpl.class] +@@ -77,6 +83,7 @@ Exception in thread "main" java.net.ConnectException: Connection refused + at Test.readFromSocket(Test.java:177) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:474) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.NumberFormatException in method java.lang.Long.parseLong() + Exception in thread "main" java.lang.NumberFormatException: null + at java.lang.Long.parseLong(Long.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Long.class] +@@ -86,6 +93,7 @@ Exception in thread "main" java.lang.NumberFormatException: null + at Test.readFromURL(Test.java:237) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:475) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.io.FileNotFoundException in method sun.net.www.protocol.http.HttpURLConnection.getInputStream() + Exception in thread "main" java.io.FileNotFoundException: http://localhost:54321/_this_does_not_exists_ + at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/sun/net/www/protocol/http/HttpURLConnection.class] +@@ -93,6 +101,7 @@ Exception in thread "main" java.io.FileNotFoundException: http://localhost:54321 + at Test.readFromURL(Test.java:237) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:475) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.net.MalformedURLException in method java.net.URL.() + Exception in thread "main" java.net.MalformedURLException: no protocol: @#$%^&malformed URL@#$%^&*() + at java.net.URL.(URL.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URL.class] +@@ -101,12 +110,14 @@ Exception in thread "main" java.net.MalformedURLException: no protocol: @#$%^&ma + at Test.malformedURL(Test.java:194) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.networkRelatedIssues(Test.java:476) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.ArrayIndexOutOfBoundsException in method Test.throwIndexOutOfBoundsException() + Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 42 + at Test.throwIndexOutOfBoundsException(Test.java:266) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchIndexOutOfBoundsException(Test.java:347) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:486) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.StringIndexOutOfBoundsException in method java.lang.String.charAt() + Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1 + at java.lang.String.charAt(String.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/String.class] +@@ -114,18 +125,21 @@ Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String ind + at Test.catchStringIndexOutOfBoundsException(Test.java:362) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:487) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.NullPointerException in method Test.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at Test.throwNullPointerException(Test.java:290) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchNullPointerException(Test.java:377) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:488) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.ClassCastException in method Test.throwClassCastException() + Exception in thread "main" java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String + at Test.throwClassCastException(Test.java:302) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.catchClassCastException(Test.java:392) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:489) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.UnsatisfiedLinkError in method java.lang.Runtime.load0() + Exception in thread "main" java.lang.UnsatisfiedLinkError: Expecting an absolute path of the library: xyzzy + at java.lang.Runtime.load0(Runtime.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Runtime.class] +@@ -134,6 +148,7 @@ Exception in thread "main" java.lang.UnsatisfiedLinkError: Expecting an absolute + at Test.catchUnsatisfiedLinkErrorUserLibrary(Test.java:422) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:491) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Caught exception java.lang.UnsatisfiedLinkError in method java.lang.ClassLoader.loadLibrary() + Exception in thread "main" java.lang.UnsatisfiedLinkError: no xyzzy in java.library.path + at java.lang.ClassLoader.loadLibrary(ClassLoader.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/ClassLoader.class] +@@ -143,8 +158,10 @@ Exception in thread "main" java.lang.UnsatisfiedLinkError: no xyzzy in java.libr + at Test.catchUnsatisfiedLinkErrorSystemLibrary(Test.java:437) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndCatchAllExceptions(Test.java:492) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class + Uncaught exception java.lang.NullPointerException in method Test.throwNullPointerException() + Exception in thread "main" java.lang.NullPointerException + at Test.throwNullPointerException(Test.java:290) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.throwAndDontCatchException(Test.java:501) [file:@CMAKE_BINARY_DIR@/test/Test.class] + at Test.main(Test.java:518) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class +-- +1.8.3.1 + diff --git a/SOURCES/0020-Use-the-main-class-URL-for-executable.patch b/SOURCES/0020-Use-the-main-class-URL-for-executable.patch new file mode 100644 index 0000000..a0606d6 --- /dev/null +++ b/SOURCES/0020-Use-the-main-class-URL-for-executable.patch @@ -0,0 +1,111 @@ +From 292f1775606874562026b5e27c3a192694553979 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Sat, 11 Jan 2014 00:34:15 +0100 +Subject: [PATCH 20/39] Use the main class URL for 'executable' + +Closes #28 +Related to rhbz#1054737 +--- + src/abrt-checker.c | 31 +++++++++++++++++++++++++++++-- + test/CMakeLists.txt | 6 ++++-- + 2 files changed, 33 insertions(+), 4 deletions(-) + +diff --git a/src/abrt-checker.c b/src/abrt-checker.c +index c62d1ef..613a0ec 100644 +--- a/src/abrt-checker.c ++++ b/src/abrt-checker.c +@@ -203,6 +203,14 @@ char *outputFileName = DISABLED_LOG_OUTPUT; + /* Path (not necessary absolute) to output file */ + char **reportedCaughExceptionTypes; + ++/* Determines which resource is used as executable */ ++enum { ++ ABRT_EXECUTABLE_MAIN = 0, ++ ABRT_EXECUTABLE_THREAD = 1, ++}; ++int executableFlags = 0; ++ ++ + /* Map of buffer for already reported exceptions to prevent re-reporting */ + T_jthreadMap *threadMap; + +@@ -2121,7 +2129,8 @@ static void JNICALL callback_on_exception( + updated_exception_name_ptr, class_name_ptr, method_name_ptr); + + char *executable = NULL; +- char *stack_trace_str = generate_thread_stack_trace(jvmti_env, jni_env, tname, exception_object, &executable); ++ char *stack_trace_str = generate_thread_stack_trace(jvmti_env, jni_env, tname, exception_object, ++ (executableFlags & ABRT_EXECUTABLE_THREAD) ? &executable : NULL); + + const char *report_message = message; + if (NULL == report_message) +@@ -2757,9 +2766,27 @@ void parse_commandline_options(char *options) + { + reportedCaughExceptionTypes = build_string_vector(value, ':'); + } ++ else if (strcmp("executable", key) == 0) ++ { ++ if (strcmp("threadclass", value) == 0) ++ { ++ VERBOSE_PRINT("Use a thread class for 'executable'\n"); ++ executableFlags |= ABRT_EXECUTABLE_THREAD; ++ } ++ else if (strcmp("mainclass", value) == 0) ++ { ++ /* Unset ABRT_EXECUTABLE_THREAD bit */ ++ VERBOSE_PRINT("Use the main class for 'executable'\n"); ++ executableFlags &= ~ABRT_EXECUTABLE_THREAD; ++ } ++ else ++ { ++ fprintf(stderr, "Unknown 'executable' option's value '%s'\n", key); ++ } ++ } + else + { +- fprintf(stderr, "Unknow option '%s'\n", key); ++ fprintf(stderr, "Unknown option '%s'\n", key); + } + } + } +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index 0a73e2b..5267e7b 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -150,7 +150,7 @@ _add_test_target( + run_threads + MultiThreadTest + DEPENDS ${TEST_JAVA_TARGETS} +- AGENT_OPTIONS caught=java.lang.ArrayIndexOutOfBoundsException:java.lang.NullPointerException ++ AGENT_OPTIONS caught=java.lang.ArrayIndexOutOfBoundsException:java.lang.NullPointerException,executable=threadclass + ) + _add_test(run_threads 0) + +@@ -167,6 +167,7 @@ _add_test_target( + run_bad_class + BadClassTest + DEPENDS ${TEST_JAVA_TARGETS} ${JAR_TEST_PATH} ++ AGENT_OPTIONS executable=threadclass + ) + _add_test(run_bad_class 2) + +@@ -175,6 +176,7 @@ _add_test_target( + MissingClassTest + PRE rm -f MissingClassTest.class + DEPENDS ${TEST_JAVA_TARGETS} ${JAR_TEST_PATH} ++ AGENT_OPTIONS executable=threadclass + ) + _add_test(run_missing_class_test 2) + +@@ -294,7 +296,7 @@ _add_test_target( + RemoteTest ${JAR_TEST_PATH} MultiThreadTest + PRE rm -f SimpleTest.class ThreadCaughtException.class ThreadUncaughtException.class MultiThreadTest.class + DEPENDS ${TEST_JAVA_TARGETS} ${JAR_TEST_PATH} +- AGENT_OPTIONS caught=java.lang.ArrayIndexOutOfBoundsException:java.lang.NullPointerException ++ AGENT_OPTIONS caught=java.lang.ArrayIndexOutOfBoundsException:java.lang.NullPointerException,executable=threadclass + ) + _add_test(run_remote_thread 0) + +-- +1.8.3.1 + diff --git a/SOURCES/0021-Add-documentation-for-executable-option.patch b/SOURCES/0021-Add-documentation-for-executable-option.patch new file mode 100644 index 0000000..c16f6f8 --- /dev/null +++ b/SOURCES/0021-Add-documentation-for-executable-option.patch @@ -0,0 +1,52 @@ +From 9bee76c98c304cac36f1591baf9219f3dbf5fe37 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Sat, 11 Jan 2014 00:51:04 +0100 +Subject: [PATCH 21/39] Add documentation for 'executable' option + +Related #28 +Related to rhbz#1054737 +--- + README | 16 ++++++++++++++-- + 1 file changed, 14 insertions(+), 2 deletions(-) + +diff --git a/README b/README +index bf0f8f3..590db7e 100644 +--- a/README ++++ b/README +@@ -43,7 +43,7 @@ $ java -agentlib:abrt-java-connector=abrt=on $MyClass -platform.jvmtiSupported + + Example3: + - this example shows how to configure the log output destination +-- output option is designed for this purpose ++- 'output' option is designed for this purpose + - abrt-java-connector does not print any logs by default + - the first command prints logs to /tmp/abrt_checker_$PID.log + +@@ -56,7 +56,7 @@ $ java -agentlib:abrt-java-connector=output=/tmp/abrt-agent.log $MyClass -platf + + Example4: + - this example shows how to enable reporting of caught exceptions +-- caught option is designed for this purpose ++- 'caught' option is designed for this purpose + - by default no caught exception is reported + - user must provide a colon separated list of exception type names + +@@ -74,3 +74,15 @@ $ java -agentlib:abrt-java-connector=journald=off $MyClass -platform.jvmtiSuppo + + - enable syslog + $ java -agentlib:abrt-java-connector=syslog=on $MyClass -platform.jvmtiSupported true ++ ++Example5: ++- this example shows how configure abrt-java-connector to fill 'executable' ++ ABRT file with a path to a class on the bottom of the stack trace (the first ++ method of thread) ++- this feature can be enabled via 'executable' option which can contain either ++ 'mainclass' or 'threadclass' ++ ++$ java -agentlib:abrt-java-connector=executable=threadclass $MyClass -platform.jvmtiSupported true ++ ++- 'mainclass' is used when 'executable' option is not passed and 'executable' ++ file is filled with full path $MyClass +-- +1.8.3.1 + diff --git a/SOURCES/0022-Exception-callback-code-optimizations.patch b/SOURCES/0022-Exception-callback-code-optimizations.patch new file mode 100644 index 0000000..31807e8 --- /dev/null +++ b/SOURCES/0022-Exception-callback-code-optimizations.patch @@ -0,0 +1,290 @@ +From ba1f3f10129765dec30caa238679331db6848938 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Wed, 15 Jan 2014 09:14:44 +0100 +Subject: [PATCH 22/39] Exception callback code optimizations + +The old code was doing a lot of stuff which is not necessary when the +processes exception won't be reported. + +Related to rhbz#1051198 +--- + src/abrt-checker.c | 180 ++++++++++++++++++++++++++++++++--------------------- + 1 file changed, 108 insertions(+), 72 deletions(-) + +diff --git a/src/abrt-checker.c b/src/abrt-checker.c +index 613a0ec..a5c2bdd 100644 +--- a/src/abrt-checker.c ++++ b/src/abrt-checker.c +@@ -219,6 +219,7 @@ T_jthreadMap *threadMap; + static char* get_path_to_class(jvmtiEnv *jvmti_env, JNIEnv *jni_env, jclass class, char *class_name, const char *stringize_method_name); + static void print_jvm_environment_variables_to_file(FILE *out); + static char* format_class_name(char *class_signature, char replace_to); ++static int check_jvmti_error(jvmtiEnv *jvmti_env, jvmtiError error_code, const char *str); + + + +@@ -404,26 +405,70 @@ static const char * null2empty(const char *str) + } + + ++static char *get_exception_type_name( ++ jvmtiEnv *jvmti_env, ++ JNIEnv *jni_env, ++ jobject exception_object) ++{ ++ jclass exception_class = (*jni_env)->GetObjectClass(jni_env, exception_object); ++ ++ char *exception_name_ptr = NULL; ++ ++ /* retrieve all required informations */ ++ jvmtiError error_code = (*jvmti_env)->GetClassSignature(jvmti_env, exception_class, &exception_name_ptr, NULL); ++ if (check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__))) ++ return NULL; ++ ++ char *formated_exception_name_ptr = format_class_name(exception_name_ptr, '\0'); ++ if (formated_exception_name_ptr != exception_name_ptr) ++ { ++ char *dest = exception_name_ptr; ++ char *src = formated_exception_name_ptr; ++ ++ while(src[0] != '\0') ++ { ++ *dest = *src; ++ ++dest; ++ ++src; ++ } ++ dest[0] = '\0'; ++ } ++ ++ return exception_name_ptr; ++} ++ ++ + + /* + * Returns non zero value if exception's type is intended to be reported even + * if the exception was caught. + */ +-static int exception_is_intended_to_be_reported(const char *type_name) ++static int exception_is_intended_to_be_reported( ++ jvmtiEnv *jvmti_env, ++ JNIEnv *jni_env, ++ jobject exception_object, ++ char **exception_type) + { ++ int retval = 0; ++ + if (reportedCaughExceptionTypes != NULL) + { ++ *exception_type = get_exception_type_name(jvmti_env, jni_env, exception_object); ++ if (NULL == *exception_type) ++ return 0; ++ + /* special cases for selected exceptions */ + for (char **cursor = reportedCaughExceptionTypes; *cursor; ++cursor) + { +- if (strcmp(*cursor, type_name) == 0) ++ if (strcmp(*cursor, *exception_type) == 0) + { +- return 1; ++ retval = 1; ++ break; + } + } + } + +- return 0; ++ return retval; + } + + +@@ -695,19 +740,21 @@ static char* format_class_name(char *class_signature, char replace_to) + { + output++; /* goto to the next character */ + } +- /* replace the last character in the class name */ +- /* but inly if this character is ';' */ +- char *last_char = output + strlen(output) - 1; +- if (*last_char == ';') +- { +- *last_char = replace_to; +- } ++ + /* replace all '/'s to '.'s */ + char *c; + for (c = class_signature; *c != 0; c++) + { + if (*c == '/') *c = '.'; + } ++ ++ /* replace the last character in the class name */ ++ /* but inly if this character is ';' */ ++ /* c[0] == '\0' see the for loop above */ ++ if (c != class_signature && c[-1] == ';') ++ { ++ c[-1] = replace_to; ++ } + } + else + { +@@ -2053,52 +2100,17 @@ static void JNICALL callback_on_exception( + jmethodID catch_method, + jlocation catch_location __UNUSED_VAR) + { +- jvmtiError error_code; +- +- char *method_name_ptr = NULL; +- char *method_signature_ptr = NULL; +- char *class_name_ptr = NULL; +- char *class_signature_ptr = NULL; +- char *exception_name_ptr = NULL; +- char *updated_exception_name_ptr = NULL; +- +- jclass method_class; +- jclass exception_class; ++ char *exception_type_name = NULL; + + /* all operations should be processed in critical section */ + enter_critical_section(jvmti_env, shared_lock); + +- char tname[MAX_THREAD_NAME_LENGTH]; +- get_thread_name(jvmti_env, thr, tname, sizeof(tname)); +- +- exception_class = (*jni_env)->GetObjectClass(jni_env, exception_object); +- +- /* retrieve all required informations */ +- error_code = (*jvmti_env)->GetMethodName(jvmti_env, method, &method_name_ptr, &method_signature_ptr, NULL); +- if (check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__))) +- goto callback_on_exception_cleanup; +- +- error_code = (*jvmti_env)->GetMethodDeclaringClass(jvmti_env, method, &method_class); +- if (check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__))) +- goto callback_on_exception_cleanup; +- +- error_code = (*jvmti_env)->GetClassSignature(jvmti_env, method_class, &class_signature_ptr, NULL); +- if (check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__))) +- goto callback_on_exception_cleanup; +- +- error_code = (*jvmti_env)->GetClassSignature(jvmti_env, exception_class, &exception_name_ptr, NULL); +- if (check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__))) +- goto callback_on_exception_cleanup; +- + /* readable class names */ +- class_name_ptr = format_class_name(class_signature_ptr, '.'); +- updated_exception_name_ptr = format_class_name(exception_name_ptr, '\0'); +- +- INFO_PRINT("%s %s exception in thread \"%s\" ", (catch_method == NULL ? "Uncaught" : "Caught"), updated_exception_name_ptr, tname); +- INFO_PRINT("in a method %s%s() with signature %s\n", class_name_ptr, method_name_ptr, method_signature_ptr); +- +- if (catch_method == NULL || exception_is_intended_to_be_reported(updated_exception_name_ptr)) ++ if (catch_method == NULL || exception_is_intended_to_be_reported(jvmti_env, jni_env, exception_object, &exception_type_name)) + { ++ char tname[MAX_THREAD_NAME_LENGTH]; ++ get_thread_name(jvmti_env, thr, tname, sizeof(tname)); ++ + jlong tid = 0; + T_jthrowableCircularBuf *threads_exc_buf = NULL; + +@@ -2114,19 +2126,43 @@ static void JNICALL callback_on_exception( + + if (NULL == threads_exc_buf || NULL == jthrowable_circular_buf_find(threads_exc_buf, exception_object)) + { ++ jvmtiError error_code; ++ jclass method_class; ++ char *method_name_ptr = NULL; ++ char *method_signature_ptr = NULL; ++ char *class_name_ptr = NULL; ++ char *class_signature_ptr = NULL; ++ + if (NULL != threads_exc_buf) + { + VERBOSE_PRINT("Pushing to circular buffer\n"); + jthrowable_circular_buf_push(threads_exc_buf, exception_object); + } + ++ error_code = (*jvmti_env)->GetMethodName(jvmti_env, method, &method_name_ptr, &method_signature_ptr, NULL); ++ if (check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__))) ++ goto callback_on_exception_cleanup; ++ ++ error_code = (*jvmti_env)->GetMethodDeclaringClass(jvmti_env, method, &method_class); ++ if (check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__))) ++ goto callback_on_exception_cleanup; ++ ++ error_code = (*jvmti_env)->GetClassSignature(jvmti_env, method_class, &class_signature_ptr, NULL); ++ if (check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__))) ++ goto callback_on_exception_cleanup; ++ ++ class_name_ptr = format_class_name(class_signature_ptr, '.'); ++ + /* Remove trailing '.' */ + const ssize_t class_name_len = strlen(class_name_ptr); + if (class_name_len > 0) + class_name_ptr[class_name_len - 1] = '\0'; + ++ if (NULL == exception_type_name) ++ exception_type_name = get_exception_type_name(jvmti_env, jni_env, exception_object); ++ + char *message = format_exception_reason_message(/*caught?*/NULL != catch_method, +- updated_exception_name_ptr, class_name_ptr, method_name_ptr); ++ exception_type_name, class_name_ptr, method_name_ptr); + + char *executable = NULL; + char *stack_trace_str = generate_thread_stack_trace(jvmti_env, jni_env, tname, exception_object, +@@ -2143,6 +2179,24 @@ static void JNICALL callback_on_exception( + + free(message); + free(stack_trace_str); ++ ++callback_on_exception_cleanup: ++ /* cleapup */ ++ if (method_name_ptr != NULL) ++ { ++ error_code = (*jvmti_env)->Deallocate(jvmti_env, (unsigned char *)method_name_ptr); ++ check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__)); ++ } ++ if (method_signature_ptr != NULL) ++ { ++ error_code = (*jvmti_env)->Deallocate(jvmti_env, (unsigned char *)method_signature_ptr); ++ check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__)); ++ } ++ if (class_signature_ptr != NULL) ++ { ++ error_code = (*jvmti_env)->Deallocate(jvmti_env, (unsigned char *)class_signature_ptr); ++ check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__)); ++ } + } + else + { +@@ -2150,27 +2204,9 @@ static void JNICALL callback_on_exception( + } + } + +-callback_on_exception_cleanup: +- /* cleapup */ +- if (method_name_ptr != NULL) +- { +- error_code = (*jvmti_env)->Deallocate(jvmti_env, (unsigned char *)method_name_ptr); +- check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__)); +- } +- if (method_signature_ptr != NULL) ++ if (NULL != exception_type_name) + { +- error_code = (*jvmti_env)->Deallocate(jvmti_env, (unsigned char *)method_signature_ptr); +- check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__)); +- } +- if (class_signature_ptr != NULL) +- { +- error_code = (*jvmti_env)->Deallocate(jvmti_env, (unsigned char *)class_signature_ptr); +- check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__)); +- } +- if (exception_name_ptr != NULL) +- { +- error_code = (*jvmti_env)->Deallocate(jvmti_env, (unsigned char *)exception_name_ptr); +- check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__)); ++ free(exception_type_name); + } + + exit_critical_section(jvmti_env, shared_lock); +-- +1.8.3.1 + diff --git a/SOURCES/0023-Do-not-enter-critical-section-if-not-necessary.patch b/SOURCES/0023-Do-not-enter-critical-section-if-not-necessary.patch new file mode 100644 index 0000000..8010790 --- /dev/null +++ b/SOURCES/0023-Do-not-enter-critical-section-if-not-necessary.patch @@ -0,0 +1,28 @@ +From 8c96c9aa17bc85126d3535c8ea9f96a53e05f7e3 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Wed, 15 Jan 2014 18:52:00 +0100 +Subject: [PATCH 23/39] Do not enter critical section if not necessary + +Related to rhbz#1051198 +--- + src/abrt-checker.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/abrt-checker.c b/src/abrt-checker.c +index a5c2bdd..d5160cb 100644 +--- a/src/abrt-checker.c ++++ b/src/abrt-checker.c +@@ -2100,6 +2100,10 @@ static void JNICALL callback_on_exception( + jmethodID catch_method, + jlocation catch_location __UNUSED_VAR) + { ++ /* This is caught exception and no caught exception is to be reported */ ++ if (NULL != catch_method && NULL == reportedCaughExceptionTypes) ++ return; ++ + char *exception_type_name = NULL; + + /* all operations should be processed in critical section */ +-- +1.8.3.1 + diff --git a/SOURCES/0024-Do-not-report-exceptions-caught-by-native-methods.patch b/SOURCES/0024-Do-not-report-exceptions-caught-by-native-methods.patch new file mode 100644 index 0000000..70cac9e --- /dev/null +++ b/SOURCES/0024-Do-not-report-exceptions-caught-by-native-methods.patch @@ -0,0 +1,580 @@ +From 47461c8bd7427432bc0afe848db001e05f8d01a3 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Wed, 15 Jan 2014 11:49:36 +0100 +Subject: [PATCH 24/39] Do not report exceptions caught by native methods + +Related to rhbz#1051198 +--- + src/abrt-checker.c | 247 ++++++++++++++++++++++++++++++++++++++++------------- + src/jthread_map.c | 26 +++--- + src/jthread_map.h | 18 ++-- + 3 files changed, 212 insertions(+), 79 deletions(-) + +diff --git a/src/abrt-checker.c b/src/abrt-checker.c +index d5160cb..fb0c0eb 100644 +--- a/src/abrt-checker.c ++++ b/src/abrt-checker.c +@@ -63,9 +63,6 @@ + /* Enables checks based on JVMTI_EVENT_VM_DEATH */ + /* #define ABRT_VM_DEATH_CHECK */ + +-/* Enables checks based on JVMTI_EVENT_EXCEPTION_CATCH */ +-/* #define ABRT_EXCEPTION_CATCH_CHECK */ +- + /* Enables checks based on JVMTI_EVENT_VM_OBJECT_ALLOC */ + /* #define ABRT_OBJECT_ALLOCATION_SIZE_CHECK */ + +@@ -165,6 +162,19 @@ typedef struct { + + + /* ++ * This structure is representation of a single report of an exception. ++ */ ++typedef struct { ++ char *message; ++ char *stacktrace; ++ char *executable; ++ char *exception_type_name; ++ jobject exception_object; ++} T_exceptionReport; ++ ++ ++ ++/* + * Flags for specification of destination for error reports + */ + typedef enum { +@@ -214,6 +224,9 @@ int executableFlags = 0; + /* Map of buffer for already reported exceptions to prevent re-reporting */ + T_jthreadMap *threadMap; + ++/* Map of uncaught exceptions. There should be only 1 per thread.*/ ++T_jthreadMap *uncaughtExceptionMap; ++ + + /* forward headers */ + static char* get_path_to_class(jvmtiEnv *jvmti_env, JNIEnv *jni_env, jclass class, char *class_name, const char *stringize_method_name); +@@ -453,9 +466,12 @@ static int exception_is_intended_to_be_reported( + + if (reportedCaughExceptionTypes != NULL) + { +- *exception_type = get_exception_type_name(jvmti_env, jni_env, exception_object); + if (NULL == *exception_type) +- return 0; ++ { ++ *exception_type = get_exception_type_name(jvmti_env, jni_env, exception_object); ++ if (NULL == *exception_type) ++ return 0; ++ } + + /* special cases for selected exceptions */ + for (char **cursor = reportedCaughExceptionTypes; *cursor; ++cursor) +@@ -1277,7 +1293,7 @@ static void JNICALL callback_on_thread_start( + return; + } + +- jthread_map_push(threadMap, tid, threads_exc_buf); ++ jthread_map_push(threadMap, tid, (void *)threads_exc_buf); + } + + +@@ -1304,7 +1320,25 @@ static void JNICALL callback_on_thread_end( + return; + } + +- T_jthrowableCircularBuf *threads_exc_buf = jthread_map_pop(threadMap, tid); ++ T_exceptionReport *rpt = (T_exceptionReport *)jthread_map_pop(uncaughtExceptionMap, tid); ++ T_jthrowableCircularBuf *threads_exc_buf = (T_jthrowableCircularBuf *)jthread_map_pop(threadMap, tid); ++ ++ if (NULL != rpt) ++ { ++ if (NULL == threads_exc_buf || NULL == jthrowable_circular_buf_find(threads_exc_buf, rpt->exception_object)) ++ { ++ report_stacktrace(NULL != rpt->executable ? rpt->executable : processProperties.main_class, ++ NULL != rpt->message ? rpt->message : "Uncaught exception", ++ rpt->stacktrace, ++ NULL != threads_exc_buf); ++ } ++ ++ free(rpt->message); ++ free(rpt->stacktrace); ++ free(rpt->executable); ++ free(rpt->exception_type_name); ++ } ++ + if (threads_exc_buf != NULL) + { + jthrowable_circular_buf_free(threads_exc_buf); +@@ -2120,7 +2154,7 @@ static void JNICALL callback_on_exception( + + if (NULL != threadMap && 0 == get_tid(jni_env, thr, &tid)) + { +- threads_exc_buf = jthread_map_get(threadMap, tid); ++ threads_exc_buf = (T_jthrowableCircularBuf *)jthread_map_get(threadMap, tid); + VERBOSE_PRINT("Got circular buffer for thread %p\n", (void *)threads_exc_buf); + } + else +@@ -2137,12 +2171,6 @@ static void JNICALL callback_on_exception( + char *class_name_ptr = NULL; + char *class_signature_ptr = NULL; + +- if (NULL != threads_exc_buf) +- { +- VERBOSE_PRINT("Pushing to circular buffer\n"); +- jthrowable_circular_buf_push(threads_exc_buf, exception_object); +- } +- + error_code = (*jvmti_env)->GetMethodName(jvmti_env, method, &method_name_ptr, &method_signature_ptr, NULL); + if (check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__))) + goto callback_on_exception_cleanup; +@@ -2176,11 +2204,47 @@ static void JNICALL callback_on_exception( + if (NULL == report_message) + report_message = (NULL != catch_method) ? "Caught exception" : "Uncaught exception"; + +- report_stacktrace(NULL != executable ? executable : processProperties.main_class, +- report_message, +- stack_trace_str, +- NULL != threads_exc_buf); ++ if (NULL == catch_method) ++ { /* Postpone reporting of uncaught exceptions as they may be caught by a native function */ ++ T_exceptionReport *rpt = malloc(sizeof(*rpt)); ++ if (NULL == rpt) ++ { ++ fprintf(stderr, __FILE__ ":" STRINGIZE(__LINE__) ": malloc(): out of memory"); ++ } ++ else ++ { ++ rpt->message = message; ++ message = NULL; ++ ++ rpt->exception_type_name = exception_type_name; ++ exception_type_name = NULL; ++ ++ rpt->stacktrace = stack_trace_str; ++ stack_trace_str = NULL; ++ ++ rpt->executable = executable; ++ executable = NULL; + ++ rpt->exception_object = exception_object; ++ ++ jthread_map_push(uncaughtExceptionMap, tid, (T_exceptionReport *)rpt); ++ } ++ } ++ else ++ { ++ report_stacktrace(NULL != executable ? executable : processProperties.main_class, ++ report_message, ++ stack_trace_str, ++ NULL != threads_exc_buf); ++ ++ if (NULL != threads_exc_buf) ++ { ++ VERBOSE_PRINT("Pushing to circular buffer\n"); ++ jthrowable_circular_buf_push(threads_exc_buf, exception_object); ++ } ++ } ++ ++ free(executable); + free(message); + free(stack_trace_str); + +@@ -2217,18 +2281,16 @@ callback_on_exception_cleanup: + } + + +- +-#if ABRT_EXCEPTION_CATCH_CHECK + /* + * This function is called when an exception is catched. + */ + static void JNICALL callback_on_exception_catch( + jvmtiEnv *jvmti_env, +- JNIEnv *jni_env __UNUSED_VAR, +- jthread thr __UNUSED_VAR, ++ JNIEnv *jni_env, ++ jthread thread, + jmethodID method, + jlocation location __UNUSED_VAR, +- jobject exception __UNUSED_VAR) ++ jobject exception_object) + { + jvmtiError error_code; + +@@ -2236,52 +2298,120 @@ static void JNICALL callback_on_exception_catch( + char *method_signature_ptr = NULL; + char *class_signature_ptr = NULL; + +- jclass class; +- + /* all operations should be processed in critical section */ + enter_critical_section(jvmti_env, shared_lock); + +- /* retrieve all required informations */ +- error_code = (*jvmti_env)->GetMethodName(jvmti_env, method, &method_name_ptr, &method_signature_ptr, NULL); +- if (check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__))) +- goto callback_on_exception_catch_cleanup; +- +- error_code = (*jvmti_env)->GetMethodDeclaringClass(jvmti_env, method, &class); +- if (check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__))) +- goto callback_on_exception_catch_cleanup; ++ jclass class; + +- error_code = (*jvmti_env)->GetClassSignature(jvmti_env, class, &class_signature_ptr, NULL); +- if (check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__))) +- goto callback_on_exception_catch_cleanup; ++ jlong tid = 0; + +-#ifdef VERBOSE +- /* readable class name */ +- char *class_name_ptr = format_class_name(class_signature_ptr, '.'); +-#endif ++ if (get_tid(jni_env, thread, &tid)) ++ { ++ fprintf(stderr, __FILE__ ":" STRINGIZE(__LINE__) ": Cannot clear uncaught exceptions"); ++ goto callback_on_exception_catch_exit; ++ } + +- VERBOSE_PRINT("An exception was caught in a method %s%s() with signature %s\n", class_name_ptr, method_name_ptr, method_signature_ptr); ++ T_exceptionReport *rpt = (T_exceptionReport *)jthread_map_get(uncaughtExceptionMap, tid); ++ if (NULL == rpt) ++ { ++ goto callback_on_exception_catch_exit; ++ } + +-callback_on_exception_catch_cleanup: +- /* cleapup */ +- if (method_name_ptr != NULL) ++ jclass object_class = (*jni_env)->FindClass(jni_env, "java/lang/Object"); ++ if (NULL == object_class) + { +- error_code = (*jvmti_env)->Deallocate(jvmti_env, (unsigned char *)method_name_ptr); +- check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__)); ++ VERBOSE_PRINT("Cannot find java/lang/Object class"); ++ goto callback_on_exception_catch_exit; + } +- if (method_signature_ptr != NULL) ++ ++ jmethodID equal_method = (*jni_env)->GetMethodID(jni_env, object_class, "equals", "(Ljava/lang/Object;)Z"); ++ if (NULL == equal_method) + { +- error_code = (*jvmti_env)->Deallocate(jvmti_env, (unsigned char *)method_signature_ptr); +- check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__)); ++ VERBOSE_PRINT("Cannot find java.lang.Object.equals(Ljava/lang/Object;)Z method"); ++ (*jni_env)->DeleteLocalRef(jni_env, object_class); ++ goto callback_on_exception_catch_exit; + } +- if (class_signature_ptr != NULL) ++ ++ jboolean equal_objects = (*jni_env)->CallBooleanMethod(jni_env, exception_object, equal_method, rpt->exception_object); ++ if (!equal_objects) ++ goto callback_on_exception_catch_exit; ++ ++ /* Faster than get()-pop() approach is faster because it is search-and-search-free but ++ * pop()-push() approach is search-free-and-search-malloc ++ * ++ * JVM always catches java.security.PrivilegedActionException while ++ * handling uncaught java.lang.ClassNotFoundException throw by ++ * initialization of the system (native) class loader. ++ */ ++ jthread_map_pop(uncaughtExceptionMap, tid); ++ ++ if (exception_is_intended_to_be_reported(jvmti_env, jni_env, rpt->exception_object, &(rpt->exception_type_name))) + { +- error_code = (*jvmti_env)->Deallocate(jvmti_env, (unsigned char *)class_signature_ptr); +- check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__)); ++ jlong tid = 0; ++ T_jthrowableCircularBuf *threads_exc_buf = NULL; ++ ++ if (NULL != threadMap && 0 == get_tid(jni_env, thread, &tid)) ++ { ++ threads_exc_buf = (T_jthrowableCircularBuf *)jthread_map_get(threadMap, tid); ++ VERBOSE_PRINT("Got circular buffer for thread %p\n", (void *)threads_exc_buf); ++ } ++ else ++ { ++ VERBOSE_PRINT("Cannot get thread's ID. Disabling reporting to ABRT."); ++ } ++ ++ if (NULL == threads_exc_buf || NULL == jthrowable_circular_buf_find(threads_exc_buf, rpt->exception_object)) ++ { ++ /* retrieve all required informations */ ++ error_code = (*jvmti_env)->GetMethodName(jvmti_env, method, &method_name_ptr, &method_signature_ptr, NULL); ++ if (check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__))) ++ goto callback_on_exception_catch_cleanup; ++ ++ error_code = (*jvmti_env)->GetMethodDeclaringClass(jvmti_env, method, &class); ++ if (check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__))) ++ goto callback_on_exception_catch_cleanup; ++ ++ error_code = (*jvmti_env)->GetClassSignature(jvmti_env, class, &class_signature_ptr, NULL); ++ if (check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__))) ++ goto callback_on_exception_catch_cleanup; ++ ++ /* readable class name */ ++ char *class_name_ptr = format_class_name(class_signature_ptr, '\0'); ++ char *message = format_exception_reason_message(/*caught*/1, rpt->exception_type_name, class_name_ptr, method_name_ptr); ++ report_stacktrace(NULL != rpt->executable ? rpt->executable : processProperties.main_class, ++ NULL != message ? message : "Caught exception", ++ rpt->stacktrace, ++ NULL != threads_exc_buf); ++ ++ if (NULL != threads_exc_buf) ++ { ++ VERBOSE_PRINT("Pushing to circular buffer\n"); ++ jthrowable_circular_buf_push(threads_exc_buf, rpt->exception_object); ++ } ++ ++callback_on_exception_catch_cleanup: ++ /* cleapup */ ++ if (method_name_ptr != NULL) ++ { ++ error_code = (*jvmti_env)->Deallocate(jvmti_env, (unsigned char *)method_name_ptr); ++ check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__)); ++ } ++ if (class_signature_ptr != NULL) ++ { ++ error_code = (*jvmti_env)->Deallocate(jvmti_env, (unsigned char *)class_signature_ptr); ++ check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__)); ++ } ++ } + } + ++ free(rpt->message); ++ free(rpt->stacktrace); ++ free(rpt->executable); ++ free(rpt->exception_type_name); ++ ++callback_on_exception_catch_exit: + exit_critical_section(jvmti_env, shared_lock); + } +-#endif /* ABRT_EXCEPTION_CATCH_CHECK */ + + + +@@ -2497,10 +2627,8 @@ jvmtiError register_all_callback_functions(jvmtiEnv *jvmti_env) + /* JVMTI_EVENT_EXCEPTION */ + callbacks.Exception = &callback_on_exception; + +-#if ABRT_EXCEPTION_CATCH_CHECK + /* JVMTI_EVENT_EXCEPTION_CATCH */ + callbacks.ExceptionCatch = &callback_on_exception_catch; +-#endif /* ABRT_EXCEPTION_CATCH_CHECK */ + + #if ABRT_OBJECT_ALLOCATION_SIZE_CHECK + /* JVMTI_EVENT_VM_OBJECT_ALLOC */ +@@ -2580,12 +2708,10 @@ jvmtiError set_event_notification_modes(jvmtiEnv* jvmti_env) + return error_code; + } + +-#if ABRT_EXCEPTION_CATCH_CHECK + if ((error_code = set_event_notification_mode(jvmti_env, JVMTI_EVENT_EXCEPTION_CATCH)) != JNI_OK) + { + return error_code; + } +-#endif /* ABRT_EXCEPTION_CATCH_CHECK */ + + #if ABRT_OBJECT_ALLOCATION_SIZE_CHECK + if ((error_code = set_event_notification_mode(jvmti_env, JVMTI_EVENT_VM_OBJECT_ALLOC)) != JNI_OK) +@@ -2903,6 +3029,12 @@ JNIEXPORT jint JNICALL Agent_OnLoad( + return -1; + } + ++ uncaughtExceptionMap = jthread_map_new(); ++ if (NULL == uncaughtExceptionMap) ++ { ++ fprintf(stderr, __FILE__ ":" STRINGIZE(__LINE__) ": can not create a set of uncaught exceptions\n"); ++ return -1; ++ } + return JNI_OK; + } + +@@ -2928,6 +3060,7 @@ JNIEXPORT void JNICALL Agent_OnUnload(JavaVM *vm __UNUSED_VAR) + fclose(fout); + } + ++ jthread_map_free(uncaughtExceptionMap); + jthread_map_free(threadMap); + } + +diff --git a/src/jthread_map.c b/src/jthread_map.c +index 29c5c29..cd5ca52 100644 +--- a/src/jthread_map.c ++++ b/src/jthread_map.c +@@ -35,7 +35,7 @@ struct jthread_map_item; + + typedef struct jthread_map_item { + long tid; ///< item ID from Thread.getId() +- T_jthrowableCircularBuf *buffer; ///< an instance of circular buffer for thread ++ void *data; ///< data + struct jthread_map_item *next; ///< a next item mapped to same element + } T_jthreadMapItem; + +@@ -76,7 +76,7 @@ void jthread_map_free(T_jthreadMap *map) + + + +-static T_jthreadMapItem *jthrowable_map_item_new(long tid, T_jthrowableCircularBuf *buffer) ++static T_jthreadMapItem *jthrowable_map_item_new(long tid, void *item) + { + T_jthreadMapItem *itm = malloc(sizeof(*itm)); + if (NULL == itm) +@@ -86,7 +86,7 @@ static T_jthreadMapItem *jthrowable_map_item_new(long tid, T_jthrowableCircularB + } + + itm->tid = tid; +- itm->buffer = buffer; ++ itm->data = item; + itm->next = NULL; + return itm; + } +@@ -105,7 +105,7 @@ static void jthread_map_item_free(T_jthreadMapItem *itm) + + + +-void jthread_map_push(T_jthreadMap *map, jlong tid, T_jthrowableCircularBuf *buffer) ++void jthread_map_push(T_jthreadMap *map, jlong tid, void *item) + { + assert(NULL != map); + +@@ -122,7 +122,7 @@ void jthread_map_push(T_jthreadMap *map, jlong tid, T_jthrowableCircularBuf *buf + + if (NULL == itm) + { +- T_jthreadMapItem *new = jthrowable_map_item_new(tid, buffer); ++ T_jthreadMapItem *new = jthrowable_map_item_new(tid, item); + if (last == NULL) + { + map->items[index] = new; +@@ -138,39 +138,39 @@ void jthread_map_push(T_jthreadMap *map, jlong tid, T_jthrowableCircularBuf *buf + + + +-T_jthrowableCircularBuf *jthread_map_get(T_jthreadMap *map, jlong tid) ++void *jthread_map_get(T_jthreadMap *map, jlong tid) + { + assert(NULL != map); + + pthread_mutex_lock(&map->mutex); + + const size_t index = tid % MAP_SIZE; +- T_jthrowableCircularBuf *buffer = NULL; ++ void *data = NULL; + + for (T_jthreadMapItem *itm = map->items[index]; NULL != itm; itm = itm->next) + { + if (itm->tid == tid) + { +- buffer = itm->buffer; ++ data = itm->data; + break; + } + } + + pthread_mutex_unlock(&map->mutex); + +- return buffer; ++ return data; + } + + + +-T_jthrowableCircularBuf *jthread_map_pop(T_jthreadMap *map, jlong tid) ++void *jthread_map_pop(T_jthreadMap *map, jlong tid) + { + assert(NULL != map); + + pthread_mutex_lock(&map->mutex); + + const size_t index = tid % MAP_SIZE; +- T_jthrowableCircularBuf *buffer = NULL; ++ void *data = NULL; + if (NULL != map->items[index]) + { + T_jthreadMapItem *last = NULL; +@@ -183,7 +183,7 @@ T_jthrowableCircularBuf *jthread_map_pop(T_jthreadMap *map, jlong tid) + + if (NULL != itm) + { +- buffer = itm->buffer; ++ data = itm->data; + + if (NULL == last) + { +@@ -200,7 +200,7 @@ T_jthrowableCircularBuf *jthread_map_pop(T_jthreadMap *map, jlong tid) + + pthread_mutex_unlock(&map->mutex); + +- return buffer; ++ return data; + } + + +diff --git a/src/jthread_map.h b/src/jthread_map.h +index 29fcc92..52d2832 100644 +--- a/src/jthread_map.h ++++ b/src/jthread_map.h +@@ -23,7 +23,7 @@ + + + /* +- * Map of TID to jthrowable_circular_buf ++ * Map of TID to (void *) + */ + typedef struct jthread_map T_jthreadMap; + +@@ -41,7 +41,7 @@ T_jthreadMap *jthread_map_new(); + /* + * Frees map's memory + * +- * Doesn't release memory of stored circular buffers. ++ * Doesn't release memory of stored (void *). + * + * @param map Pointer to @jthread_map. Accepts NULL + */ +@@ -50,15 +50,15 @@ void jthread_map_free(T_jthreadMap *map); + + + /* +- * Adds a new map item identified by @tid with value @buffer ++ * Adds a new map item identified by @tid with value @item + * + * Does nothing if item with same @tid already exists in @map + * + * @param map Map + * @param tid New item ID +- * @param buffer A pointer to @jthrowable_circular_buf ++ * @param item A (void *) item + */ +-void jthread_map_push(T_jthreadMap *map, jlong tid, T_jthrowableCircularBuf *buffer); ++void jthread_map_push(T_jthreadMap *map, jlong tid, void *item); + + + +@@ -67,9 +67,9 @@ void jthread_map_push(T_jthreadMap *map, jlong tid, T_jthrowableCircularBuf *buf + * + * @param map Map + * @param tid Required ID +- * @returns A pointer to stored @jthrowable_circular_buf or NULL if item with @tid was not found ++ * @returns A stored item or NULL if item with @tid was not found + */ +-T_jthrowableCircularBuf *jthread_map_get(T_jthreadMap *map, jlong tid); ++void *jthread_map_get(T_jthreadMap *map, jlong tid); + + + +@@ -78,9 +78,9 @@ T_jthrowableCircularBuf *jthread_map_get(T_jthreadMap *map, jlong tid); + * + * @param map Map + * @param tid Removed item's ID +- * @returns A pointer to stored @jthrowable_circular_buf or NULL if item with @tid was not found ++ * @returns A stored item or NULL if item with @tid was not found + */ +-T_jthrowableCircularBuf *jthread_map_pop(T_jthreadMap *map, jlong tid); ++void *jthread_map_pop(T_jthreadMap *map, jlong tid); + + + +-- +1.8.3.1 + diff --git a/SOURCES/0025-Update-the-missing-class-test.patch b/SOURCES/0025-Update-the-missing-class-test.patch new file mode 100644 index 0000000..979b06a --- /dev/null +++ b/SOURCES/0025-Update-the-missing-class-test.patch @@ -0,0 +1,79 @@ +From 888f4a58a82e2d265fc95907492a24c95978e605 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Fri, 17 Jan 2014 14:20:51 +0100 +Subject: [PATCH 25/39] Update the missing class test + +The ClassNotFound exception which is thrown in case of a not existing +main class file is caught by Java Native Interface and java process +exits gracefully with an error message: + +Error: Could not find or load main class MissingClassTest + +It doesn't make sense to report such exceptions because this exception +would be reported every time when someone run "java foo" where 'foo' +does not exist. + +Just for the record, ABRT doesn't detect the similar problem in python. + +$ python foo +python: can't open file 'foo': [Errno 2] No such file or directory + +Related to rhbz#1051198 +--- + test/CMakeLists.txt | 20 ++++++++++++++------ + test/outputs/run_missing_class_test.log.in | 10 ---------- + 2 files changed, 14 insertions(+), 16 deletions(-) + delete mode 100644 test/outputs/run_missing_class_test.log.in + +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index 5267e7b..1a851e6 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -171,14 +171,22 @@ _add_test_target( + ) + _add_test(run_bad_class 2) + +-_add_test_target( ++# Disabled because JVM catches the ClassNotFoundException in a native method and exits gracefully ++#_add_test_target( ++# run_missing_class_test ++# MissingClassTest ++# PRE rm -f MissingClassTest.class ++# DEPENDS ${TEST_JAVA_TARGETS} ${JAR_TEST_PATH} ++# AGENT_OPTIONS executable=threadclass ++#) ++#_add_test(run_missing_class_test 2) ++add_custom_target( + run_missing_class_test +- MissingClassTest +- PRE rm -f MissingClassTest.class +- DEPENDS ${TEST_JAVA_TARGETS} ${JAR_TEST_PATH} +- AGENT_OPTIONS executable=threadclass ++ COMMAND rm -f MissingClassTest.class && LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/src ${Java_JAVA_EXECUTABLE} -agentlib:${AGENT_NAME}=output=run_missing_class.log MissingClassTest || test ! -e run_missing_class.log ++ DEPENDS AbrtChecker ${TEST_JAVA_TARGETS} ++ WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + ) +-_add_test(run_missing_class_test 2) ++add_test(test_run_missing_class_test make run_missing_class_test) + + _add_test_target( + run_try_finally +diff --git a/test/outputs/run_missing_class_test.log.in b/test/outputs/run_missing_class_test.log.in +deleted file mode 100644 +index ea3dc25..0000000 +--- a/test/outputs/run_missing_class_test.log.in ++++ /dev/null +@@ -1,10 +0,0 @@ +-Uncaught exception java.lang.ClassNotFoundException in method java.lang.ClassLoader.loadClass() +-Exception in thread "main" java.lang.ClassNotFoundException: MissingClassTest +- at java.net.URLClassLoader$1.run(URLClassLoader.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URLClassLoader$1.class] +- at java.net.URLClassLoader$1.run(URLClassLoader.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URLClassLoader$1.class] +- at java.security.AccessController.doPrivileged(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/security/AccessController.class] +- at java.net.URLClassLoader.findClass(URLClassLoader.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URLClassLoader.class] +- at java.lang.ClassLoader.loadClass(ClassLoader.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/ClassLoader.class] +- at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/sun/misc/Launcher$AppClassLoader.class] +- at java.lang.ClassLoader.loadClass(ClassLoader.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/ClassLoader.class] +-executable: JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar +-- +1.8.3.1 + diff --git a/SOURCES/0026-Surround-all-JNI-calls-in-try-catch-all-block.patch b/SOURCES/0026-Surround-all-JNI-calls-in-try-catch-all-block.patch new file mode 100644 index 0000000..a6d93b3 --- /dev/null +++ b/SOURCES/0026-Surround-all-JNI-calls-in-try-catch-all-block.patch @@ -0,0 +1,618 @@ +From a174f452fc48735da7ee49ab5c906528f87b77b5 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Thu, 9 Jan 2014 22:56:28 +0100 +Subject: [PATCH 26/39] Surround all JNI calls in try catch all block + +Related to rhbz#1051198 +--- + src/abrt-checker.c | 273 ++++++++++++++++++------------------------ + src/jthrowable_circular_buf.c | 40 ++++++- + 2 files changed, 155 insertions(+), 158 deletions(-) + +diff --git a/src/abrt-checker.c b/src/abrt-checker.c +index fb0c0eb..b6f11e8 100644 +--- a/src/abrt-checker.c ++++ b/src/abrt-checker.c +@@ -631,6 +631,26 @@ static void report_stacktrace( + + + /* ++ * Returns logical true if exception occurred and clears it. ++ */ ++static inline int check_and_clear_exception( ++ JNIEnv *jni_env) ++{ ++ if ((*jni_env)->ExceptionOccurred(jni_env)) ++ { ++#ifdef VERBOSE ++ (*jni_env)->ExceptionDescribe(jni_env); ++#endif ++ (*jni_env)->ExceptionClear(jni_env); ++ return 1; ++ } ++ ++ return 0; ++} ++ ++ ++ ++/* + * Print a message when any JVM TI error occurs. + */ + static void print_jvmti_error( +@@ -666,12 +686,13 @@ static int get_tid( + } + + jmethodID get_id = (*jni_env)->GetMethodID(jni_env, thread_class, "getId", "()J" ); +- if (NULL == get_id) ++ if (check_and_clear_exception(jni_env) || NULL == get_id) + { +- VERBOSE_PRINT("Cannot method java.lang.Thread.getId()J\n"); ++ VERBOSE_PRINT(__FILE__ ":" STRINGIZE(__LINE__)": Could not get methodID of java/lang/Thread.getId()J\n"); + return 1; + } + ++ /* Thread.getId() throws nothing */ + *tid = (*jni_env)->CallLongMethod(jni_env, thr, get_id); + + return 0; +@@ -908,7 +929,6 @@ static void get_thread_name( + } + + +- + /* + * Read executable name from link /proc/${PID}/exe + */ +@@ -1068,7 +1088,7 @@ static char *get_main_class( + char *class_name; + + error_code = (*jvmti_env)->GetSystemProperty(jvmti_env, "sun.java.command", &class_name); +- if (error_code != JVMTI_ERROR_NONE) ++ if (error_code != JVMTI_ERROR_NONE || NULL == class_name) + { + return UNKNOWN_CLASS_NAME; + } +@@ -1081,26 +1101,10 @@ static char *get_main_class( + string_replace(class_name, '.', '/'); + + jclass cls = (*jni_env)->FindClass(jni_env, class_name); +- /* Throws: +- * ClassFormatError: if the class data does not specify a valid class. +- * ClassCircularityError: if a class or interface would be its own superclass or superinterface. +- * NoClassDefFoundError: if no definition for a requested class or interface can be found. +- * OutOfMemoryError: if the system runs out of memory. +- */ +- +- jthrowable exception; +- exception = (*jni_env)->ExceptionOccurred(jni_env); +- if (exception) ++ if (check_and_clear_exception(jni_env) || cls == NULL) + { +- (*jni_env)->ExceptionClear(jni_env); +- } +- +- if (cls == NULL) +- { +- if (class_name != NULL) +- { +- (*jvmti_env)->Deallocate(jvmti_env, (unsigned char*)class_name); +- } ++ VERBOSE_PRINT(__FILE__ ":" STRINGIZE(__LINE__)": Could not get class of %s\n", class_name); ++ (*jvmti_env)->Deallocate(jvmti_env, (unsigned char*)class_name); + return UNKNOWN_CLASS_NAME; + } + +@@ -1428,6 +1432,7 @@ static char* get_path_to_class_class_loader( + char *class_name, + const char *stringize_method_name) + { ++ char *out = NULL; + jclass class_loader_class = NULL; + + char *upd_class_name = (char*)malloc(strlen(class_name) + sizeof("class") + 1); +@@ -1442,47 +1447,18 @@ static char* get_path_to_class_class_loader( + + /* find ClassLoader class */ + class_loader_class = (*jni_env)->FindClass(jni_env, "java/lang/ClassLoader"); +- /* Throws: +- * ClassFormatError: if the class data does not specify a valid class. +- * ClassCircularityError: if a class or interface would be its own superclass or superinterface. +- * NoClassDefFoundError: if no definition for a requested class or interface can be found. +- * OutOfMemoryError: if the system runs out of memory. +- */ +- +- /* check if exception was thrown from FindClass() method */ +- jthrowable exception; +- exception = (*jni_env)->ExceptionOccurred(jni_env); +- if (exception) +- { +- (*jni_env)->ExceptionClear(jni_env); +- free(upd_class_name); +- return NULL; +- } +- +- if (class_loader_class == NULL) ++ if (check_and_clear_exception(jni_env) || class_loader_class == NULL) + { ++ VERBOSE_PRINT(__FILE__ ":" STRINGIZE(__LINE__)": Could not get class of java/lang/ClassLoader\n"); + free(upd_class_name); + return NULL; + } + + /* find method ClassLoader.getResource() */ +- jmethodID get_resource = (*jni_env)->GetMethodID(jni_env, class_loader_class, "getResource", "(Ljava/lang/String;)Ljava/net/URL;" ); +- /* Throws: +- * NoSuchMethodError: if the specified method cannot be found. +- * ExceptionInInitializerError: if the class initializer fails due to an exception. +- * OutOfMemoryError: if the system runs out of memory. +- */ +- +- exception = (*jni_env)->ExceptionOccurred(jni_env); +- if (exception) +- { +- free(upd_class_name); +- (*jni_env)->DeleteLocalRef(jni_env, class_loader_class); +- return NULL; +- } +- +- if (get_resource == NULL) ++ jmethodID get_resource = (*jni_env)->GetMethodID(jni_env, class_loader_class, "getResource", "(Ljava/lang/String;)Ljava/net/URL;"); ++ if (check_and_clear_exception(jni_env) || get_resource == NULL) + { ++ VERBOSE_PRINT(__FILE__ ":" STRINGIZE(__LINE__)": Could not get methodID of java/lang/ClassLoader.getResource(Ljava/lang/String;)Ljava/net/URL;\n"); + free(upd_class_name); + (*jni_env)->DeleteLocalRef(jni_env, class_loader_class); + return NULL; +@@ -1491,52 +1467,46 @@ static char* get_path_to_class_class_loader( + /* convert new class name into a Java String */ + jstring j_class_name = (*jni_env)->NewStringUTF(jni_env, upd_class_name); + free(upd_class_name); ++ if (check_and_clear_exception(jni_env)) ++ { ++ VERBOSE_PRINT(__FILE__ ":" STRINGIZE(__LINE__)": Could not allocate a new UTF string for '%s'\n", upd_class_name); ++ goto get_path_to_class_class_loader_lcl_refs_cleanup; ++ } + + /* call method ClassLoader.getResource(className) */ + jobject url = (*jni_env)->CallObjectMethod(jni_env, class_loader, get_resource, j_class_name); +- if ((*jni_env)->ExceptionCheck(jni_env)) ++ if (check_and_clear_exception(jni_env) || NULL == url) + { +- (*jni_env)->DeleteLocalRef(jni_env, class_loader_class); +- (*jni_env)->DeleteLocalRef(jni_env, j_class_name); +- (*jni_env)->ExceptionClear(jni_env); +- return NULL; ++ VERBOSE_PRINT(__FILE__ ":" STRINGIZE(__LINE__)": Could not get a resource of %s\n", class_name); ++ goto get_path_to_class_class_loader_lcl_refs_cleanup; + } +- if (url == NULL) ++ ++ /* find method URL.toString() */ ++ jclass url_class = (*jni_env)->FindClass(jni_env, "java/net/URL"); ++ if (check_and_clear_exception(jni_env) || NULL == url_class) + { +- (*jni_env)->DeleteLocalRef(jni_env, class_loader_class); +- (*jni_env)->DeleteLocalRef(jni_env, j_class_name); +- return NULL; ++ VERBOSE_PRINT(__FILE__ ":" STRINGIZE(__LINE__)": Could not get class of java/net/URL\n"); ++ goto get_path_to_class_class_loader_lcl_refs_cleanup; + } + +- /* find method URL.toString() */ +- jmethodID to_external_form = (*jni_env)->GetMethodID(jni_env, (*jni_env)->FindClass(jni_env, "java/net/URL"), stringize_method_name, "()Ljava/lang/String;" ); +- /* Throws: +- * NoSuchMethodError: if the specified method cannot be found. +- * ExceptionInInitializerError: if the class initializer fails due to an exception. +- * OutOfMemoryError: if the system runs out of memory. +- */ +- exception = (*jni_env)->ExceptionOccurred(jni_env); +- if (exception) ++ jmethodID to_external_form = (*jni_env)->GetMethodID(jni_env, url_class, stringize_method_name, "()Ljava/lang/String;"); ++ if (check_and_clear_exception(jni_env) || NULL == to_external_form) + { +- (*jni_env)->DeleteLocalRef(jni_env, class_loader_class); +- (*jni_env)->DeleteLocalRef(jni_env, j_class_name); +- return NULL; ++ VERBOSE_PRINT(__FILE__ ":" STRINGIZE(__LINE__)": Could not get methodID of java/net/URL.%s()Ljava/lang/String;\n", stringize_method_name); ++ goto get_path_to_class_class_loader_lcl_refs_cleanup; + } + + /* call method URL.toString() */ + jstring jstr = (jstring)(*jni_env)->CallObjectMethod(jni_env, url, to_external_form); +- /* no exception expected */ +- +- if (jstr == NULL) ++ if (check_and_clear_exception(jni_env) || jstr == NULL) + { +- (*jni_env)->DeleteLocalRef(jni_env, class_loader_class); +- (*jni_env)->DeleteLocalRef(jni_env, j_class_name); +- return NULL; ++ VERBOSE_PRINT(__FILE__ ":" STRINGIZE(__LINE__)": Failed to convert an URL object to a string\n"); ++ goto get_path_to_class_class_loader_lcl_refs_cleanup; + } + + /* convert Java String into C char* */ + char *str = (char*)(*jni_env)->GetStringUTFChars(jni_env, jstr, NULL); +- char *out = strdup(str); ++ out = strdup(str); + if (out == NULL) + { + fprintf(stderr, "strdup(): out of memory"); +@@ -1544,6 +1514,8 @@ static char* get_path_to_class_class_loader( + + /* cleanup */ + (*jni_env)->ReleaseStringUTFChars(jni_env, jstr, str); ++ ++get_path_to_class_class_loader_lcl_refs_cleanup: + (*jni_env)->DeleteLocalRef(jni_env, class_loader_class); + (*jni_env)->DeleteLocalRef(jni_env, j_class_name); + return out; +@@ -1558,39 +1530,30 @@ static jobject get_system_class_loader( + jvmtiEnv *jvmti_env __UNUSED_VAR, + JNIEnv *jni_env) + { ++ jobject system_class_loader = NULL; ++ + jclass class_loader_class = (*jni_env)->FindClass(jni_env, "java/lang/ClassLoader"); +- if (NULL == class_loader_class) ++ if (check_and_clear_exception(jni_env) || NULL == class_loader_class) + { +- VERBOSE_PRINT("Cannot find java/lang/ClassLoader class\n"); ++ VERBOSE_PRINT(__FILE__ ":" STRINGIZE(__LINE__)": Could not get class of java/lang/ClassLoader\n"); + return NULL; + } + + jmethodID get_system_class_loader_smethod =(*jni_env)->GetStaticMethodID(jni_env, class_loader_class, "getSystemClassLoader", "()Ljava/lang/ClassLoader;"); +- jthrowable exception = (*jni_env)->ExceptionOccurred(jni_env); +- if (NULL != exception) +- { +- VERBOSE_PRINT("Exception occured: can not get method java.lang.ClassLoader.getSystemClassLoader()\n"); +- (*jni_env)->ExceptionClear(jni_env); +- (*jni_env)->DeleteLocalRef(jni_env, class_loader_class); +- return NULL; +- } +- if (NULL == get_system_class_loader_smethod) ++ if (check_and_clear_exception(jni_env) || NULL == get_system_class_loader_smethod) + { +- VERBOSE_PRINT("Cannot find java.lang.ClassLoader.getSystemClassLoader()Ljava/lang/ClassLoader;\n"); +- (*jni_env)->DeleteLocalRef(jni_env, class_loader_class); +- return NULL; ++ VERBOSE_PRINT(__FILE__ ":" STRINGIZE(__LINE__)": Could not find method java.lang.ClassLoader.getSystemClassLoader()Ljava/lang/ClassLoader;\n"); ++ goto get_system_class_loader_cleanup; + } + +- jobject system_class_loader = (*jni_env)->CallStaticObjectMethod(jni_env, class_loader_class, get_system_class_loader_smethod); +- exception = (*jni_env)->ExceptionOccurred(jni_env); +- if (NULL != exception) ++ system_class_loader = (*jni_env)->CallStaticObjectMethod(jni_env, class_loader_class, get_system_class_loader_smethod); ++ if (check_and_clear_exception(jni_env)) + { +- VERBOSE_PRINT("java.lang.ClassLoader.getSystemClassLoader() thrown an exception\n"); +- (*jni_env)->ExceptionClear(jni_env); +- (*jni_env)->DeleteLocalRef(jni_env, class_loader_class); +- return NULL; ++ VERBOSE_PRINT(__FILE__ ":" STRINGIZE(__LINE__)": Exception occurred: Cannot get the system class loader\n"); ++ goto get_system_class_loader_cleanup; + } + ++get_system_class_loader_cleanup: + (*jni_env)->DeleteLocalRef(jni_env, class_loader_class); + return system_class_loader; + } +@@ -1613,12 +1576,12 @@ static char* get_path_to_class( + /* class is loaded using boot classloader */ + if (class_loader == NULL) + { +- VERBOSE_PRINT("A class has not been loaded by a ClassLoader. Going to use the system class loader.\n"); ++ VERBOSE_PRINT(__FILE__ ":" STRINGIZE(__LINE__)": A class has not been loaded by a ClassLoader. Going to use the system class loader.\n"); + + class_loader = get_system_class_loader(jvmti_env, jni_env); + if (NULL == class_loader) + { +- VERBOSE_PRINT("Cannot get the system class loader."); ++ VERBOSE_PRINT(__FILE__ ":" STRINGIZE(__LINE__)": Cannot get the system class loader."); + return NULL; + } + } +@@ -1642,16 +1605,16 @@ static jclass find_class_in_loaded_class( + } + + jclass class_class = (*jni_env)->FindClass(jni_env, "java/lang/Class"); +- if (NULL == class_class) ++ if (check_and_clear_exception(jni_env) || NULL == class_class) + { +- VERBOSE_PRINT("Cannot find java/lang/Class class"); ++ VERBOSE_PRINT(__FILE__ ":" STRINGIZE(__LINE__)": Could not get class of java/lang/Class\n"); + goto find_class_in_loaded_class_cleanup; + } + + jmethodID get_name_method = (*jni_env)->GetMethodID(jni_env, class_class, "getName", "()Ljava/lang/String;"); +- if (NULL == get_name_method) ++ if (check_and_clear_exception(jni_env) || NULL == get_name_method) + { +- VERBOSE_PRINT("Cannot find java.lang.Class.getName.()Ljava/lang/String;"); ++ VERBOSE_PRINT(__FILE__ ":" STRINGIZE(__LINE__)": Could not get methodID of java/lang/Class.getName()Ljava/lang/String;\n"); + (*jni_env)->DeleteLocalRef(jni_env, class_class); + goto find_class_in_loaded_class_cleanup; + } +@@ -1659,8 +1622,9 @@ static jclass find_class_in_loaded_class( + for (jint i = 0; NULL == result && i < num_classes; ++i) + { + jobject class_name = (*jni_env)->CallObjectMethod(jni_env, loaded_classes[i], get_name_method); +- if (NULL == class_name) ++ if (check_and_clear_exception(jni_env) || NULL == class_name) + { ++ VERBOSE_PRINT(__FILE__ ":" STRINGIZE(__LINE__)": Could not get name of a loaded class\n"); + continue; + } + +@@ -1697,21 +1661,17 @@ static int print_stack_trace_element( + { + jclass stack_frame_class = (*jni_env)->GetObjectClass(jni_env, stack_frame); + jmethodID get_class_name_method = (*jni_env)->GetMethodID(jni_env, stack_frame_class, "getClassName", "()Ljava/lang/String;"); +- if (get_class_name_method == NULL) ++ if (check_and_clear_exception(jni_env) || get_class_name_method == NULL) + { ++ VERBOSE_PRINT(__FILE__ ":" STRINGIZE(__LINE__)": Could not get methodID of $(Frame class).getClassName()Ljava/lang/String;\n"); + (*jni_env)->DeleteLocalRef(jni_env, stack_frame_class); + return -1; + } + + jstring class_name_of_frame_method = (*jni_env)->CallObjectMethod(jni_env, stack_frame, get_class_name_method); +- if ((*jni_env)->ExceptionOccurred(jni_env)) +- { +- (*jni_env)->DeleteLocalRef(jni_env, stack_frame_class); +- (*jni_env)->ExceptionClear(jni_env); +- return -1; +- } +- if (class_name_of_frame_method == NULL) ++ if (check_and_clear_exception(jni_env) || class_name_of_frame_method == NULL) + { ++ VERBOSE_PRINT(__FILE__ ":" STRINGIZE(__LINE__)": Could not get class name of a class on a frame\n"); + (*jni_env)->DeleteLocalRef(jni_env, stack_frame_class); + return -1; + } +@@ -1721,11 +1681,9 @@ static int print_stack_trace_element( + jclass class_of_frame_method = (*jni_env)->FindClass(jni_env, cls_name_str); + char *class_location = NULL; + +- if ((*jni_env)->ExceptionOccurred(jni_env)) ++ if (check_and_clear_exception(jni_env) || NULL == class_of_frame_method) + { +- VERBOSE_PRINT(__FILE__ ":" STRINGIZE(__LINE__)": FindClass(%s) thrown an exception\n", cls_name_str); +- (*jni_env)->ExceptionClear(jni_env); +- ++ VERBOSE_PRINT(__FILE__ ":" STRINGIZE(__LINE__)": Could not get class of %s. Try more hard by searching in the loaded classes.\n", cls_name_str); + string_replace(cls_name_str, '/', '.'); + class_of_frame_method = find_class_in_loaded_class(jvmti_env, jni_env, cls_name_str); + string_replace(cls_name_str, '.', '/'); +@@ -1753,20 +1711,16 @@ static int print_stack_trace_element( + + jmethodID to_string_method = (*jni_env)->GetMethodID(jni_env, stack_frame_class, "toString", "()Ljava/lang/String;"); + (*jni_env)->DeleteLocalRef(jni_env, stack_frame_class); +- if (to_string_method == NULL) ++ if (check_and_clear_exception(jni_env) || to_string_method == NULL) + { ++ VERBOSE_PRINT(__FILE__ ":" STRINGIZE(__LINE__)": Could not get methodID of $(Frame class).toString()Ljava/lang/String;\n"); + return -1; + } + + jobject orig_str = (*jni_env)->CallObjectMethod(jni_env, stack_frame, to_string_method); +- if ((*jni_env)->ExceptionOccurred(jni_env)) +- { +- (*jni_env)->DeleteLocalRef(jni_env, orig_str); +- (*jni_env)->ExceptionClear(jni_env); +- return -1; +- } +- if (orig_str == NULL) ++ if (check_and_clear_exception(jni_env) || NULL == orig_str) + { ++ VERBOSE_PRINT(__FILE__ ":" STRINGIZE(__LINE__)": Could not get a string representation of a class on a frame\n"); + (*jni_env)->DeleteLocalRef(jni_env, orig_str); + return -1; + } +@@ -1801,21 +1755,17 @@ static int print_exception_stack_trace( + + jclass exception_class = (*jni_env)->GetObjectClass(jni_env, exception); + jmethodID to_string_method = (*jni_env)->GetMethodID(jni_env, exception_class, "toString", "()Ljava/lang/String;"); +- if (to_string_method == NULL) ++ if (check_and_clear_exception(jni_env) || to_string_method == NULL) + { ++ VERBOSE_PRINT(__FILE__ ":" STRINGIZE(__LINE__)": Could not get methodID of $(Exception class).toString()Ljava/lang/String;\n"); + (*jni_env)->DeleteLocalRef(jni_env, exception_class); + return -1; + } + + jobject exception_str = (*jni_env)->CallObjectMethod(jni_env, exception, to_string_method); +- if ((*jni_env)->ExceptionCheck(jni_env)) +- { +- (*jni_env)->DeleteLocalRef(jni_env, exception_class); +- (*jni_env)->ExceptionClear(jni_env); +- return -1; +- } +- if (exception_str == NULL) ++ if (check_and_clear_exception(jni_env) || exception_str == NULL) + { ++ VERBOSE_PRINT(__FILE__ ":" STRINGIZE(__LINE__)": Could not get a string representation of a class on a frame\n"); + (*jni_env)->DeleteLocalRef(jni_env, exception_class); + return -1; + } +@@ -1840,26 +1790,23 @@ static int print_exception_stack_trace( + jmethodID get_stack_trace_method = (*jni_env)->GetMethodID(jni_env, exception_class, "getStackTrace", "()[Ljava/lang/StackTraceElement;"); + (*jni_env)->DeleteLocalRef(jni_env, exception_class); + +- if (get_stack_trace_method == NULL) ++ if (check_and_clear_exception(jni_env) || get_stack_trace_method == NULL) + { +- VERBOSE_PRINT("Cannot get getStackTrace() method id"); ++ VERBOSE_PRINT(__FILE__ ":" STRINGIZE(__LINE__)": Could not get methodID of $(Exception class).getStackTrace()[Ljava/lang/StackTraceElement;\n"); + return wrote; + } + + jobject stack_trace_array = (*jni_env)->CallObjectMethod(jni_env, exception, get_stack_trace_method); +- if ((*jni_env)->ExceptionCheck(jni_env)) +- { +- (*jni_env)->ExceptionClear(jni_env); +- return wrote; +- } +- if (stack_trace_array == NULL) ++ if (check_and_clear_exception(jni_env) || stack_trace_array == NULL) + { ++ VERBOSE_PRINT(__FILE__ ":" STRINGIZE(__LINE__)": Could not get a stack trace from an exception object\n"); + return wrote; + } + + jint array_size = (*jni_env)->GetArrayLength(jni_env, stack_trace_array); + for (jint i = 0; i < array_size; ++i) + { ++ /* Throws only ArrayIndexOutOfBoundsException and this should not happen */ + jobject frame_element = (*jni_env)->GetObjectArrayElement(jni_env, stack_trace_array, i); + + const int frame_wrote = print_stack_trace_element(jvmti_env, +@@ -1918,23 +1865,30 @@ static char *generate_thread_stack_trace( + + wrote += exception_wrote; + ++ /* GetObjectClass() throws nothing */ + jclass exception_class = (*jni_env)->GetObjectClass(jni_env, exception); + if (NULL == exception_class) + { +- VERBOSE_PRINT("Cannot get class of an object\n"); ++ VERBOSE_PRINT(__FILE__ ":" STRINGIZE(__LINE__)": Cannot get class of an object\n"); + return stack_trace_str; + } + + jmethodID get_cause_method = (*jni_env)->GetMethodID(jni_env, exception_class, "getCause", "()Ljava/lang/Throwable;"); + (*jni_env)->DeleteLocalRef(jni_env, exception_class); + +- if (NULL == get_cause_method) ++ if (check_and_clear_exception(jni_env) || NULL == get_cause_method) + { +- VERBOSE_PRINT("Cannot find get an id of getCause()Ljava/lang/Throwable; method\n"); ++ VERBOSE_PRINT(__FILE__ ":" STRINGIZE(__LINE__)": Could not get methodID of $(Exception class).getCause()Ljava/lang/Throwable;\n"); + return stack_trace_str; + } + + jobject cause = (*jni_env)->CallObjectMethod(jni_env, exception, get_cause_method); ++ if (check_and_clear_exception(jni_env)) ++ { ++ VERBOSE_PRINT(__FILE__ ":" STRINGIZE(__LINE__)": Failed to get an inner exception of the top most one;\n"); ++ return stack_trace_str; ++ } ++ + while (NULL != cause) + { + if ((size_t)(MAX_STACK_TRACE_STRING_LENGTH - wrote) < (sizeof(CAUSED_STACK_TRACE_HEADER) - 1)) +@@ -1965,6 +1919,11 @@ static char *generate_thread_stack_trace( + + jobject next_cause = (*jni_env)->CallObjectMethod(jni_env, cause, get_cause_method); + (*jni_env)->DeleteLocalRef(jni_env, cause); ++ if (check_and_clear_exception(jni_env)) ++ { ++ VERBOSE_PRINT(__FILE__ ":" STRINGIZE(__LINE__)": Failed to get an inner exception of another inner one;\n"); ++ return stack_trace_str; ++ } + cause = next_cause; + } + +@@ -2318,14 +2277,14 @@ static void JNICALL callback_on_exception_catch( + } + + jclass object_class = (*jni_env)->FindClass(jni_env, "java/lang/Object"); +- if (NULL == object_class) ++ if (check_and_clear_exception(jni_env) || NULL == object_class) + { + VERBOSE_PRINT("Cannot find java/lang/Object class"); + goto callback_on_exception_catch_exit; + } + + jmethodID equal_method = (*jni_env)->GetMethodID(jni_env, object_class, "equals", "(Ljava/lang/Object;)Z"); +- if (NULL == equal_method) ++ if (check_and_clear_exception(jni_env) || NULL == equal_method) + { + VERBOSE_PRINT("Cannot find java.lang.Object.equals(Ljava/lang/Object;)Z method"); + (*jni_env)->DeleteLocalRef(jni_env, object_class); +@@ -2333,8 +2292,12 @@ static void JNICALL callback_on_exception_catch( + } + + jboolean equal_objects = (*jni_env)->CallBooleanMethod(jni_env, exception_object, equal_method, rpt->exception_object); +- if (!equal_objects) ++ if (check_and_clear_exception(jni_env) || !equal_objects) ++ { ++ VERBOSE_PRINT("Cannot determine whether the caught exception is also the uncaught exception"); ++ (*jni_env)->DeleteLocalRef(jni_env, object_class); + goto callback_on_exception_catch_exit; ++ } + + /* Faster than get()-pop() approach is faster because it is search-and-search-free but + * pop()-push() approach is search-free-and-search-malloc +diff --git a/src/jthrowable_circular_buf.c b/src/jthrowable_circular_buf.c +index e13801c..64f0f30 100644 +--- a/src/jthrowable_circular_buf.c ++++ b/src/jthrowable_circular_buf.c +@@ -162,6 +162,16 @@ static int jthrowable_circular_buf_find_index(T_jthrowableCircularBuf *buffer, j + } + + jclass object_class = (*buffer->jni_env)->FindClass(buffer->jni_env, "java/lang/Object"); ++ if ((*buffer->jni_env)->ExceptionOccurred(buffer->jni_env)) ++ { ++ VERBOSE_PRINT("Cannot find java/lang/Object class\n"); ++#ifdef VERBOSE ++ (*buffer->jni_env)->ExceptionDescribe(buffer->jni_env); ++#endif ++ (*buffer->jni_env)->ExceptionClear(buffer->jni_env); ++ return 1; ++ } ++ + if (NULL == object_class) + { + VERBOSE_PRINT("Cannot find java/lang/Object class"); +@@ -169,6 +179,16 @@ static int jthrowable_circular_buf_find_index(T_jthrowableCircularBuf *buffer, j + } + + jmethodID equal_method = (*buffer->jni_env)->GetMethodID(buffer->jni_env, object_class, "equals", "(Ljava/lang/Object;)Z"); ++ if ((*buffer->jni_env)->ExceptionOccurred(buffer->jni_env)) ++ { ++ VERBOSE_PRINT("Cannot find java.lang.Object.equals(Ljava/lang/Object;)Z method\n"); ++#ifdef VERBOSE ++ (*buffer->jni_env)->ExceptionDescribe(buffer->jni_env); ++#endif ++ (*buffer->jni_env)->ExceptionClear(buffer->jni_env); ++ return 1; ++ } ++ + if (NULL == equal_method) + { + VERBOSE_PRINT("Cannot find java.lang.Object.equals(Ljava/lang/Object;)Z method"); +@@ -182,10 +202,24 @@ static int jthrowable_circular_buf_find_index(T_jthrowableCircularBuf *buffer, j + for (size_t i = rbegin; /* break inside */; i = jthrowable_circular_buf_get_index(buffer, (i - 1))) + { + VERBOSE_PRINT("Checking next exception object %p\n", (void *)buffer->mem[i]); +- if (NULL != buffer->mem[i] && (*buffer->jni_env)->CallBooleanMethod(buffer->jni_env, buffer->mem[i], equal_method, exception)) ++ if (NULL != buffer->mem[i]) + { +- *index = i; +- return 0; ++ jboolean equals = (*buffer->jni_env)->CallBooleanMethod(buffer->jni_env, buffer->mem[i], equal_method, exception); ++ if ((*buffer->jni_env)->ExceptionOccurred(buffer->jni_env)) ++ { ++ VERBOSE_PRINT("Cannot determine whether objects are equal\n"); ++#ifdef VERBOSE ++ (*buffer->jni_env)->ExceptionDescribe(buffer->jni_env); ++#endif ++ (*buffer->jni_env)->ExceptionClear(buffer->jni_env); ++ return 1; ++ } ++ ++ if (equals) ++ { ++ *index = i; ++ return 0; ++ } + } + + if (rend == i) +-- +1.8.3.1 + diff --git a/SOURCES/0027-Do-not-ship-own-reporting-workflow-definitions.patch b/SOURCES/0027-Do-not-ship-own-reporting-workflow-definitions.patch new file mode 100644 index 0000000..5f3e45e --- /dev/null +++ b/SOURCES/0027-Do-not-ship-own-reporting-workflow-definitions.patch @@ -0,0 +1,286 @@ +From c252b9c40ad888aac5e5dc3054f624075e0533d3 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Fri, 17 Jan 2014 11:57:23 +0100 +Subject: [PATCH 27/39] Do not ship own reporting workflow definitions + +Related to rhbz#1054720 +--- + etc/CMakeLists.txt | 10 ++-------- + etc/java_event.conf | 19 +++++++++++++++++++ + etc/java_event_fedora.conf | 19 ------------------- + etc/java_event_fedora.conf.5 | 15 --------------- + etc/java_event_rhel.conf | 2 -- + etc/java_event_rhel.conf.5 | 15 --------------- + etc/report_fedora_java.conf | 3 --- + etc/report_fedora_java.conf.5 | 32 -------------------------------- + etc/report_rhel_java.conf | 3 --- + etc/report_rhel_java.conf.5 | 32 -------------------------------- + etc/workflow_FedoraJava.xml | 11 ----------- + etc/workflow_RHELJava.xml | 9 --------- + 12 files changed, 21 insertions(+), 149 deletions(-) + delete mode 100644 etc/java_event_fedora.conf + delete mode 100644 etc/java_event_fedora.conf.5 + delete mode 100644 etc/java_event_rhel.conf + delete mode 100644 etc/java_event_rhel.conf.5 + delete mode 100644 etc/report_fedora_java.conf + delete mode 100644 etc/report_fedora_java.conf.5 + delete mode 100644 etc/report_rhel_java.conf + delete mode 100644 etc/report_rhel_java.conf.5 + delete mode 100644 etc/workflow_FedoraJava.xml + delete mode 100644 etc/workflow_RHELJava.xml + +diff --git a/etc/CMakeLists.txt b/etc/CMakeLists.txt +index 79e739c..e7b4521 100644 +--- a/etc/CMakeLists.txt ++++ b/etc/CMakeLists.txt +@@ -1,14 +1,8 @@ +-install(FILES java_event.conf java_event_fedora.conf java_event_rhel.conf ++install(FILES java_event.conf + DESTINATION ${SYSCONF_INSTALL_DIR}/libreport/events.d) + +-install(FILES report_fedora_java.conf report_rhel_java.conf +- DESTINATION ${SYSCONF_INSTALL_DIR}/libreport/workflows.d) +- +-install(FILES java_event.conf.5 java_event_rhel.conf.5 report_rhel_java.conf.5 bugzilla_format_java.conf.5 bugzilla_formatdup_java.conf.5 java_event_fedora.conf.5 report_fedora_java.conf.5 ++install(FILES java_event.conf.5 bugzilla_format_java.conf.5 bugzilla_formatdup_java.conf.5 + DESTINATION ${MAN_INSTALL_DIR}/man5) + +-install(FILES workflow_FedoraJava.xml workflow_RHELJava.xml +- DESTINATION ${SHARE_INSTALL_PREFIX}/libreport/workflows) +- + install(FILES bugzilla_format_java.conf bugzilla_formatdup_java.conf + DESTINATION ${SYSCONF_INSTALL_DIR}/libreport/plugins) +diff --git a/etc/java_event.conf b/etc/java_event.conf +index f855a9d..4610f0c 100644 +--- a/etc/java_event.conf ++++ b/etc/java_event.conf +@@ -16,6 +16,25 @@ EVENT=post-create type=Java + echo "Cannot create 'duphas' nor 'uuid' because of missing 'backtrace' file" + fi + ++# Create a bug in Bugzilla ++EVENT=report_Bugzilla type=Java ++ reporter-bugzilla -b \ ++ -c /etc/libreport/plugins/bugzilla.conf \ ++ -F /etc/libreport/plugins/bugzilla_format_java.conf \ ++ -A /etc/libreport/plugins/bugzilla_formatdup_java.conf ++ ++# Send micro report ++EVENT=report_uReport type=Java ++ /usr/libexec/abrt-action-ureport ++ ++# update ABRT database after successful report to bugzilla ++EVENT=post_report type=Java ++ reporter-ureport -A -B ++ exit 0 ++ + # Reporting of java exceptions + EVENT=report-gui type=Java + report-gtk -- "$DUMP_DIR" ++ ++EVENT=report-cli type=Java ++ report-cli -- "$DUMP_DIR" +diff --git a/etc/java_event_fedora.conf b/etc/java_event_fedora.conf +deleted file mode 100644 +index 25fcd16..0000000 +--- a/etc/java_event_fedora.conf ++++ /dev/null +@@ -1,19 +0,0 @@ +-EVENT=report_Bugzilla type=Java +- reporter-bugzilla -b \ +- -c /etc/libreport/plugins/bugzilla.conf \ +- -F /etc/libreport/plugins/bugzilla_format_java.conf \ +- -A /etc/libreport/plugins/bugzilla_formatdup_java.conf +- +-# Send micro report +-EVENT=report_uReport type=Java +- # disabled until abrt switches to satyr +- # /usr/libexec/abrt-action-ureport +- +-# update ABRT database after successful report to bugzilla +-EVENT=post_report type=Java +- # disabled until abrt switches to satyr +- # reporter-ureport -r +- # exit 0 +- +-EVENT=report-cli type=Java +- report-cli -e report_uReport -e report_Bugzilla -e post_report -- "$DUMP_DIR" +diff --git a/etc/java_event_fedora.conf.5 b/etc/java_event_fedora.conf.5 +deleted file mode 100644 +index 3f6fe7e..0000000 +--- a/etc/java_event_fedora.conf.5 ++++ /dev/null +@@ -1,15 +0,0 @@ +-.\" Process this file with +-.\" groff -man -Tascii java_event_fedora.conf.5 +-.\" +-.TH java_event_fedora.conf 5 "JULY 2013" abrt-java-connector "User Manuals" +-.SH NAME +-java_event_fedora.conf \- configuration file for libreport\&. +-.SH DESCRIPTION +-.sp +-This configuration file provides definitions of events for Java exception problems\&. +-.sp +-By default the file contains definition for \fIreport-cli\fR, \fIpost-report\fR, \fIreport_uReport\fR and \fIreport_Bugzilla\fR events\&. +-.SH AUTHOR +-Jakub Filak +-.SH "SEE ALSO" +-.BR report_event.conf (5) +diff --git a/etc/java_event_rhel.conf b/etc/java_event_rhel.conf +deleted file mode 100644 +index c1fc6d5..0000000 +--- a/etc/java_event_rhel.conf ++++ /dev/null +@@ -1,2 +0,0 @@ +-EVENT=report-cli type=Java +- report-cli -e report_RHTSupport -- "$DUMP_DIR" +diff --git a/etc/java_event_rhel.conf.5 b/etc/java_event_rhel.conf.5 +deleted file mode 100644 +index b376a8a..0000000 +--- a/etc/java_event_rhel.conf.5 ++++ /dev/null +@@ -1,15 +0,0 @@ +-.\" Process this file with +-.\" groff -man -Tascii java_event_rhel.conf.5 +-.\" +-.TH java_event_rhel.conf 5 "JULY 2013" abrt-java-connector "User Manuals" +-.SH NAME +-java_event_rhel.conf \- configuration file for libreport\&. +-.SH DESCRIPTION +-.sp +-This configuration file provides definitions of events for Java exception problems\&. +-.sp +-By default the file contains definition for \fIreport-cli\fR event. +-.SH AUTHOR +-Jakub Filak +-.SH "SEE ALSO" +-.BR report_event.conf (5) +diff --git a/etc/report_fedora_java.conf b/etc/report_fedora_java.conf +deleted file mode 100644 +index 792d3cc..0000000 +--- a/etc/report_fedora_java.conf ++++ /dev/null +@@ -1,3 +0,0 @@ +-EVENT=workflow_FedoraJava analyzer=Java +-# this is just a meta event which consists of other events +-# the list is defined in the xml file +diff --git a/etc/report_fedora_java.conf.5 b/etc/report_fedora_java.conf.5 +deleted file mode 100644 +index f2e247d..0000000 +--- a/etc/report_fedora_java.conf.5 ++++ /dev/null +@@ -1,32 +0,0 @@ +-.\" Process this file with +-.\" groff -man -Tascii report_java_fedora.conf.5 +-.\" +-.TH report_java_fedora.conf 5 "JULY 2013" "abrt-java-connector" "User Manuals" +-.SH NAME +-report_java_fedora.conf \- configuration file for libreport\&. +-.SH "DESCRIPTION" +-.sp +-This configuration file specifies which of the reporting work flow definitions are applicable for Java problems types on Fedora\&. +-.sp +-All applicable reporting work flows are presented to users in User Interface as possibilities for processing of a particular problem\&. +-.sp +-This configuration file consists from one condition per line\&. +-.sp +-Each condition line must start with EVENT=workflow_NAME where "workflow_" is constant prefix and "workflow_NAME" is base name of path to reporting work flow configuration file\&. +-.sp +-The rest of condition line has form VAR=VAL, VAR!=VAL or VAL~=REGEX, where VAR is a name of problem directory element to be checked (for example, "executable", "package", hostname" etc)\&. The condition may consists from as many element checks as it is necessary\&. +-.SH "EXAMPLES" +-.PP +-Condition line +-.RS 4 +-EVENT=workflow_FedoraJava analyzer=Java +-.RE +-.sp +-The condition line above expects existence of /usr/share/libreport/workflows/workflow_FedoraJava\&.xml +-.SH "SEE ALSO" +-.sp +-report\-gtk(1) +-.SH AUTHOR +-Jakub Filak +-.SH "SEE ALSO" +-.BR report_event.conf (5) +diff --git a/etc/report_rhel_java.conf b/etc/report_rhel_java.conf +deleted file mode 100644 +index 214522a..0000000 +--- a/etc/report_rhel_java.conf ++++ /dev/null +@@ -1,3 +0,0 @@ +-EVENT=workflow_RHELJava analyzer=Java +-# this is just a meta event which consists of other events +-# the list is defined in the xml file +diff --git a/etc/report_rhel_java.conf.5 b/etc/report_rhel_java.conf.5 +deleted file mode 100644 +index 3704b39..0000000 +--- a/etc/report_rhel_java.conf.5 ++++ /dev/null +@@ -1,32 +0,0 @@ +-.\" Process this file with +-.\" groff -man -Tascii report_java_rhel.conf.5 +-.\" +-.TH REPORT_JAVA_RHEL.CONF 5 "JULY 2013" "abrt-java-connector" "User Manuals" +-.SH NAME +-report_java_rhel.conf \- configuration file for libreport\&. +-.SH "DESCRIPTION" +-.sp +-This configuration file specifies which of the reporting work flow definitions are applicable for Java problems types on Red Hat Enterprise Linux\&. +-.sp +-All applicable reporting work flows are presented to users in User Interface as possibilities for processing of a particular problem\&. +-.sp +-This configuration file consists from one condition per line\&. +-.sp +-Each condition line must start with EVENT=workflow_NAME where "workflow_" is constant prefix and "workflow_NAME" is base name of path to reporting work flow configuration file\&. +-.sp +-The rest of condition line has form VAR=VAL, VAR!=VAL or VAL~=REGEX, where VAR is a name of problem directory element to be checked (for example, "executable", "package", hostname" etc)\&. The condition may consists from as many element checks as it is necessary\&. +-.SH "EXAMPLES" +-.PP +-Condition line +-.RS 4 +-EVENT=workflow_RHELJava analyzer=Java +-.RE +-.sp +-The condition line above expects existence of /usr/share/libreport/workflows/workflow_RHELJava\&.xml +-.SH "SEE ALSO" +-.sp +-report\-gtk(1) +-.SH AUTHOR +-Jakub Filak +-.SH "SEE ALSO" +-.BR report_event.conf (5) +diff --git a/etc/workflow_FedoraJava.xml b/etc/workflow_FedoraJava.xml +deleted file mode 100644 +index 4520042..0000000 +--- a/etc/workflow_FedoraJava.xml ++++ /dev/null +@@ -1,11 +0,0 @@ +- +- +- Report to Fedora +- Process the Java excption using the Fedora infrastructure +- +- +- report_uReport +- report_Bugzilla +- post-report +- +- +diff --git a/etc/workflow_RHELJava.xml b/etc/workflow_RHELJava.xml +deleted file mode 100644 +index e1f5b8a..0000000 +--- a/etc/workflow_RHELJava.xml ++++ /dev/null +@@ -1,9 +0,0 @@ +- +- +- Report to Red Hat +- Process the Java exception using the Red Hat infrastructure +- +- +- report_RHTSupport +- +- +-- +1.8.3.1 + diff --git a/SOURCES/0029-Speed-up-ExceptionCatch-event-callback.patch b/SOURCES/0029-Speed-up-ExceptionCatch-event-callback.patch new file mode 100644 index 0000000..6d737ce --- /dev/null +++ b/SOURCES/0029-Speed-up-ExceptionCatch-event-callback.patch @@ -0,0 +1,115 @@ +From 2ccddc0329fb7103663f5d4c2347a3f8957ebe4b Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Fri, 17 Jan 2014 20:09:05 +0100 +Subject: [PATCH 29/39] Speed up ExceptionCatch event callback + +Return from the callback immediately when there is no uncaught exception +to be checked. I suppose that the majority of ExceptionCatch events +occur in normal state of execution. The current solution needs to get +TID of the current thread just to find out that the uncaught exceptions +map is empty. This is not necessary because the map can provide such +information by counting the stored items. If the size of the map is +zero, we can safely return from the exception callback without other +processing. + +Related to rhbz#1051198 +--- + src/abrt-checker.c | 13 ++++++++----- + src/jthread_map.c | 7 +++++++ + src/jthread_map.h | 10 ++++++++++ + 3 files changed, 25 insertions(+), 5 deletions(-) + +diff --git a/src/abrt-checker.c b/src/abrt-checker.c +index b6f11e8..1f91cb7 100644 +--- a/src/abrt-checker.c ++++ b/src/abrt-checker.c +@@ -2251,11 +2251,8 @@ static void JNICALL callback_on_exception_catch( + jlocation location __UNUSED_VAR, + jobject exception_object) + { +- jvmtiError error_code; +- +- char *method_name_ptr = NULL; +- char *method_signature_ptr = NULL; +- char *class_signature_ptr = NULL; ++ if (jthread_map_empty(uncaughtExceptionMap)) ++ return; + + /* all operations should be processed in critical section */ + enter_critical_section(jvmti_env, shared_lock); +@@ -2325,6 +2322,12 @@ static void JNICALL callback_on_exception_catch( + + if (NULL == threads_exc_buf || NULL == jthrowable_circular_buf_find(threads_exc_buf, rpt->exception_object)) + { ++ char *method_name_ptr = NULL; ++ char *method_signature_ptr = NULL; ++ char *class_signature_ptr = NULL; ++ ++ jvmtiError error_code; ++ + /* retrieve all required informations */ + error_code = (*jvmti_env)->GetMethodName(jvmti_env, method, &method_name_ptr, &method_signature_ptr, NULL); + if (check_jvmti_error(jvmti_env, error_code, __FILE__ ":" STRINGIZE(__LINE__))) +diff --git a/src/jthread_map.c b/src/jthread_map.c +index cd5ca52..e9d60e9 100644 +--- a/src/jthread_map.c ++++ b/src/jthread_map.c +@@ -44,6 +44,7 @@ typedef struct jthread_map_item { + struct jthread_map { + T_jthreadMapItem *items[MAP_SIZE]; ///< map elements + pthread_mutex_t mutex; ++ size_t size; + }; + + +@@ -75,6 +76,10 @@ void jthread_map_free(T_jthreadMap *map) + } + + ++int jthread_map_empty(T_jthreadMap *map) ++{ ++ return 0 == map->size; ++} + + static T_jthreadMapItem *jthrowable_map_item_new(long tid, void *item) + { +@@ -110,6 +115,7 @@ void jthread_map_push(T_jthreadMap *map, jlong tid, void *item) + assert(NULL != map); + + pthread_mutex_lock(&map->mutex); ++ ++map->size; + + const long index = tid % MAP_SIZE; + T_jthreadMapItem *last = NULL; +@@ -168,6 +174,7 @@ void *jthread_map_pop(T_jthreadMap *map, jlong tid) + assert(NULL != map); + + pthread_mutex_lock(&map->mutex); ++ --map->size; + + const size_t index = tid % MAP_SIZE; + void *data = NULL; +diff --git a/src/jthread_map.h b/src/jthread_map.h +index 52d2832..4284a1b 100644 +--- a/src/jthread_map.h ++++ b/src/jthread_map.h +@@ -50,6 +50,16 @@ void jthread_map_free(T_jthreadMap *map); + + + /* ++ * Checks whether the map is empty ++ * ++ * @param mam Pointer to @jthread_map ++ * @returns true if the map is empty, false otherwise ++ */ ++int jthread_map_empty(T_jthreadMap *map); ++ ++ ++ ++/* + * Adds a new map item identified by @tid with value @item + * + * Does nothing if item with same @tid already exists in @map +-- +1.8.3.1 + diff --git a/SOURCES/0030-Add-an-utility-for-stack-trace-analysis.patch b/SOURCES/0030-Add-an-utility-for-stack-trace-analysis.patch new file mode 100644 index 0000000..d2abac8 --- /dev/null +++ b/SOURCES/0030-Add-an-utility-for-stack-trace-analysis.patch @@ -0,0 +1,493 @@ +From d2578295a953ced07371eedc885c032951b11297 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Mon, 13 Jan 2014 16:38:17 +0100 +Subject: [PATCH 30/39] Add an utility for stack trace analysis + +The tool is supposed to find all remote class paths and create a file +named "not-reportale" containing a short explanation why the examined +stack trace is not reportable via ABRT. + +The tool is designed for usage in post-create event. + +Related to #29 +Related to rhbz#1054737 +--- + CMakeLists.txt | 19 ++- + po/CMakeLists.txt | 64 ++++++++++ + po/LINGUAS | 0 + po/POTFILES.in | 1 + + src/CMakeLists.txt | 7 +- + utils/CMakeLists.txt | 34 ++++++ + utils/abrt-action-analyze-java.c | 258 +++++++++++++++++++++++++++++++++++++++ + utils/config.h.in | 2 + + 8 files changed, 379 insertions(+), 6 deletions(-) + create mode 100644 po/CMakeLists.txt + create mode 100644 po/LINGUAS + create mode 100644 po/POTFILES.in + create mode 100644 utils/CMakeLists.txt + create mode 100644 utils/abrt-action-analyze-java.c + create mode 100644 utils/config.h.in + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1504461..33a5e03 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -39,6 +39,10 @@ endif() + + set(ARCHIVE_NAME ${CMAKE_PROJECT_NAME}-${PROJECT_VERSION}) + ++if(NOT BIN_INSTALL_DIR) ++ set(BIN_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/bin) ++endif() ++ + if(NOT LIB_INSTALL_DIR) + set(LIB_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib) + endif() +@@ -55,10 +59,23 @@ if(NOT MAN_INSTALL_DIR) + set(MAN_INSTALL_DIR ${SHARE_INSTALL_PREFIX}/man) + endif() + ++if(NOT LOCALE_INSTALL_DIR) ++ set(LOCALE_INSTALL_DIR ${SHARE_INSTALL_PREFIX}/locale) ++endif() ++ ++ + add_custom_target( + dist + COMMAND git archive --prefix=${CMAKE_PROJECT_NAME}-${git_commit}/ HEAD | gzip > ${CMAKE_BINARY_DIR}/${ARCHIVE_NAME}.tar.gz + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + ) + +-subdirs(src etc test) ++include(FindPkgConfig) ++pkg_check_modules(PC_SATYR REQUIRED satyr) ++pkg_check_modules(PC_LIBREPORT REQUIRED libreport) ++pkg_check_modules(PC_ABRT REQUIRED abrt) ++ ++add_definitions(-D_GNU_SOURCE) ++set(AJC_ENABLE_NLS true) ++ ++subdirs(src etc test utils po) +diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt +new file mode 100644 +index 0000000..7c49772 +--- /dev/null ++++ b/po/CMakeLists.txt +@@ -0,0 +1,64 @@ ++project(po) ++ ++if (AJC_ENABLE_NLS) ++ find_program(INTLTOOL_UPDATE_CMD intltool-update) ++ mark_as_advanced(INTLTOOL_UPDATE_CMD) ++ ++ find_program(XGETTEXT_CMD xgettext) ++ mark_as_advanced(XGETTEXT_CMD) ++ ++ find_program(MSGMERGE_CMD msgmerge) ++ mark_as_advanced(MSGMERGE_CMD) ++ ++ find_program(MSGFMT_CMD msgfmt) ++ mark_as_advanced(MSGFMT_CMD) ++ ++ find_program(MSGFMT_CMD cat) ++ mark_as_advanced(CAT_CMD) ++ ++ file(STRINGS ${po_SOURCE_DIR}/LINGUAS AJC_LINGUAS) ++ set(AJC_LINGUAS_TARGETS) ++ set(AJC_POTFILE ${CMAKE_PROJECT_NAME}.pot) ++ set(AJC_POTFILE_OUTPUT ${po_BINARY_DIR}/${AJC_POTFILE}) ++ ++ add_custom_target(nls-update-sources ++ ${INTLTOOL_UPDATE_CMD} -m ++ WORKING_DIRECTORY ${po_SOURCE_DIR}) ++ ++ add_custom_command(OUTPUT ${AJC_POTFILE_OUTPUT} ++ COMMAND ${XGETTEXT_CMD} --files-from ${po_SOURCE_DIR}/POTFILES.in --keyword=_ -o ${AJC_POTFILE_OUTPUT} --copyright-holder="ABRT Team" --msgid-bugs-address="crash-catcher at lists.fedorahosted.org" --no-wrap --no-location ++ DEPENDS POTFILES.in ++ WORKING_DIRECTORY ${abrt-java-connector_SOURCE_DIR} ++ COMMENT "Extract translatable messages to ${AJC_POTFILE}" ++ ) ++ ++ foreach(language ${AJC_LINGUAS}) ++ set(language_SOURCE ${po_SOURCE_DIR}/${language}.po) ++ set(language_OUTPUT ${po_BINARY_DIR}/${language}/LC_MESSAGES/${CMAKE_PROJECT_NAME}.mo) ++ ++ add_custom_target(nls-update-${language}.po ++ ${MSGMERGE_CMD} ${language} ${AJC_POTFILE_OUTPUT} -o ${language_SOURCE} --no-wrap ++ DEPENDS ${language_SOURCE} ${AJC_POTFILE_OUTPUT} ++ WORKING_DIRECTORY ${po_SOURCE_DIR} ++ ) ++ ++ file(MAKE_DIRECTORY "${po_BINARY_DIR}/${language}/LC_MESSAGES") ++ ++ add_custom_command(OUTPUT ${language_OUTPUT} ++ COMMAND ${MSGFMT_CMD} -c -o ${language_OUTPUT} ${language_SOURCE} ++ DEPENDS ${language_SOURCE} ++ ) ++ ++ install(FILES ${language_OUTPUT} ++ DESTINATION share/${CMAKE_PROJECT_NAME}/locale/${language}/LC_MESSAGES ++ ) ++ ++ set(AJC_LINGUAS_TARGETS ${AJC_CATALOG_TARGETS} ${language_OUTPUT}) ++ endforeach(language) ++ ++ add_custom_target(nls ALL ++ DEPENDS ${AJC_POTFILE_OUTPUT} ${AJC_LINGUAS_TARGETS} ++ ) ++else(AJC_ENABLE_NLS) ++ message("Native Language Support is disabled") ++endif (AJC_ENABLE_NLS) +diff --git a/po/LINGUAS b/po/LINGUAS +new file mode 100644 +index 0000000..e69de29 +diff --git a/po/POTFILES.in b/po/POTFILES.in +new file mode 100644 +index 0000000..21aec67 +--- /dev/null ++++ b/po/POTFILES.in +@@ -0,0 +1 @@ ++utils/abrt-action-analyze-java.c +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index a00fe77..d084401 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -1,13 +1,10 @@ + find_package(JNI REQUIRED) + include_directories(${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2}) + +-include(FindPkgConfig) +-pkg_check_modules(PC_ABRT REQUIRED libreport) + pkg_check_modules(PC_JOURNALD REQUIRED libsystemd-journal) +-include_directories(${PC_ABRT_INCLUDE_DIRS}) ++include_directories(${PC_LIBREPORT_INCLUDE_DIRS}) + include_directories(${PC_JOURNALD_INCLUDE_DIRS}) + +-add_definitions(-D_GNU_SOURCE) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -std=c99 -pedantic") + set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -DVERBOSE") + set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DSILENT") +@@ -20,7 +17,7 @@ set_target_properties( + PROPERTIES + OUTPUT_NAME abrt-java-connector) + +-target_link_libraries(AbrtChecker ${PC_ABRT_LIBRARIES}) ++target_link_libraries(AbrtChecker ${PC_LIBREPORT_LIBRARIES}) + target_link_libraries(AbrtChecker ${PC_JOURNALD_LIBRARIES}) + + install(TARGETS AbrtChecker DESTINATION ${LIB_INSTALL_DIR}) +diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt +new file mode 100644 +index 0000000..c358968 +--- /dev/null ++++ b/utils/CMakeLists.txt +@@ -0,0 +1,34 @@ ++project(utils) ++ ++set(AbrtActionAnalyzeJava_SRCS abrt-action-analyze-java.c) ++ ++include(CheckIncludeFiles) ++ ++if (AJC_ENABLE_NLS) ++ check_include_files(locale.h HAVE_LOCALE_H) ++ if (HAVE_LOCALE_H) ++ set (ENABLE_NLS true) ++ endif (HAVE_LOCALE_H) ++endif (AJC_ENABLE_NLS) ++ ++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) ++ ++include_directories(${PC_SATYR_INCLUDE_DIRS}) ++include_directories(${PC_LIBREPORT_INCLUDE_DIRS}) ++include_directories(${PC_ABRT_INCLUDE_DIRS}) ++ ++add_definitions(-DHAVE_CONFIG_H) ++add_definitions(-DPACKAGE=\"${CMAKE_PROJECT_NAME}\") ++add_definitions(-DLOCALEDIR=\"${LOCALE_INSTALL_DIR}\") ++include_directories(${utils_BINARY_DIR}) ++ ++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -std=gnu99 -pedantic") ++set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -DVERBOSE") ++set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DSILENT") ++ ++add_executable(abrt-action-analyze-java ${AbrtActionAnalyzeJava_SRCS}) ++target_link_libraries(abrt-action-analyze-java ${PC_SATYR_LIBRARIES}) ++target_link_libraries(abrt-action-analyze-java ${PC_LIBREPORT_LIBRARIES}) ++target_link_libraries(abrt-action-analyze-java ${PC_ABRT_LIBRARIES}) ++ ++install(TARGETS abrt-action-analyze-java DESTINATION ${BIN_INSTALL_DIR}) +diff --git a/utils/abrt-action-analyze-java.c b/utils/abrt-action-analyze-java.c +new file mode 100644 +index 0000000..a4728b6 +--- /dev/null ++++ b/utils/abrt-action-analyze-java.c +@@ -0,0 +1,258 @@ ++/* ++ Copyright (C) 2014 Red Hat, Inc. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 2 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License along ++ with this program; if not, write to the Free Software Foundation, Inc., ++ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ++*/ ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++static char * ++backtrace_from_dump_dir(const char *dir_name) ++{ ++ struct dump_dir *dd = dd_opendir(dir_name, DD_OPEN_READONLY); ++ if (NULL == dd) ++ { ++ return NULL; ++ } ++ ++ /* Read backtrace */ ++ /* Prints an error message if the file cannot be loaded */ ++ char *backtrace_str = dd_load_text_ext(dd, FILENAME_BACKTRACE, ++ DD_LOAD_TEXT_RETURN_NULL_ON_FAILURE); ++ ++ dd_close(dd); ++ ++ return backtrace_str; ++} ++ ++static void ++write_not_reportable_message_to_dump_dir(const char *dir_name, const char *message) ++{ ++ struct dump_dir *dd = dd_opendir(dir_name, /*Open for writing*/0); ++ if (NULL != dd) ++ { ++ dd_save_text(dd, FILENAME_NOT_REPORTABLE, message); ++ dd_close(dd); ++ } ++} ++ ++static void ++write_not_reportable_message_to_fd(int fdout, const char *message) ++{ ++ full_write(fdout, message, strlen(message)); ++ full_write(fdout, "\n", 1); ++} ++ ++static void ++write_not_reportable_message_to_file(const char *file_name, const char *message) ++{ ++ int fdout = open(file_name, ++ O_WRONLY | O_TRUNC | O_CREAT | O_NOFOLLOW, ++ S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP ); ++ ++ if (0 > fdout) ++ { ++ perror_msg("Can't open file '%s' for writing", file_name); ++ return; ++ } ++ write_not_reportable_message_to_fd(fdout, message); ++ close(fdout); ++} ++ ++static char * ++backtrace_from_fd(int fdin) ++{ ++ return xmalloc_read(fdin, /*no size limit*/NULL); ++} ++ ++static char * ++backtrace_from_file(const char *file_name) ++{ ++ return xmalloc_xopen_read_close(file_name, /*no size limit*/NULL); ++} ++ ++typedef void (*frame_cb)(struct sr_java_frame *frame, void *args); ++ ++typedef struct { ++ frame_cb callback; ++ void *args; ++} frame_proc_t; ++ ++static void ++iterate_trough_stacktrace(struct sr_java_stacktrace *stacktrace, frame_proc_t **fproc) ++{ ++ struct sr_java_thread *thread = stacktrace->threads; ++ while (NULL != thread) ++ { ++ struct sr_java_frame *frame = thread->frames; ++ while (NULL != frame) ++ { ++ frame_proc_t **it = fproc; ++ while (NULL != *it) ++ { ++ (*it)->callback(frame, (*it)->args); ++ ++it; ++ } ++ frame = frame->next; ++ } ++ thread = thread->next; ++ } ++} ++ ++static void ++work_out_list_of_remote_urls(struct sr_java_frame *frame, struct strbuf *remote_files_csv) ++{ ++ if (NULL != frame->class_path && prefixcmp(frame->class_path, "file://") != 0) ++ { ++ struct stat buf; ++ if (stat(frame->class_path, &buf) && errno == ENOENT) ++ { ++ if (strstr(remote_files_csv->buf, frame->class_path) == NULL) ++ { ++ strbuf_append_strf(remote_files_csv, "%s%s", ++ remote_files_csv->buf[0] != '\0' ? ", " : "", ++ frame->class_path); ++ } ++ } ++ } ++} ++ ++int main(int argc, char *argv[]) ++{ ++#if ENABLE_NLS ++ /* I18n */ ++ setlocale(LC_ALL, ""); ++ bindtextdomain(PACKAGE, LOCALEDIR); ++ textdomain(PACKAGE); ++#endif ++ ++ abrt_init(argv); ++ ++ const char *dump_dir_name = NULL; ++ const char *backtrace_file = NULL; ++ ++ /* Can't keep these strings/structs static: _() doesn't support that */ ++ const char *program_usage_string = _( ++ "& [[-d DIR] | [-f FILE]] [-o]\n" ++ "\n" ++ "Analyzes Java backtrace\n" ++ ); ++ enum { ++ OPT_v = 1 << 0, ++ OPT_d = 1 << 1, ++ OPT_f = 1 << 2, ++ OPT_o = 1 << 3, ++ }; ++ /* Keep enum above and order of options below in sync! */ ++ struct options program_options[] = { ++ OPT__VERBOSE(&g_verbose), ++ OPT_STRING('d', "dumpdir", &dump_dir_name, "DIR", _("Problem directory")), ++ OPT_STRING('f', "backtrace", &backtrace_file, "FILE", _("Path to backtrace")), ++ OPT_BOOL('o', "stdout", NULL, _("Print results on standard output")), ++ { 0 } ++ }; ++ program_options[ARRAY_SIZE(program_options) - 1].type = OPTION_END; ++ ++ unsigned opts = parse_opts(argc, argv, program_options, program_usage_string); ++ ++ export_abrt_envvars(0); ++ ++ if (NULL != dump_dir_name && NULL != backtrace_file) ++ error_msg_and_die("You need to pass either DIR or FILE"); ++ ++ int retval = 1; ++ char *backtrace_str = NULL; ++ if (NULL != dump_dir_name) ++ { ++ backtrace_str = backtrace_from_dump_dir(dump_dir_name); ++ } ++ else if (NULL != backtrace_file) ++ { ++ backtrace_str = backtrace_from_file(backtrace_file); ++ } ++ else ++ { ++ backtrace_str = backtrace_from_fd(STDIN_FILENO); ++ } ++ ++ if (NULL == backtrace_str) ++ goto finish; ++ ++ struct sr_location location; ++ sr_location_init(&location); ++ const char *backtrace_str_ptr = backtrace_str; ++ struct sr_java_stacktrace *stacktrace = sr_java_stacktrace_parse(&backtrace_str_ptr, &location); ++ free(backtrace_str); ++ ++ if (NULL == stacktrace) ++ { ++ error_msg("Could not parse the stack trace"); ++ goto finish; ++ } ++ ++ struct strbuf *remote_files_csv = strbuf_new(); ++ frame_proc_t remote_files_proc = { ++ .callback = (frame_cb)&work_out_list_of_remote_urls, ++ .args = (void *)remote_files_csv ++ }; ++ ++ frame_proc_t *fproc[] = { ++ &remote_files_proc, ++ //duphash_proc, ++ //backtrace_usability, ++ NULL, ++ }; ++ ++ iterate_trough_stacktrace(stacktrace, fproc); ++ ++ sr_java_stacktrace_free(stacktrace); ++ ++ if ('\0' != remote_files_csv->buf[0]) ++ { ++ char *not_reportable_message = xasprintf( ++ _("This problem can be caused by a 3rd party code from the "\ ++ "jar/class at %s. In order to provide valuable problem " \ ++ "reports, ABRT will not allow you to submit this problem. If you " \ ++ "still want to participate in solving this problem, please contact " \ ++ "the developers directly."), remote_files_csv->buf); ++ ++ if (opts & OPT_o) ++ { ++ write_not_reportable_message_to_fd(STDOUT_FILENO, not_reportable_message); ++ } ++ else if (NULL != dump_dir_name) ++ { ++ write_not_reportable_message_to_dump_dir(dump_dir_name, not_reportable_message); ++ } ++ else ++ { /* Just write it to the current working directory */ ++ write_not_reportable_message_to_file(FILENAME_NOT_REPORTABLE, not_reportable_message); ++ } ++ ++ free(not_reportable_message); ++ } ++ ++ strbuf_free(remote_files_csv); ++ retval = 0; ++finish: ++ ++ return retval; ++} +diff --git a/utils/config.h.in b/utils/config.h.in +new file mode 100644 +index 0000000..6a26446 +--- /dev/null ++++ b/utils/config.h.in +@@ -0,0 +1,2 @@ ++#cmakedefine ENABLE_NLS 1 ++#cmakedefine HAVE_LOCALE_H 1 +-- +1.8.3.1 + diff --git a/SOURCES/0031-Hook-the-stack-trace-analysis-tool-in-post-create.patch b/SOURCES/0031-Hook-the-stack-trace-analysis-tool-in-post-create.patch new file mode 100644 index 0000000..917f1fc --- /dev/null +++ b/SOURCES/0031-Hook-the-stack-trace-analysis-tool-in-post-create.patch @@ -0,0 +1,30 @@ +From 893b81cef9e397a068dbeea5841ca8e8cd6b2fb4 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Thu, 16 Jan 2014 21:01:28 +0100 +Subject: [PATCH 31/39] Hook the stack trace analysis tool in post-create + +Related to #29 +Related to rhbz#1054737 +--- + etc/java_event.conf | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/etc/java_event.conf b/etc/java_event.conf +index 4610f0c..302cac0 100644 +--- a/etc/java_event.conf ++++ b/etc/java_event.conf +@@ -13,8 +13,10 @@ EVENT=post-create type=Java + printf '%s' "`sha1sum < "backtrace" | cut -d" " -f1`" > "uuid" + cp uuid duphash + else +- echo "Cannot create 'duphas' nor 'uuid' because of missing 'backtrace' file" ++ echo "Cannot create neither 'duphas' nor 'uuid' because of missing 'backtrace' file" ++ exit 1 + fi ++ abrt-action-analyze-java -d $DUMP_DIR || exit 1 + + # Create a bug in Bugzilla + EVENT=report_Bugzilla type=Java +-- +1.8.3.1 + diff --git a/SOURCES/0033-Add-test-for-analysis-tool.patch b/SOURCES/0033-Add-test-for-analysis-tool.patch new file mode 100644 index 0000000..333ce1e --- /dev/null +++ b/SOURCES/0033-Add-test-for-analysis-tool.patch @@ -0,0 +1,115 @@ +From c11acce7e2786ab8105c02318592713e51e7991c Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Sat, 18 Jan 2014 00:06:47 +0100 +Subject: [PATCH 33/39] Add test for analysis tool + +Related to #29 +Related to rhbz#1054737 +--- + test/CMakeLists.txt | 8 ++++++++ + test/analysis_testdriver | 19 +++++++++++++++++++ + .../backtrace_not_reportable_1remote_class.log.in | 5 +++++ + .../backtrace_not_reportable_3remote_classes.log.in | 5 +++++ + test/outputs/not_reportable_1remote_class.log.in | 1 + + test/outputs/not_reportable_3remote_classes.log.in | 1 + + 6 files changed, 39 insertions(+) + create mode 100644 test/analysis_testdriver + create mode 100644 test/outputs/backtrace_not_reportable_1remote_class.log.in + create mode 100644 test/outputs/backtrace_not_reportable_3remote_classes.log.in + create mode 100644 test/outputs/not_reportable_1remote_class.log.in + create mode 100644 test/outputs/not_reportable_3remote_classes.log.in + +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index 1a851e6..0439294 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -1,3 +1,5 @@ ++project(test) ++ + set(HTTP_DIR "/var/www/html") + set(SERVER_URL "http://localhost") + +@@ -114,6 +116,10 @@ function(_add_test target_name expected_exit_code) + add_test(test_${target_name} /bin/sh ${CMAKE_CURRENT_SOURCE_DIR}/testdriver ${target_name} ${expected_exit_code} ${CMAKE_CURRENT_BINARY_DIR}/outputs/${target_name}.log ${CMAKE_CURRENT_BINARY_DIR}/${target_name}.log ${ARGN}) + endfunction() + ++function(_add_analyze_test target_name) ++ add_test(test_${target_name} /bin/sh ${CMAKE_CURRENT_SOURCE_DIR}/analysis_testdriver ${CMAKE_BINARY_DIR}/utils ${test_BINARY_DIR}/outputs/backtrace_${target_name}.log ${test_BINARY_DIR}/${target_name}.log ${test_BINARY_DIR}/outputs/${target_name}.log) ++endfunction() ++ + _add_test_target( + run + SimpleTest +@@ -308,6 +314,8 @@ _add_test_target( + ) + _add_test(run_remote_thread 0) + ++_add_analyze_test(not_reportable_1remote_class) ++_add_analyze_test(not_reportable_3remote_classes) + + get_directory_property(all_run_targets ALL_RUN_TARGETS) + add_custom_target(run_all DEPENDS ${all_run_targets}) +diff --git a/test/analysis_testdriver b/test/analysis_testdriver +new file mode 100644 +index 0000000..3888b6c +--- /dev/null ++++ b/test/analysis_testdriver +@@ -0,0 +1,19 @@ ++#!/bin/sh ++# Help: ++# $1 - path to analysis tool ++# $2 - path to input file ++# $3 - path to output log file ++# $4 - path to expected output log file ++# ++ ++$1/abrt-action-analyze-java -f $2 -o > $3 || exit 1 ++ ++diff -u $4 $3 ++EC=$? ++ ++if [ 0 -ne $EC ]; then ++ echo "Expected $4 differs from result $3" ++ exit 1 ++fi ++ ++exit 0 +diff --git a/test/outputs/backtrace_not_reportable_1remote_class.log.in b/test/outputs/backtrace_not_reportable_1remote_class.log.in +new file mode 100644 +index 0000000..5555da5 +--- /dev/null ++++ b/test/outputs/backtrace_not_reportable_1remote_class.log.in +@@ -0,0 +1,5 @@ ++Exception in thread "Thread-3" java.lang.ArrayIndexOutOfBoundsException: 42 ++>---at SimpleTest.throwIndexOutOfBoundsException(SimpleTest.java:24) [jar:http://localhost:54321/JarTest.jar!/SimpleTest.class] ++>---at SimpleTest.catchIndexOutOfBoundsException(SimpleTest.java:47) [jar:http://localhost:54321/JarTest.jar!/SimpleTest.class] ++>---at SimpleTest.throwAndCatchAllExceptions(SimpleTest.java:61) [jar:http://localhost:54321/JarTest.jar!/SimpleTest.class] ++>---at ThreadCaughtException.run(ThreadCaughtException.java:7) [jar:http://localhost:54321/JarTest.jar!/ThreadCaughtException.class] +diff --git a/test/outputs/backtrace_not_reportable_3remote_classes.log.in b/test/outputs/backtrace_not_reportable_3remote_classes.log.in +new file mode 100644 +index 0000000..77fb989 +--- /dev/null ++++ b/test/outputs/backtrace_not_reportable_3remote_classes.log.in +@@ -0,0 +1,5 @@ ++Exception in thread "Thread-3" java.lang.ArrayIndexOutOfBoundsException: 42 ++>---at SimpleTest.throwIndexOutOfBoundsException(SimpleTest.java:24) [jar:http://localhost:54321/JarTest.jar!/SimpleTest.class] ++>---at SimpleTest.catchIndexOutOfBoundsException(SimpleTest.java:47) [jar:http://localhost:321/JarTest.jar!/SimpleTest.class] ++>---at SimpleTest.throwAndCatchAllExceptions(SimpleTest.java:61) [jar:http://localhost:4321/JarTest.jar!/SimpleTest.class] ++>---at ThreadCaughtException.run(ThreadCaughtException.java:7) [jar:http://localhost:54321/JarTest.jar!/ThreadCaughtException.class] +diff --git a/test/outputs/not_reportable_1remote_class.log.in b/test/outputs/not_reportable_1remote_class.log.in +new file mode 100644 +index 0000000..282933a +--- /dev/null ++++ b/test/outputs/not_reportable_1remote_class.log.in +@@ -0,0 +1 @@ ++This problem can be caused by a 3rd party code from the jar/class at http://localhost:54321/JarTest.jar. In order to provide valuable problem reports, ABRT will not allow you to submit this problem. If you still want to participate in solving this problem, please contact the developers directly. +diff --git a/test/outputs/not_reportable_3remote_classes.log.in b/test/outputs/not_reportable_3remote_classes.log.in +new file mode 100644 +index 0000000..7489f74 +--- /dev/null ++++ b/test/outputs/not_reportable_3remote_classes.log.in +@@ -0,0 +1 @@ ++This problem can be caused by a 3rd party code from the jar/class at http://localhost:54321/JarTest.jar, http://localhost:321/JarTest.jar, http://localhost:4321/JarTest.jar. In order to provide valuable problem reports, ABRT will not allow you to submit this problem. If you still want to participate in solving this problem, please contact the developers directly. +-- +1.8.3.1 + diff --git a/SOURCES/0034-Use-satyr-for-calculation-of-the-duplicates-hashes.patch b/SOURCES/0034-Use-satyr-for-calculation-of-the-duplicates-hashes.patch new file mode 100644 index 0000000..db69781 --- /dev/null +++ b/SOURCES/0034-Use-satyr-for-calculation-of-the-duplicates-hashes.patch @@ -0,0 +1,357 @@ +From 9801d36ca38a03c69a92689fdcb37afde01dc066 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Mon, 20 Jan 2014 09:46:33 +0100 +Subject: [PATCH 34/39] Use satyr for calculation of the duplicates hashes + +The current algorithm simply hashes the entire backtrace file. This +approach results in non-working deduplication because the duplicate hash +depends on file system paths and line numbers. + +Satyr provide a function for generating of reliable hashes where only +function names (in case of Java it means exception type too) are used +for input of the hash function. + +Related to #29 +Related to rhbz#1054737 +--- + etc/java_event.conf | 8 - + test/outputs/not_reportable_1remote_class.log.in | 5 + + test/outputs/not_reportable_3remote_classes.log.in | 5 + + utils/abrt-action-analyze-java.c | 195 +++++++++++++-------- + 4 files changed, 136 insertions(+), 77 deletions(-) + +diff --git a/etc/java_event.conf b/etc/java_event.conf +index 302cac0..6014e93 100644 +--- a/etc/java_event.conf ++++ b/etc/java_event.conf +@@ -8,14 +8,6 @@ EVENT=post-create type=Java + # abrtd will delete the problem directory when we exit nonzero: + exit 1 + fi +- # TODO: Replace lines below by something more sane once abrt switches to satyr +- if [ -f backtrace ]; then +- printf '%s' "`sha1sum < "backtrace" | cut -d" " -f1`" > "uuid" +- cp uuid duphash +- else +- echo "Cannot create neither 'duphas' nor 'uuid' because of missing 'backtrace' file" +- exit 1 +- fi + abrt-action-analyze-java -d $DUMP_DIR || exit 1 + + # Create a bug in Bugzilla +diff --git a/test/outputs/not_reportable_1remote_class.log.in b/test/outputs/not_reportable_1remote_class.log.in +index 282933a..291072a 100644 +--- a/test/outputs/not_reportable_1remote_class.log.in ++++ b/test/outputs/not_reportable_1remote_class.log.in +@@ -1 +1,6 @@ ++duphash ++4bd13090ba6559c9c9023926671295559a25bc9b ++uuid ++4bd13090ba6559c9c9023926671295559a25bc9b ++not-reportable + This problem can be caused by a 3rd party code from the jar/class at http://localhost:54321/JarTest.jar. In order to provide valuable problem reports, ABRT will not allow you to submit this problem. If you still want to participate in solving this problem, please contact the developers directly. +diff --git a/test/outputs/not_reportable_3remote_classes.log.in b/test/outputs/not_reportable_3remote_classes.log.in +index 7489f74..ddbd29c 100644 +--- a/test/outputs/not_reportable_3remote_classes.log.in ++++ b/test/outputs/not_reportable_3remote_classes.log.in +@@ -1 +1,6 @@ ++duphash ++4bd13090ba6559c9c9023926671295559a25bc9b ++uuid ++4bd13090ba6559c9c9023926671295559a25bc9b ++not-reportable + This problem can be caused by a 3rd party code from the jar/class at http://localhost:54321/JarTest.jar, http://localhost:321/JarTest.jar, http://localhost:4321/JarTest.jar. In order to provide valuable problem reports, ABRT will not allow you to submit this problem. If you still want to participate in solving this problem, please contact the developers directly. +diff --git a/utils/abrt-action-analyze-java.c b/utils/abrt-action-analyze-java.c +index a4728b6..03542ec 100644 +--- a/utils/abrt-action-analyze-java.c ++++ b/utils/abrt-action-analyze-java.c +@@ -17,6 +17,7 @@ + */ + + #include ++#include + #include + #include + #include +@@ -24,6 +25,16 @@ + #include + #include + ++/* 4 = 1 exception + 3 methods */ ++#define FRAMES_FOR_DUPHASH 4 ++ ++typedef struct ++{ ++ const char *name; ++ char *data; ++ int nofree; ++} analysis_result_t; ++ + static char * + backtrace_from_dump_dir(const char *dir_name) + { +@@ -44,37 +55,62 @@ backtrace_from_dump_dir(const char *dir_name) + } + + static void +-write_not_reportable_message_to_dump_dir(const char *dir_name, const char *message) ++write_results_to_dump_dir(const char *dir_name, ++ const analysis_result_t *res_begin, const analysis_result_t *res_end) + { + struct dump_dir *dd = dd_opendir(dir_name, /*Open for writing*/0); + if (NULL != dd) + { +- dd_save_text(dd, FILENAME_NOT_REPORTABLE, message); ++ const analysis_result_t *res = res_begin; ++ ++ for ( ; res != res_end; ++res) ++ dd_save_text(dd, res->name, res->data); ++ + dd_close(dd); + } + } + + static void +-write_not_reportable_message_to_fd(int fdout, const char *message) ++write_to_fd(int fdout, const char *message) + { + full_write(fdout, message, strlen(message)); + full_write(fdout, "\n", 1); + } + ++ + static void +-write_not_reportable_message_to_file(const char *file_name, const char *message) ++write_results_to_fd(int fdout, ++ const analysis_result_t *res_begin, const analysis_result_t *res_end) + { +- int fdout = open(file_name, +- O_WRONLY | O_TRUNC | O_CREAT | O_NOFOLLOW, +- S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP ); ++ const analysis_result_t *res = res_begin; + +- if (0 > fdout) ++ for ( ; res != res_end; ++res) + { +- perror_msg("Can't open file '%s' for writing", file_name); +- return; ++ write_to_fd(fdout, res->name); ++ write_to_fd(fdout, res->data); ++ } ++} ++ ++static void ++write_results_to_file(const analysis_result_t *res_begin, const analysis_result_t *res_end) ++{ ++ const analysis_result_t *res = res_begin; ++ ++ for ( ; res != res_end; ++res) ++ { ++ int fdout = open(res->name, ++ O_WRONLY | O_TRUNC | O_CREAT | O_NOFOLLOW, ++ S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP ); ++ ++ if (0 > fdout) ++ { ++ perror_msg("Can't open file '%s' for writing", res->name); ++ continue; ++ } ++ ++ write_to_fd(fdout, res->data); ++ close(fdout); + } +- write_not_reportable_message_to_fd(fdout, message); +- close(fdout); + } + + static char * +@@ -89,50 +125,46 @@ backtrace_from_file(const char *file_name) + return xmalloc_xopen_read_close(file_name, /*no size limit*/NULL); + } + +-typedef void (*frame_cb)(struct sr_java_frame *frame, void *args); +- +-typedef struct { +- frame_cb callback; +- void *args; +-} frame_proc_t; +- +-static void +-iterate_trough_stacktrace(struct sr_java_stacktrace *stacktrace, frame_proc_t **fproc) ++static char * ++work_out_list_of_remote_urls(struct sr_java_stacktrace *stacktrace) + { ++ struct strbuf *remote_files_csv = strbuf_new(); + struct sr_java_thread *thread = stacktrace->threads; + while (NULL != thread) + { + struct sr_java_frame *frame = thread->frames; + while (NULL != frame) + { +- frame_proc_t **it = fproc; +- while (NULL != *it) ++ if (NULL != frame->class_path && prefixcmp(frame->class_path, "file://") != 0) + { +- (*it)->callback(frame, (*it)->args); +- ++it; ++ struct stat buf; ++ if (stat(frame->class_path, &buf) && errno == ENOENT) ++ { ++ if (strstr(remote_files_csv->buf, frame->class_path) == NULL) ++ { ++ log_debug("Adding a new path to the list of remote paths: '%s'", frame->class_path); ++ strbuf_append_strf(remote_files_csv, "%s%s", ++ remote_files_csv->buf[0] != '\0' ? ", " : "", ++ frame->class_path); ++ } ++ else ++ log_debug("The list of remote paths already contains path: '%s'", frame->class_path); ++ } ++ else ++ log_debug("Class path exists or is malformed: '%s'", frame->class_path); + } + frame = frame->next; + } + thread = thread->next; + } +-} + +-static void +-work_out_list_of_remote_urls(struct sr_java_frame *frame, struct strbuf *remote_files_csv) +-{ +- if (NULL != frame->class_path && prefixcmp(frame->class_path, "file://") != 0) ++ if (remote_files_csv->buf[0] != '\0') + { +- struct stat buf; +- if (stat(frame->class_path, &buf) && errno == ENOENT) +- { +- if (strstr(remote_files_csv->buf, frame->class_path) == NULL) +- { +- strbuf_append_strf(remote_files_csv, "%s%s", +- remote_files_csv->buf[0] != '\0' ? ", " : "", +- frame->class_path); +- } +- } ++ return strbuf_free_nobuf(remote_files_csv); + } ++ ++ strbuf_free(remote_files_csv); ++ return NULL; + } + + int main(int argc, char *argv[]) +@@ -153,7 +185,9 @@ int main(int argc, char *argv[]) + const char *program_usage_string = _( + "& [[-d DIR] | [-f FILE]] [-o]\n" + "\n" +- "Analyzes Java backtrace\n" ++ "Analyzes Java backtrace, generates duplication hash and creates\n" ++ "not-reportable file for bracktraces whose frames have remote files in their\n" ++ "class path\n" + ); + enum { + OPT_v = 1 << 0, +@@ -208,49 +242,72 @@ int main(int argc, char *argv[]) + goto finish; + } + +- struct strbuf *remote_files_csv = strbuf_new(); +- frame_proc_t remote_files_proc = { +- .callback = (frame_cb)&work_out_list_of_remote_urls, +- .args = (void *)remote_files_csv +- }; ++ analysis_result_t results[3] = { { 0 } }; ++ analysis_result_t *results_iter = results; + +- frame_proc_t *fproc[] = { +- &remote_files_proc, +- //duphash_proc, +- //backtrace_usability, +- NULL, +- }; ++ char *remote_files_csv = work_out_list_of_remote_urls(stacktrace); + +- iterate_trough_stacktrace(stacktrace, fproc); ++ char *hash_str = NULL; ++ struct sr_thread *crash_thread = (struct sr_thread *)stacktrace->threads; ++ if (g_verbose >= 3) ++ { ++ hash_str = sr_thread_get_duphash(crash_thread, FRAMES_FOR_DUPHASH, ++ /*noprefix*/NULL, SR_DUPHASH_NOHASH); ++ log("Generating duphash from string: '%s'", hash_str); ++ free(hash_str); ++ } ++ ++ hash_str = sr_thread_get_duphash(crash_thread, FRAMES_FOR_DUPHASH, ++ /*noprefix*/NULL, SR_DUPHASH_NORMAL); ++ ++ /* DUPHASH is used for searching for duplicates in Bugzilla */ ++ results_iter->name = FILENAME_DUPHASH; ++ results_iter->data = hash_str; ++ ++results_iter; ++ ++ /* UUID is used for local deduplication */ ++ results_iter->name = FILENAME_UUID; ++ results_iter->data = hash_str; ++ results_iter->nofree = 1; ++ ++results_iter; + + sr_java_stacktrace_free(stacktrace); + +- if ('\0' != remote_files_csv->buf[0]) ++ if (NULL != remote_files_csv) + { +- char *not_reportable_message = xasprintf( ++ results_iter->name = FILENAME_NOT_REPORTABLE; ++ results_iter->data = xasprintf( + _("This problem can be caused by a 3rd party code from the "\ + "jar/class at %s. In order to provide valuable problem " \ + "reports, ABRT will not allow you to submit this problem. If you " \ + "still want to participate in solving this problem, please contact " \ +- "the developers directly."), remote_files_csv->buf); ++ "the developers directly."), remote_files_csv); ++ ++results_iter; ++ free(remote_files_csv); ++ } + +- if (opts & OPT_o) +- { +- write_not_reportable_message_to_fd(STDOUT_FILENO, not_reportable_message); +- } +- else if (NULL != dump_dir_name) ++ if (opts & OPT_o) ++ { ++ write_results_to_fd(STDOUT_FILENO, results, results_iter); ++ } ++ else if (NULL != dump_dir_name) ++ { ++ write_results_to_dump_dir(dump_dir_name, results, results_iter); ++ } ++ else ++ { /* Just write it to the current working directory */ ++ write_results_to_file(results, results_iter); ++ } ++ ++ const analysis_result_t *res = results; ++ for (; res != results_iter; ++res) ++ { ++ if (!res->nofree) + { +- write_not_reportable_message_to_dump_dir(dump_dir_name, not_reportable_message); ++ free(res->data); + } +- else +- { /* Just write it to the current working directory */ +- write_not_reportable_message_to_file(FILENAME_NOT_REPORTABLE, not_reportable_message); +- } +- +- free(not_reportable_message); + } + +- strbuf_free(remote_files_csv); + retval = 0; + finish: + +-- +1.8.3.1 + diff --git a/SOURCES/0035-Add-a-manual-page-for-the-analysis-tool.patch b/SOURCES/0035-Add-a-manual-page-for-the-analysis-tool.patch new file mode 100644 index 0000000..6910f76 --- /dev/null +++ b/SOURCES/0035-Add-a-manual-page-for-the-analysis-tool.patch @@ -0,0 +1,113 @@ +From d20626db00428ccf0343ad4e87af6b59c00b2bf8 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Mon, 20 Jan 2014 09:54:48 +0100 +Subject: [PATCH 35/39] Add a manual page for the analysis tool + +Related to #29 +Related to rhbz#1054737 +--- + utils/CMakeLists.txt | 2 + + utils/abrt-action-analyze-java.1 | 81 ++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 83 insertions(+) + create mode 100644 utils/abrt-action-analyze-java.1 + +diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt +index c358968..517c130 100644 +--- a/utils/CMakeLists.txt ++++ b/utils/CMakeLists.txt +@@ -32,3 +32,5 @@ target_link_libraries(abrt-action-analyze-java ${PC_LIBREPORT_LIBRARIES}) + target_link_libraries(abrt-action-analyze-java ${PC_ABRT_LIBRARIES}) + + install(TARGETS abrt-action-analyze-java DESTINATION ${BIN_INSTALL_DIR}) ++ ++install(FILES abrt-action-analyze-java.1 DESTINATION ${MAN_INSTALL_DIR}/man1) +diff --git a/utils/abrt-action-analyze-java.1 b/utils/abrt-action-analyze-java.1 +new file mode 100644 +index 0000000..eda4d6a +--- /dev/null ++++ b/utils/abrt-action-analyze-java.1 +@@ -0,0 +1,81 @@ ++'\" t ++.\" Title: abrt-action-analyze-java ++.\" Author: [see the "AUTHORS" section] ++.\" Date: 01/19/2014 ++.\" Manual: ABRT Manual ++.\" Language: English ++.\" ++.TH "ABRT\-ACTION\-ANALYZ" "1" "01/19/2014" "abrt-java-connector" "ABRT Manual" ++.\" ----------------------------------------------------------------- ++.\" * Define some portability stuff ++.\" ----------------------------------------------------------------- ++.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++.\" http://bugs.debian.org/507673 ++.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html ++.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++.ie \n(.g .ds Aq \(aq ++.el .ds Aq ' ++.\" ----------------------------------------------------------------- ++.\" * set default formatting ++.\" ----------------------------------------------------------------- ++.\" disable hyphenation ++.nh ++.\" disable justification (adjust text to left margin only) ++.ad l ++.\" ----------------------------------------------------------------- ++.\" * MAIN CONTENT STARTS HERE * ++.\" ----------------------------------------------------------------- ++.SH "NAME" ++abrt-action-analyze-java \- Calculate and save UUID & DUPHASH and determine the level of usability for reporting of a Java stack trace\&. ++.SH "SYNOPSIS" ++.sp ++\fIabrt\-action\-analyze\-java\fR [\-v] [\-d DIR] [\-o] [\-f FILE] ++.SH "DESCRIPTION" ++.sp ++The tool reads the file named \fIbacktrace\fR from a problem data directory, processes it and generates a universally unique identifier (UUID)\&. Then it saves this data as new element \fIuuid\fR\&. It also checks whether the stack trace contains a remote address in any of its frames and if so it creates \fInot-reportable\fR element whose contents explains why the stack trace should not be reported into a bug tracking system\&. ++.SS "Integration with ABRT events" ++.sp ++\fIabrt\-action\-analyze\-java\fR can be used to generate the UUID & DUPHAS of a newly saved Java stack trace\&. ++.sp ++.if n \{\ ++.RS 4 ++.\} ++.nf ++EVENT=post\-create analyzer=Java abrt\-action\-analyze\-java ++.fi ++.if n \{\ ++.RE ++.\} ++.SH "OPTIONS" ++.PP ++\-d DIR ++.RS 4 ++Path to a problem directory\&. The tool reads the backtrace from stdin when neither this option nor -f is provided\&. ++.RE ++.PP ++\-f FILE ++.RS 4 ++Path to a stack trace\&. The tool reads the backtrace from stdin when neither this option nor -d is provided\&. ++.RE ++.PP ++\-o ++.RS 4 ++Print the result to stdout\&. ++.RE ++.PP ++\-v ++.RS 4 ++Be more verbose\&. Can be given multiple times\&. ++.RE ++.SH "AUTHORS" ++.sp ++.RS 4 ++.ie n \{\ ++\h'-04'\(bu\h'+03'\c ++.\} ++.el \{\ ++.sp -1 ++.IP \(bu 2.3 ++.\} ++ABRT team ++.RE +-- +1.8.3.1 + diff --git a/SOURCES/0038-Speed-up-thread-start-end-processing.patch b/SOURCES/0038-Speed-up-thread-start-end-processing.patch new file mode 100644 index 0000000..be77485 --- /dev/null +++ b/SOURCES/0038-Speed-up-thread-start-end-processing.patch @@ -0,0 +1,235 @@ +From 45bb10da0dd06e9e753f5080de5f863614779c2b Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Tue, 21 Jan 2014 10:21:37 +0100 +Subject: [PATCH 38/39] Speed up thread start/end processing + +It is not necessary to initialize any thread related data until an +exception occurs, and then we can skip calling getTid() in the thread end +callback. + +Related to rhbz#1051198 +--- + src/abrt-checker.c | 102 +++++++++++++++++++++++------------------------------ + src/jthread_map.c | 7 ++-- + 2 files changed, 49 insertions(+), 60 deletions(-) + +diff --git a/src/abrt-checker.c b/src/abrt-checker.c +index 1f91cb7..91485e0 100644 +--- a/src/abrt-checker.c ++++ b/src/abrt-checker.c +@@ -591,8 +591,7 @@ static void register_abrt_event( + static void report_stacktrace( + const char *executable, + const char *message, +- const char *stacktrace, +- int sure_unique) ++ const char *stacktrace) + { + if (reportErrosTo & ED_SYSLOG) + { +@@ -621,7 +620,7 @@ static void report_stacktrace( + log_print("executable: %s\n", executable); + } + +- if (NULL != stacktrace && sure_unique) ++ if (NULL != stacktrace) + { + VERBOSE_PRINT("Reporting stack trace to ABRT"); + register_abrt_event(executable, message, stacktrace); +@@ -1269,35 +1268,24 @@ static void JNICALL callback_on_vm_death( + + + /* +- * Called before thread end. ++ * Former callback_on_thread_start but it is not necessary to create an empty ++ * structures and waste CPU time because it is more likely that no exception ++ * will occur during the thread's lifetime. So, we converted the callback to a ++ * function which can be used for initialization of the internal structures. + */ +-static void JNICALL callback_on_thread_start( +- jvmtiEnv *jvmti_env __UNUSED_VAR, ++static T_jthrowableCircularBuf *create_exception_buf_for_thread( + JNIEnv *jni_env, +- jthread thread) ++ jlong tid) + { +- INFO_PRINT("ThreadStart\n"); +- if (NULL == threadMap) +- { +- return; +- } +- +- jlong tid = 0; +- +- if (get_tid(jni_env, thread, &tid)) +- { +- VERBOSE_PRINT("Cannot malloc thread's exception buffer because cannot get TID"); +- return; +- } +- + T_jthrowableCircularBuf *threads_exc_buf = jthrowable_circular_buf_new(jni_env, REPORTED_EXCEPTION_STACK_CAPACITY); + if (NULL == threads_exc_buf) + { + fprintf(stderr, "Cannot enable check for already reported exceptions. Disabling reporting to ABRT in current thread!"); +- return; ++ return NULL; + } + + jthread_map_push(threadMap, tid, (void *)threads_exc_buf); ++ return threads_exc_buf; + } + + +@@ -1316,36 +1304,38 @@ static void JNICALL callback_on_thread_end( + return; + } + +- jlong tid = 0; +- +- if (get_tid(jni_env, thread, &tid)) ++ if (!jthread_map_empty(threadMap) || !jthread_map_empty(uncaughtExceptionMap)) + { +- VERBOSE_PRINT("Cannot free thread's exception buffer because cannot get TID"); +- return; +- } +- +- T_exceptionReport *rpt = (T_exceptionReport *)jthread_map_pop(uncaughtExceptionMap, tid); +- T_jthrowableCircularBuf *threads_exc_buf = (T_jthrowableCircularBuf *)jthread_map_pop(threadMap, tid); ++ jlong tid = 0; + +- if (NULL != rpt) +- { +- if (NULL == threads_exc_buf || NULL == jthrowable_circular_buf_find(threads_exc_buf, rpt->exception_object)) ++ if (get_tid(jni_env, thread, &tid)) + { +- report_stacktrace(NULL != rpt->executable ? rpt->executable : processProperties.main_class, +- NULL != rpt->message ? rpt->message : "Uncaught exception", +- rpt->stacktrace, +- NULL != threads_exc_buf); ++ VERBOSE_PRINT("Cannot free thread's exception buffer because cannot get TID"); ++ return; + } + +- free(rpt->message); +- free(rpt->stacktrace); +- free(rpt->executable); +- free(rpt->exception_type_name); +- } ++ T_exceptionReport *rpt = (T_exceptionReport *)jthread_map_pop(uncaughtExceptionMap, tid); ++ T_jthrowableCircularBuf *threads_exc_buf = (T_jthrowableCircularBuf *)jthread_map_pop(threadMap, tid); + +- if (threads_exc_buf != NULL) +- { +- jthrowable_circular_buf_free(threads_exc_buf); ++ if (NULL != rpt) ++ { ++ if (NULL == threads_exc_buf || NULL == jthrowable_circular_buf_find(threads_exc_buf, rpt->exception_object)) ++ { ++ report_stacktrace(NULL != rpt->executable ? rpt->executable : processProperties.main_class, ++ NULL != rpt->message ? rpt->message : "Uncaught exception", ++ rpt->stacktrace); ++ } ++ ++ free(rpt->message); ++ free(rpt->stacktrace); ++ free(rpt->executable); ++ free(rpt->exception_type_name); ++ } ++ ++ if (threads_exc_buf != NULL) ++ { ++ jthrowable_circular_buf_free(threads_exc_buf); ++ } + } + } + +@@ -2193,8 +2183,10 @@ static void JNICALL callback_on_exception( + { + report_stacktrace(NULL != executable ? executable : processProperties.main_class, + report_message, +- stack_trace_str, +- NULL != threads_exc_buf); ++ stack_trace_str); ++ ++ if (NULL == threads_exc_buf) ++ threads_exc_buf = create_exception_buf_for_thread(jni_env, tid); + + if (NULL != threads_exc_buf) + { +@@ -2346,8 +2338,10 @@ static void JNICALL callback_on_exception_catch( + char *message = format_exception_reason_message(/*caught*/1, rpt->exception_type_name, class_name_ptr, method_name_ptr); + report_stacktrace(NULL != rpt->executable ? rpt->executable : processProperties.main_class, + NULL != message ? message : "Caught exception", +- rpt->stacktrace, +- NULL != threads_exc_buf); ++ rpt->stacktrace); ++ ++ if (NULL == threads_exc_buf) ++ threads_exc_buf = create_exception_buf_for_thread(jni_env, tid); + + if (NULL != threads_exc_buf) + { +@@ -2584,9 +2578,6 @@ jvmtiError register_all_callback_functions(jvmtiEnv *jvmti_env) + callbacks.VMDeath = &callback_on_vm_death; + #endif /* ABRT_VM_DEATH_CHECK */ + +- /* JVMTI_EVENT_THREAD_START */ +- callbacks.ThreadStart = &callback_on_thread_start; +- + /* JVMTI_EVENT_THREAD_END */ + callbacks.ThreadEnd = &callback_on_thread_end; + +@@ -2659,11 +2650,6 @@ jvmtiError set_event_notification_modes(jvmtiEnv* jvmti_env) + } + #endif /* ABRT_VM_DEATH_CHECK */ + +- if ((error_code = set_event_notification_mode(jvmti_env, JVMTI_EVENT_THREAD_START)) != JNI_OK) +- { +- return error_code; +- } +- + if ((error_code = set_event_notification_mode(jvmti_env, JVMTI_EVENT_THREAD_END)) != JNI_OK) + { + return error_code; +diff --git a/src/jthread_map.c b/src/jthread_map.c +index e9d60e9..4517398 100644 +--- a/src/jthread_map.c ++++ b/src/jthread_map.c +@@ -115,7 +115,6 @@ void jthread_map_push(T_jthreadMap *map, jlong tid, void *item) + assert(NULL != map); + + pthread_mutex_lock(&map->mutex); +- ++map->size; + + const long index = tid % MAP_SIZE; + T_jthreadMapItem *last = NULL; +@@ -128,6 +127,8 @@ void jthread_map_push(T_jthreadMap *map, jlong tid, void *item) + + if (NULL == itm) + { ++ ++map->size; ++ + T_jthreadMapItem *new = jthrowable_map_item_new(tid, item); + if (last == NULL) + { +@@ -174,7 +175,6 @@ void *jthread_map_pop(T_jthreadMap *map, jlong tid) + assert(NULL != map); + + pthread_mutex_lock(&map->mutex); +- --map->size; + + const size_t index = tid % MAP_SIZE; + void *data = NULL; +@@ -205,6 +205,9 @@ void *jthread_map_pop(T_jthreadMap *map, jlong tid) + } + } + ++ if (NULL != data) ++ --map->size; ++ + pthread_mutex_unlock(&map->mutex); + + return data; +-- +1.8.3.1 + diff --git a/SOURCES/0040-Fix-a-pair-of-defects-uncovered-by-coverity.patch b/SOURCES/0040-Fix-a-pair-of-defects-uncovered-by-coverity.patch new file mode 100644 index 0000000..ea0f63b --- /dev/null +++ b/SOURCES/0040-Fix-a-pair-of-defects-uncovered-by-coverity.patch @@ -0,0 +1,52 @@ +From c4d4ecdad1259aab4c27db291e1dfcef0b1a6a51 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Wed, 22 Jan 2014 15:33:50 +0100 +Subject: [PATCH 40/40] Fix a pair of defects uncovered by coverity + +Resolves rhbz#1056584 +--- + src/abrt-checker.c | 8 ++++++-- + src/jthread_map.c | 1 + + 2 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/src/abrt-checker.c b/src/abrt-checker.c +index 91485e0..713053c 100644 +--- a/src/abrt-checker.c ++++ b/src/abrt-checker.c +@@ -2886,7 +2886,11 @@ void parse_commandline_options(char *options) + } + else if (strcmp("executable", key) == 0) + { +- if (strcmp("threadclass", value) == 0) ++ if (NULL == value || '\0' == value[0]) ++ { ++ fprintf(stderr, "A value of '%s' option cannot be empty\n", key); ++ } ++ else if (strcmp("threadclass", value) == 0) + { + VERBOSE_PRINT("Use a thread class for 'executable'\n"); + executableFlags |= ABRT_EXECUTABLE_THREAD; +@@ -2899,7 +2903,7 @@ void parse_commandline_options(char *options) + } + else + { +- fprintf(stderr, "Unknown 'executable' option's value '%s'\n", key); ++ fprintf(stderr, "Unknown '%s' option's value '%s'\n", key, value); + } + } + else +diff --git a/src/jthread_map.c b/src/jthread_map.c +index 4517398..4cb417b 100644 +--- a/src/jthread_map.c ++++ b/src/jthread_map.c +@@ -55,6 +55,7 @@ T_jthreadMap *jthread_map_new() + if (NULL == map) + { + fprintf(stderr, __FILE__ ":" STRINGIZE(__LINE__) ": calloc() error\n"); ++ return NULL; + } + + pthread_mutex_init(&map->mutex, /*use default attributes*/NULL); +-- +1.8.3.1 + diff --git a/SOURCES/0041-Make-sure-that-agent_onload-and-agent_onunload-are-p.patch b/SOURCES/0041-Make-sure-that-agent_onload-and-agent_onunload-are-p.patch new file mode 100644 index 0000000..74c519c --- /dev/null +++ b/SOURCES/0041-Make-sure-that-agent_onload-and-agent_onunload-are-p.patch @@ -0,0 +1,52 @@ +From 304b4adbb916ee07db6b3ee3bf9a3de815269a96 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Mon, 10 Feb 2014 15:33:13 +0100 +Subject: [PATCH 41/43] Make sure that agent_onload and agent_onunload are + processed only once + +Related to rhbz#1063322 +--- + src/abrt-checker.c | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/src/abrt-checker.c b/src/abrt-checker.c +index 713053c..e9caada 100644 +--- a/src/abrt-checker.c ++++ b/src/abrt-checker.c +@@ -2923,10 +2923,17 @@ JNIEXPORT jint JNICALL Agent_OnLoad( + char *options, + void *reserved __UNUSED_VAR) + { ++ static int already_called = 0; + jvmtiEnv *jvmti_env = NULL; + jvmtiError error_code = JVMTI_ERROR_NONE; + jint result; + ++ /* we need to make sure the agent is initialized once */ ++ if (already_called) { ++ return JNI_OK; ++ } ++ ++ already_called = 1; + pthread_mutex_init(&abrt_print_mutex, /*attr*/NULL); + + INFO_PRINT("Agent_OnLoad\n"); +@@ -3001,6 +3008,15 @@ JNIEXPORT jint JNICALL Agent_OnLoad( + */ + JNIEXPORT void JNICALL Agent_OnUnload(JavaVM *vm __UNUSED_VAR) + { ++ static int already_called = 0; ++ ++ /* we need to make sure the agent is initialized once */ ++ if (already_called) { ++ return; ++ } ++ ++ already_called = 1; ++ + pthread_mutex_destroy(&abrt_print_mutex); + + INFO_PRINT("Agent_OnUnLoad\n"); +-- +1.8.3.1 + diff --git a/SOURCES/0042-Add-a-test-for-multiple-calls-of-Agent_OnLoad.patch b/SOURCES/0042-Add-a-test-for-multiple-calls-of-Agent_OnLoad.patch new file mode 100644 index 0000000..ded53bd --- /dev/null +++ b/SOURCES/0042-Add-a-test-for-multiple-calls-of-Agent_OnLoad.patch @@ -0,0 +1,54 @@ +From 4cbac07ce5e03172636dc7b782a4e3d67870bac5 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Tue, 4 Feb 2014 16:38:02 +0100 +Subject: [PATCH 42/43] Add a test for multiple calls of Agent_OnLoad + +Related to rhbz#1063322 +--- + test/CMakeLists.txt | 10 ++++++++++ + test/outputs/run_three_times.log.in | 13 +++++++++++++ + 2 files changed, 23 insertions(+) + create mode 100644 test/outputs/run_three_times.log.in + +diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt +index 0439294..5b117a1 100644 +--- a/test/CMakeLists.txt ++++ b/test/CMakeLists.txt +@@ -317,5 +317,15 @@ _add_test(run_remote_thread 0) + _add_analyze_test(not_reportable_1remote_class) + _add_analyze_test(not_reportable_3remote_classes) + ++_add_test_target( ++ run_three_times ++ SimpleTest ++ DEPENDS ${TEST_JAVA_TARGETS} ++ AGENT_OPTIONS caught=java.lang.ArrayIndexOutOfBoundsException:java.lang.NullPointerException -agentlib=${AGENT_NAME}=output=/proc/pid/0/java.log -agentlib=${AGENT_NAME}=output=/proc/pid/1/java.log ++) ++_add_test(run_three_times 2) ++ ++ ++ + get_directory_property(all_run_targets ALL_RUN_TARGETS) + add_custom_target(run_all DEPENDS ${all_run_targets}) +diff --git a/test/outputs/run_three_times.log.in b/test/outputs/run_three_times.log.in +new file mode 100644 +index 0000000..aa8b2c8 +--- /dev/null ++++ b/test/outputs/run_three_times.log.in +@@ -0,0 +1,13 @@ ++Caught exception java.lang.ArrayIndexOutOfBoundsException in method SimpleTest.throwIndexOutOfBoundsException() ++Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 42 ++ at SimpleTest.throwIndexOutOfBoundsException(SimpleTest.java:24) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] ++ at SimpleTest.catchIndexOutOfBoundsException(SimpleTest.java:47) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] ++ at SimpleTest.throwAndCatchAllExceptions(SimpleTest.java:61) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] ++ at SimpleTest.main(SimpleTest.java:81) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] ++executable: @CMAKE_BINARY_DIR@/test/SimpleTest.class ++Uncaught exception java.lang.NullPointerException in method SimpleTest.throwNullPointerException() ++Exception in thread "main" java.lang.NullPointerException ++ at SimpleTest.throwNullPointerException(SimpleTest.java:36) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] ++ at SimpleTest.throwAndDontCatchException(SimpleTest.java:71) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] ++ at SimpleTest.main(SimpleTest.java:83) [file:@CMAKE_BINARY_DIR@/test/SimpleTest.class] ++executable: @CMAKE_BINARY_DIR@/test/SimpleTest.class +-- +1.8.3.1 + diff --git a/SOURCES/0043-Add-test-results-for-Linux-aarch64.patch b/SOURCES/0043-Add-test-results-for-Linux-aarch64.patch new file mode 100644 index 0000000..1f8fc51 --- /dev/null +++ b/SOURCES/0043-Add-test-results-for-Linux-aarch64.patch @@ -0,0 +1,187 @@ +From 4c6676f6bb82c3f44ac2daa5d744268c386306b1 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Wed, 5 Feb 2014 10:53:29 +0100 +Subject: [PATCH 43/43] Add test results for Linux-aarch64 + +Close rhbz#1044756 +--- + test/outputs/Linux-aarch64/run_test.log.in | 167 +++++++++++++++++++++++++++++ + 1 file changed, 167 insertions(+) + create mode 100644 test/outputs/Linux-aarch64/run_test.log.in + +diff --git a/test/outputs/Linux-aarch64/run_test.log.in b/test/outputs/Linux-aarch64/run_test.log.in +new file mode 100644 +index 0000000..2a41f50 +--- /dev/null ++++ b/test/outputs/Linux-aarch64/run_test.log.in +@@ -0,0 +1,167 @@ ++Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.() ++Exception in thread "main" java.io.FileNotFoundException: _wrong_file_ (No such file or directory) ++ at java.io.FileInputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] ++ at java.io.FileInputStream.(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] ++ at Test.readWrongFile(Test.java:89) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.fileRelatedIssues(Test.java:461) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class ++Caught exception java.io.FileNotFoundException in method java.io.FileInputStream.() ++Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied) ++ at java.io.FileInputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] ++ at java.io.FileInputStream.(FileInputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileInputStream.class] ++ at Test.readUnreadableFile(Test.java:111) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.fileRelatedIssues(Test.java:462) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class ++Caught exception java.io.FileNotFoundException in method java.io.FileOutputStream.() ++Exception in thread "main" java.io.FileNotFoundException: /root/.bashrc (Permission denied) ++ at java.io.FileOutputStream.open(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class] ++ at java.io.FileOutputStream.(FileOutputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class] ++ at java.io.FileOutputStream.(FileOutputStream.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/io/FileOutputStream.class] ++ at Test.writeToUnwritableFile(Test.java:134) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.fileRelatedIssues(Test.java:463) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.main(Test.java:513) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class ++Caught exception java.lang.NumberFormatException in method java.lang.Integer.parseInt() ++Exception in thread "main" java.lang.NumberFormatException: null ++ at java.lang.Integer.parseInt(Integer.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Integer.class] ++ at java.lang.Integer.(Integer.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Integer.class] ++ at sun.net.InetAddressCachePolicy.(InetAddressCachePolicy.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/sun/net/InetAddressCachePolicy.class] ++ at java.net.InetAddress$Cache.getPolicy(InetAddress.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/InetAddress$Cache.class] ++ at java.net.InetAddress$Cache.put(InetAddress.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/InetAddress$Cache.class] ++ at java.net.InetAddress.cacheInitIfNeeded(InetAddress.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/InetAddress.class] ++ at java.net.InetAddress.getCachedAddresses(InetAddress.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/InetAddress.class] ++ at java.net.InetAddress.getAllByName0(InetAddress.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/InetAddress.class] ++ at java.net.InetAddress.getAllByName(InetAddress.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/InetAddress.class] ++ at java.net.InetAddress.getAllByName(InetAddress.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/InetAddress.class] ++ at java.net.InetAddress.getByName(InetAddress.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/InetAddress.class] ++ at java.net.InetSocketAddress.(InetSocketAddress.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/InetSocketAddress.class] ++ at java.net.Socket.(Socket.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/Socket.class] ++ at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class ++Caught exception java.net.UnknownHostException in method java.net.InetAddress$1.lookupAllHostAddr() ++Exception in thread "main" java.net.UnknownHostException: xyzzy: Name or service not known ++ at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/Inet6AddressImpl.class] ++ at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/InetAddress$1.class] ++ at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/InetAddress.class] ++ at java.net.InetAddress.getAllByName0(InetAddress.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/InetAddress.class] ++ at java.net.InetAddress.getAllByName(InetAddress.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/InetAddress.class] ++ at java.net.InetAddress.getAllByName(InetAddress.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/InetAddress.class] ++ at java.net.InetAddress.getByName(InetAddress.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/InetAddress.class] ++ at java.net.InetSocketAddress.(InetSocketAddress.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/InetSocketAddress.class] ++ at java.net.Socket.(Socket.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/Socket.class] ++ at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class ++Caught exception java.net.UnknownHostException in method java.net.AbstractPlainSocketImpl.connect() ++Exception in thread "main" java.net.UnknownHostException: xyzzy ++ at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/AbstractPlainSocketImpl.class] ++ at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/SocksSocketImpl.class] ++ at java.net.Socket.connect(Socket.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/Socket.class] ++ at java.net.Socket.connect(Socket.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/Socket.class] ++ at java.net.Socket.(Socket.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/Socket.class] ++ at java.net.Socket.(Socket.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/Socket.class] ++ at Test.readFromUnknownHost(Test.java:157) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.networkRelatedIssues(Test.java:473) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class ++Caught exception java.net.ConnectException in method java.net.AbstractPlainSocketImpl.doConnect() ++Exception in thread "main" java.net.ConnectException: Connection refused ++ at java.net.PlainSocketImpl.socketConnect(Native Method) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/PlainSocketImpl.class] ++ at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/AbstractPlainSocketImpl.class] ++ at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/AbstractPlainSocketImpl.class] ++ at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/AbstractPlainSocketImpl.class] ++ at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/SocksSocketImpl.class] ++ at java.net.Socket.connect(Socket.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/Socket.class] ++ at java.net.Socket.connect(Socket.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/Socket.class] ++ at java.net.Socket.(Socket.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/Socket.class] ++ at java.net.Socket.(Socket.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/Socket.class] ++ at Test.readFromSocket(Test.java:177) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.networkRelatedIssues(Test.java:474) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class ++Caught exception java.lang.NumberFormatException in method java.lang.Long.parseLong() ++Exception in thread "main" java.lang.NumberFormatException: null ++ at java.lang.Long.parseLong(Long.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Long.class] ++ at java.lang.Long.parseLong(Long.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Long.class] ++ at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/sun/net/www/protocol/http/HttpURLConnection.class] ++ at java.net.URL.openStream(URL.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URL.class] ++ at Test.readFromURL(Test.java:237) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.networkRelatedIssues(Test.java:475) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class ++Caught exception java.io.FileNotFoundException in method sun.net.www.protocol.http.HttpURLConnection.getInputStream() ++Exception in thread "main" java.io.FileNotFoundException: http://localhost:54321/_this_does_not_exists_ ++ at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/sun/net/www/protocol/http/HttpURLConnection.class] ++ at java.net.URL.openStream(URL.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URL.class] ++ at Test.readFromURL(Test.java:237) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.networkRelatedIssues(Test.java:475) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class ++Caught exception java.net.MalformedURLException in method java.net.URL.() ++Exception in thread "main" java.net.MalformedURLException: no protocol: @#$%^&malformed URL@#$%^&*() ++ at java.net.URL.(URL.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URL.class] ++ at java.net.URL.(URL.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URL.class] ++ at java.net.URL.(URL.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/net/URL.class] ++ at Test.malformedURL(Test.java:194) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.networkRelatedIssues(Test.java:476) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.main(Test.java:514) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class ++Caught exception java.lang.ArrayIndexOutOfBoundsException in method Test.throwIndexOutOfBoundsException() ++Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 42 ++ at Test.throwIndexOutOfBoundsException(Test.java:266) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.catchIndexOutOfBoundsException(Test.java:347) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.throwAndCatchAllExceptions(Test.java:486) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class ++Caught exception java.lang.StringIndexOutOfBoundsException in method java.lang.String.charAt() ++Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1 ++ at java.lang.String.charAt(String.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/String.class] ++ at Test.throwStringIndexOutOfBoundsException(Test.java:278) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.catchStringIndexOutOfBoundsException(Test.java:362) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.throwAndCatchAllExceptions(Test.java:487) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class ++Caught exception java.lang.NullPointerException in method Test.throwNullPointerException() ++Exception in thread "main" java.lang.NullPointerException ++ at Test.throwNullPointerException(Test.java:290) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.catchNullPointerException(Test.java:377) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.throwAndCatchAllExceptions(Test.java:488) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class ++Caught exception java.lang.ClassCastException in method Test.throwClassCastException() ++Exception in thread "main" java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String ++ at Test.throwClassCastException(Test.java:302) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.catchClassCastException(Test.java:392) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.throwAndCatchAllExceptions(Test.java:489) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class ++Caught exception java.lang.UnsatisfiedLinkError in method java.lang.Runtime.load0() ++Exception in thread "main" java.lang.UnsatisfiedLinkError: Expecting an absolute path of the library: xyzzy ++ at java.lang.Runtime.load0(Runtime.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Runtime.class] ++ at java.lang.System.load(System.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/System.class] ++ at Test.loadLibrary(Test.java:325) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.catchUnsatisfiedLinkErrorUserLibrary(Test.java:422) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.throwAndCatchAllExceptions(Test.java:491) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class ++Caught exception java.lang.UnsatisfiedLinkError in method java.lang.ClassLoader.loadLibrary() ++Exception in thread "main" java.lang.UnsatisfiedLinkError: no xyzzy in java.library.path ++ at java.lang.ClassLoader.loadLibrary(ClassLoader.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/ClassLoader.class] ++ at java.lang.Runtime.loadLibrary0(Runtime.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/Runtime.class] ++ at java.lang.System.loadLibrary(System.java:LINENO) [jar:file:JAVA_AND_SYSTEM_SPECIFIC_PATH/rt.jar!/java/lang/System.class] ++ at Test.loadSystemLibrary(Test.java:336) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.catchUnsatisfiedLinkErrorSystemLibrary(Test.java:437) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.throwAndCatchAllExceptions(Test.java:492) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.main(Test.java:515) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class ++Uncaught exception java.lang.NullPointerException in method Test.throwNullPointerException() ++Exception in thread "main" java.lang.NullPointerException ++ at Test.throwNullPointerException(Test.java:290) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.throwAndDontCatchException(Test.java:501) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++ at Test.main(Test.java:518) [file:@CMAKE_BINARY_DIR@/test/Test.class] ++executable: @CMAKE_BINARY_DIR@/test/Test.class +-- +1.8.3.1 + diff --git a/SPECS/abrt-java-connector.spec b/SPECS/abrt-java-connector.spec index 2926830..2680209 100644 --- a/SPECS/abrt-java-connector.spec +++ b/SPECS/abrt-java-connector.spec @@ -3,7 +3,7 @@ Name: abrt-java-connector Version: 1.0.6 -Release: 1%{?dist} +Release: 6%{?dist} Summary: JNI Agent library converting Java exceptions to ABRT problems Group: System Environment/Libraries @@ -11,11 +11,65 @@ License: GPLv2+ URL: https://github.com/jfilak/abrt-java-connector Source0: https://github.com/jfilak/%{name}/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz +#Patch0001: 0001-Update-the-spec-file.patch +Patch0002: 0002-Encapsulate-all-jthread_map-calls-inside-critical-se.patch +Patch0003: 0003-Add-thread-stress-test.patch +Patch0004: 0004-Make-thread-stress-test-more-robust.patch +Patch0005: 0005-Unify-reason-message-format.patch +Patch0006: 0006-Adapt-tests-to-the-recent-changes-in-formats.patch +Patch0007: 0007-Add-tests-for-reason-message-shortening.patch +Patch0008: 0008-Fix-a-bug-in-testdriver.patch +Patch0009: 0009-Add-support-for-changing-log-directory.patch +Patch0010: 0010-Make-log-output-disabled-by-default.patch +Patch0011: 0011-Add-support-for-journald-and-syslog.patch +Patch0012: 0012-Completely-disable-logging-in-ThreadStressTest.patch +Patch0013: 0013-Make-ThreadStressTest-configurable.patch +Patch0014: 0014-Add-an-abstract-to-README.patch +Patch0015: 0015-Check-error-codes-of-jvmti-functions.patch +Patch0016: 0016-Use-the-last-frame-s-class-path-for-executable.patch +Patch0017: 0017-Provide-Arch-specific-StressTest-configuration.patch +Patch0018: 0018-Fix-arch-specific-outputs.patch +#Patch0019: 0019-Update-the-spec-file.patch +Patch0020: 0020-Use-the-main-class-URL-for-executable.patch +Patch0021: 0021-Add-documentation-for-executable-option.patch +Patch0022: 0022-Exception-callback-code-optimizations.patch +Patch0023: 0023-Do-not-enter-critical-section-if-not-necessary.patch +Patch0024: 0024-Do-not-report-exceptions-caught-by-native-methods.patch +Patch0025: 0025-Update-the-missing-class-test.patch +Patch0026: 0026-Surround-all-JNI-calls-in-try-catch-all-block.patch +Patch0027: 0027-Do-not-ship-own-reporting-workflow-definitions.patch +#Patch0028: 0028-Remove-the-workflow-files-from-the-spec-file.patch +Patch0029: 0029-Speed-up-ExceptionCatch-event-callback.patch +Patch0030: 0030-Add-an-utility-for-stack-trace-analysis.patch +Patch0031: 0031-Hook-the-stack-trace-analysis-tool-in-post-create.patch +#Patch0032: 0032-Add-abrt-action-analyze-java-to-the-spec-file.patch +Patch0033: 0033-Add-test-for-analysis-tool.patch +Patch0034: 0034-Use-satyr-for-calculation-of-the-duplicates-hashes.patch +Patch0035: 0035-Add-a-manual-page-for-the-analysis-tool.patch +#Patch0036: 0036-Add-the-analysis-tool-s-manual-page-to-the-spec-file.patch +#Patch0037: 0037-Add-build-requires-for-the-analysis-tool.patch +Patch0038: 0038-Speed-up-thread-start-end-processing.patch +#Patch0039: 0039-Update-the-spec-file.patch +Patch0040: 0040-Fix-a-pair-of-defects-uncovered-by-coverity.patch +Patch0041: 0041-Make-sure-that-agent_onload-and-agent_onunload-are-p.patch +Patch0042: 0042-Add-a-test-for-multiple-calls-of-Agent_OnLoad.patch +Patch0043: 0043-Add-test-results-for-Linux-aarch64.patch + +# git is need for '%%autosetup -S git' which automatically applies all the +# patches above. Please, be aware that the patches must be generated +# by 'git format-patch' +BuildRequires: git + BuildRequires: cmake +BuildRequires: satyr-devel BuildRequires: libreport-devel +BuildRequires: abrt-devel BuildRequires: java-1.7.0-openjdk-devel +BuildRequires: systemd-devel +BuildRequires: gettext + +Requires: abrt >= 2.1.11-3 -Requires: abrt %description JNI library providing an agent capable to process both caught and uncaught @@ -23,7 +77,12 @@ exceptions and transform them to ABRT problems %prep -%setup -qn %{name}-%{commit} +# http://www.rpm.org/wiki/PackagerDocs/Autosetup +# Default '__scm_apply_git' is 'git apply && git commit' but this workflow +# doesn't allow us to create a new file within a patch, so we have to use +# 'git am' (see /usr/lib/rpm/macros for more details) +%define __scm_apply_git(qp:m:) %{__git} am +%autosetup -S git -n %{name}-%{commit} %build @@ -34,50 +93,17 @@ make %{?_smp_mflags} %install make install DESTDIR=%{buildroot} -# Remove unwanted Fedora specific workflow configuration files -%if 0%{!?fedora:1} -rm -f $RPM_BUILD_ROOT/%{_datadir}/libreport/workflows/workflow_FedoraJava.xml -rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/libreport/workflows.d/report_fedora_java.conf -rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/libreport/events.d/java_event_fedora.conf -rm -f $RPM_BUILD_ROOT%{_mandir}/man5/report_fedora_java.conf.5 -rm -f $RPM_BUILD_ROOT%{_mandir}/man5/java_event_fedora.conf.5 -%endif - -# Remove unwanted RHEL specific workflow configuration files -%if 0%{!?rhel:1} -rm -f $RPM_BUILD_ROOT/%{_datadir}/libreport/workflows/workflow_RHELJava.xml -rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/libreport/workflows.d/report_rhel_java.conf -rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/libreport/events.d/java_event_rhel.conf -rm -f $RPM_BUILD_ROOT%{_mandir}/man5/report_rhel_java.conf.5 -rm -f $RPM_BUILD_ROOT%{_mandir}/man5/java_event_rhel.conf.5 -%endif - - %files %doc LICENSE README AUTHORS %config(noreplace) %{_sysconfdir}/libreport/plugins/bugzilla_format_java.conf %config(noreplace) %{_sysconfdir}/libreport/plugins/bugzilla_formatdup_java.conf %config(noreplace) %{_sysconfdir}/libreport/events.d/java_event.conf +%{_bindir}/abrt-action-analyze-java +%{_mandir}/man1/abrt-action-analyze-java.1* %{_mandir}/man5/java_event.conf.5* %{_mandir}/man5/bugzilla_format_java.conf.5* %{_mandir}/man5/bugzilla_formatdup_java.conf.5* -%if 0%{?fedora} -%{_datadir}/libreport/workflows/workflow_FedoraJava.xml -%config(noreplace) %{_sysconfdir}/libreport/events.d/java_event_fedora.conf -%config(noreplace) %{_sysconfdir}/libreport/workflows.d/report_fedora_java.conf -%{_mandir}/man5/java_event_fedora.conf.5* -%{_mandir}/man5/report_fedora_java.conf.5* -%endif - -%if 0%{?rhel} -%{_datadir}/libreport/workflows/workflow_RHELJava.xml -%config(noreplace) %{_sysconfdir}/libreport/events.d/java_event_rhel.conf -%config(noreplace) %{_sysconfdir}/libreport/workflows.d/report_rhel_java.conf -%{_mandir}/man5/java_event_rhel.conf.5* -%{_mandir}/man5/report_rhel_java.conf.5* -%endif - # install only unversioned shared object because the package is a Java plugin # and not a system library but unfortunately the library must be placed in ld # library paths @@ -96,6 +122,36 @@ make test %changelog +* Tue Feb 11 2014 Jakub Filak - 1.0.6-6 +- Make sure that agent_onload and agent_onunload are processed only once +- Add test results for Linux-aarch64 +- Resolves: #1044756, #1063322 + +* Fri Jan 31 2014 Jakub Filak - 1.0.6-5 +- Fix a pair of defects uncovered by covscan +- Resolves: #1056584 + +* Tue Jan 28 2014 Daniel Mach - 1.0.6-4 +- Mass rebuild 2014-01-24 + +* Wed Jan 22 2014 Jakub Filak - 1.0.6-3 +- Mark stack trace with remote paths as not-reportable +- Do not provide own reporting workflows +- Code optimization +- Do not report exception caught by native functions +- Use the last frame class path for executable +- Gracefully handle JVMTI errors +- Add an abstract to README +- Add support for journald and syslog +- Make log output disabled by default +- Add support for changing log directory +- Fix a race condition causing a crash of JVM +- Related: #1051198 +- Resolves: #1051483, #1054720, #1054737, #1055581 + +* Fri Dec 27 2013 Daniel Mach - 1.0.6-2 +- Mass rebuild 2013-12-27 + * Tue Oct 01 2013 Jakub Filak - 1.0.6-1 - Fix a deadlock in GC start callback - Disable experimental features in production releases