commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r891146 - in /commons/sandbox/runtime/trunk/src: main/native/ main/native/include/ main/native/include/arch/aix/ main/native/include/arch/darwin/ main/native/include/arch/hpux/ main/native/include/arch/linux/ main/native/include/arch/solari...
Date Wed, 16 Dec 2009 07:45:50 GMT
Author: mturk
Date: Wed Dec 16 07:45:50 2009
New Revision: 891146

URL: http://svn.apache.org/viewvc?rev=891146&view=rev
Log:
-fvisibility=hidden crashes JVM probably due to typeinfo lookup

Modified:
    commons/sandbox/runtime/trunk/src/main/native/Makefile.in
    commons/sandbox/runtime/trunk/src/main/native/include/acr.h
    commons/sandbox/runtime/trunk/src/main/native/include/acr_private.h
    commons/sandbox/runtime/trunk/src/main/native/include/arch/aix/acr_arch_private.h
    commons/sandbox/runtime/trunk/src/main/native/include/arch/darwin/acr_arch_private.h
    commons/sandbox/runtime/trunk/src/main/native/include/arch/hpux/acr_arch_private.h
    commons/sandbox/runtime/trunk/src/main/native/include/arch/linux/acr_arch_private.h
    commons/sandbox/runtime/trunk/src/main/native/include/arch/solaris/acr_arch_private.h
    commons/sandbox/runtime/trunk/src/main/native/include/arch/unix/acr_arch.h
    commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch_private.h
    commons/sandbox/runtime/trunk/src/main/native/test/testsuite.c
    commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestNioByteBuffer.java

Modified: commons/sandbox/runtime/trunk/src/main/native/Makefile.in
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/Makefile.in?rev=891146&r1=891145&r2=891146&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/Makefile.in (original)
+++ commons/sandbox/runtime/trunk/src/main/native/Makefile.in Wed Dec 16 07:45:50 2009
@@ -348,31 +348,31 @@
 all: $(STATICLIB) $(SHAREDLIB) @modules@
 
 $(SRCDIR)/port/%.$(OBJ) : $(SRCDIR)/port/%.c
-	$(CC) $(CFLAGS) $(CSFLAGS) $(CPPFLAGS) $(INCLUDES) -c -o $@ $<
+	$(CC) $(CFLAGS) $(CSFLAGS) $(CPPFLAGS) -DACR_DECLARE_EXPORT $(INCLUDES) -c -o $@ $<
 
 $(SRCDIR)/shared/%.$(OBJ) : $(SRCDIR)/shared/%.c
-	$(CC) $(CFLAGS) $(CSFLAGS) $(CPPFLAGS) $(INCLUDES) -c -o $@ $<
+	$(CC) $(CFLAGS) $(CSFLAGS) $(CPPFLAGS) -DACR_DECLARE_EXPORT $(INCLUDES) -c -o $@ $<
 
 $(SRCDIR)/os/unix/%.$(OBJ) : $(SRCDIR)/os/unix/%.c
-	$(CC) $(CFLAGS) $(CSFLAGS) $(CPPFLAGS) $(INCLUDES) -c -o $@ $<
+	$(CC) $(CFLAGS) $(CSFLAGS) $(CPPFLAGS) -DACR_DECLARE_EXPORT $(INCLUDES) -c -o $@ $<
 
 $(SRCDIR)/os/$(HOST)/%.$(OBJ) : $(SRCDIR)/os/$(HOST)/%.c
-	$(CC) $(CFLAGS) $(CSFLAGS) $(CPPFLAGS) $(INCLUDES) -c -o $@ $<
+	$(CC) $(CFLAGS) $(CSFLAGS) $(CPPFLAGS) -DACR_DECLARE_EXPORT $(INCLUDES) -c -o $@ $<
 
 $(SRCDIR)/os/$(HOST)/%.$(OBJ) : $(SRCDIR)/os/$(HOST)/%.S
 	$(AS) $(ASFLAGS) -o $@ $<
 
 $(SRCDIR)/srclib/bzip2/%.$(OBJ) : $(SRCDIR)/srclib/bzip2/%.c
-	$(CC) $(CFLAGS) $(CSFLAGS) $(CPPFLAGS) $(INCLUDES) -c -o $@ $<
+	$(CC) $(CFLAGS) $(CSFLAGS) $(CPPFLAGS) -DACR_DECLARE_EXPORT $(INCLUDES) -c -o $@ $<
 
 $(SRCDIR)/srclib/expat/%.$(OBJ) : $(SRCDIR)/srclib/expat/%.c
-	$(CC) $(CFLAGS) $(CSFLAGS) $(CPPFLAGS) -DHAVE_EXPAT_CONFIG_H $(INCLUDES) -I$(TOPDIR)/srclib/expat
-c -o $@ $<
+	$(CC) $(CFLAGS) $(CSFLAGS) $(CPPFLAGS) -DACR_DECLARE_EXPORT -DHAVE_EXPAT_CONFIG_H $(INCLUDES)
-I$(TOPDIR)/srclib/expat -c -o $@ $<
 
 $(SRCDIR)/srclib/regex/%.$(OBJ) : $(SRCDIR)/srclib/regex/%.c
-	$(CC) $(CFLAGS) $(CSFLAGS) $(CPPFLAGS) $(INCLUDES) -c -o $@ $<
+	$(CC) $(CFLAGS) $(CSFLAGS) $(CPPFLAGS) -DACR_DECLARE_EXPORT $(INCLUDES) -c -o $@ $<
 
 $(SRCDIR)/srclib/zlib/%.$(OBJ) : $(SRCDIR)/srclib/zlib/%.c
-	$(CC) $(CFLAGS) $(CSFLAGS) $(CPPFLAGS) $(INCLUDES) -c -o $@ $<
+	$(CC) $(CFLAGS) $(CSFLAGS) $(CPPFLAGS) -DACR_DECLARE_EXPORT $(INCLUDES) -c -o $@ $<
 
 $(SRCDIR)/modules/util/sqlite/%.$(OBJ) : $(SRCDIR)/modules/util/sqlite/%.c
 	$(CC) $(CFLAGS) $(CSFLAGS) -D_HAVE_SQLITE_CONFIG_H $(CPPFLAGS) $(INCLUDES) -c -o $@ $<

Modified: commons/sandbox/runtime/trunk/src/main/native/include/acr.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/acr.h?rev=891146&r1=891145&r2=891146&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/acr.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/acr.h Wed Dec 16 07:45:50 2009
@@ -385,6 +385,7 @@
 
 #if defined(_WIN32)
 
+#define ACR_JNIEXPORT                     JNIEXPORT
 #define ACR_DECLARE_LOCAL
 #if defined(ACR_DECLARE_STATIC)
 #define ACR_DECLARE(type)                   type __stdcall
@@ -444,6 +445,7 @@
 
 #elif defined(__GNUC__) && (__GNUC__ >= 4)
 
+#define ACR_JNIEXPORT                     JNIEXPORT __attribute__ ((visibility("default")))
 #if defined(ACR_DECLARE_STATIC)
 #define ACR_DECLARE(type)                   type
 #define ACR_DECLARE_NONSTD(type)            type
@@ -455,6 +457,7 @@
 #define ACR_DECLARE_DATA                  __attribute__ ((visibility("default")))
 #define ACR_DECLARE_LOCAL                 __attribute__ ((visibility("hidden")))
 #else
+
 /**
  * The public ACR functions are declared with ACR_DECLARE(), so they may
  * use the most appropriate calling convention.  Public ACR functions with
@@ -504,6 +507,7 @@
 
 #else /* !_WIN32 && !__GNUC__ >= 4 */
 
+#define ACR_JNIEXPORT                     JNIEXPORT
 #define ACR_DECLARE_LOCAL
 /**
  * The public ACR functions are declared with ACR_DECLARE(), so they may

Modified: commons/sandbox/runtime/trunk/src/main/native/include/acr_private.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/acr_private.h?rev=891146&r1=891145&r2=891146&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/acr_private.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/acr_private.h Wed Dec 16 07:45:50
2009
@@ -38,13 +38,13 @@
 #define ACR_UTIL_CLASS_PATH         "org/apache/commons/runtime/util/"
 
 #define ACR_JNI_EXPORT_DECLARE(RT, CL, MN)  \
-    JNIEXPORT RT JNICALL Java_org_apache_commons_runtime_##CL##_##MN
+    ACR_JNIEXPORT RT JNICALL Java_org_apache_commons_runtime_##CL##_##MN
 #define ACR_IO_EXPORT_DECLARE(RT, CL, MN)  \
-    JNIEXPORT RT JNICALL Java_org_apache_commons_runtime_io_##CL##_##MN
+    ACR_JNIEXPORT RT JNICALL Java_org_apache_commons_runtime_io_##CL##_##MN
 #define ACR_NET_EXPORT_DECLARE(RT, CL, MN)  \
-    JNIEXPORT RT JNICALL Java_org_apache_commons_runtime_net_##CL##_##MN
+    ACR_JNIEXPORT RT JNICALL Java_org_apache_commons_runtime_net_##CL##_##MN
 #define ACR_UTIL_EXPORT_DECLARE(RT, CL, MN)  \
-    JNIEXPORT RT JNICALL Java_org_apache_commons_runtime_util_##CL##_##MN
+    ACR_JNIEXPORT RT JNICALL Java_org_apache_commons_runtime_util_##CL##_##MN
 
 
 /* undef min/max macros

Modified: commons/sandbox/runtime/trunk/src/main/native/include/arch/aix/acr_arch_private.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/arch/aix/acr_arch_private.h?rev=891146&r1=891145&r2=891146&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/arch/aix/acr_arch_private.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/arch/aix/acr_arch_private.h Wed
Dec 16 07:45:50 2009
@@ -36,7 +36,7 @@
  */
 #define ACR_PLATFORM_CLASS_PATH   ACR_CLASS_PATH "platform/aix/"
 #define ACR_JNI_PLATFORM_DECLARE(RT, CL, FN)  \
-    JNIEXPORT RT JNICALL Java_org_apache_commons_runtime_platform_aix_##CL##_##FN
+    ACR_JNIEXPORT RT JNICALL Java_org_apache_commons_runtime_platform_aix_##CL##_##FN
 
 #define NOTREACHED(X)    return (X)
 

Modified: commons/sandbox/runtime/trunk/src/main/native/include/arch/darwin/acr_arch_private.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/arch/darwin/acr_arch_private.h?rev=891146&r1=891145&r2=891146&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/arch/darwin/acr_arch_private.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/arch/darwin/acr_arch_private.h Wed
Dec 16 07:45:50 2009
@@ -41,7 +41,7 @@
  */
 #define ACR_PLATFORM_CLASS_PATH   ACR_CLASS_PATH "platform/darwin/"
 #define ACR_JNI_PLATFORM_DECLARE(RT, CL, FN)  \
-    JNIEXPORT RT JNICALL Java_org_apache_commons_runtime_platform_darwin_##CL##_##FN
+    ACR_JNIEXPORT RT JNICALL Java_org_apache_commons_runtime_platform_darwin_##CL##_##FN
 
 #define NOTREACHED(X)    return (X)
 

Modified: commons/sandbox/runtime/trunk/src/main/native/include/arch/hpux/acr_arch_private.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/arch/hpux/acr_arch_private.h?rev=891146&r1=891145&r2=891146&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/arch/hpux/acr_arch_private.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/arch/hpux/acr_arch_private.h Wed
Dec 16 07:45:50 2009
@@ -37,7 +37,7 @@
  */
 #define ACR_PLATFORM_CLASS_PATH   ACR_CLASS_PATH "platform/hpux/"
 #define ACR_JNI_PLATFORM_DECLARE(RT, CL, FN)  \
-    JNIEXPORT RT JNICALL Java_org_apache_commons_runtime_platform_hpux_##CL##_##FN
+    ACR_JNIEXPORT RT JNICALL Java_org_apache_commons_runtime_platform_hpux_##CL##_##FN
 
 #define NOTREACHED(X)    return (X)
 

Modified: commons/sandbox/runtime/trunk/src/main/native/include/arch/linux/acr_arch_private.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/arch/linux/acr_arch_private.h?rev=891146&r1=891145&r2=891146&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/arch/linux/acr_arch_private.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/arch/linux/acr_arch_private.h Wed
Dec 16 07:45:50 2009
@@ -38,7 +38,7 @@
  */
 #define ACR_PLATFORM_CLASS_PATH   ACR_CLASS_PATH "platform/linux/"
 #define ACR_JNI_PLATFORM_DECLARE(RT, CL, FN)  \
-    JNIEXPORT RT JNICALL Java_org_apache_commons_runtime_platform_linux_##CL##_##FN
+    ACR_JNIEXPORT RT JNICALL Java_org_apache_commons_runtime_platform_linux_##CL##_##FN
 
 #define NOTREACHED(X)       //
 

Modified: commons/sandbox/runtime/trunk/src/main/native/include/arch/solaris/acr_arch_private.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/arch/solaris/acr_arch_private.h?rev=891146&r1=891145&r2=891146&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/arch/solaris/acr_arch_private.h
(original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/arch/solaris/acr_arch_private.h
Wed Dec 16 07:45:50 2009
@@ -39,7 +39,7 @@
  */
 #define ACR_PLATFORM_CLASS_PATH   ACR_CLASS_PATH "platform/solaris/"
 #define ACR_JNI_PLATFORM_DECLARE(RT, CL, FN)  \
-    JNIEXPORT RT JNICALL Java_org_apache_commons_runtime_platform_solaris_##CL##_##FN
+    ACR_JNIEXPORT RT JNICALL Java_org_apache_commons_runtime_platform_solaris_##CL##_##FN
 
 #define NOTREACHED(X)       //
 

Modified: commons/sandbox/runtime/trunk/src/main/native/include/arch/unix/acr_arch.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/arch/unix/acr_arch.h?rev=891146&r1=891145&r2=891146&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/arch/unix/acr_arch.h (original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/arch/unix/acr_arch.h Wed Dec 16
07:45:50 2009
@@ -49,7 +49,7 @@
 
 #define ACR_ARCHIMPL_CLASS_PATH   ACR_CLASS_PATH "platform/unix/"
 #define ACR_JNI_ARCHIMPL_DECLARE(RT, CL, FN)  \
-    JNIEXPORT RT JNICALL Java_org_apache_commons_runtime_platform_unix_##CL##_##FN
+    ACR_JNIEXPORT RT JNICALL Java_org_apache_commons_runtime_platform_unix_##CL##_##FN
 
 #define ACR_FTOK_ID          'a'
 #define ACR_MIN_FREAD_LEN    4096

Modified: commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch_private.h
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch_private.h?rev=891146&r1=891145&r2=891146&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch_private.h
(original)
+++ commons/sandbox/runtime/trunk/src/main/native/include/arch/windows/acr_arch_private.h
Wed Dec 16 07:45:50 2009
@@ -77,9 +77,9 @@
 #define ACR_PLATFORM_CLASS_PATH   ACR_CLASS_PATH "platform/windows/"
 
 #define ACR_JNI_ARCHIMPL_DECLARE(RT, CL, FN)  \
-    JNIEXPORT RT JNICALL Java_org_apache_commons_runtime_platform_windows_##CL##_##FN
+    ACR_JNIEXPORT RT JNICALL Java_org_apache_commons_runtime_platform_windows_##CL##_##FN
 #define ACR_JNI_PLATFORM_DECLARE(RT, CL, FN)  \
-    JNIEXPORT RT JNICALL Java_org_apache_commons_runtime_platform_windows_##CL##_##FN
+    ACR_JNIEXPORT RT JNICALL Java_org_apache_commons_runtime_platform_windows_##CL##_##FN
 
 #define NOTREACHED(X)    return (X)
 

Modified: commons/sandbox/runtime/trunk/src/main/native/test/testsuite.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/test/testsuite.c?rev=891146&r1=891145&r2=891146&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/test/testsuite.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/test/testsuite.c Wed Dec 16 07:45:50 2009
@@ -452,7 +452,7 @@
     i = ACR_StrMatchA(argv[0], argv[1], &mp, 0);
     printf("smatch returned  %d\n", i);
     printf("smatch ended on '%s'\n", argv[0] + mp);
-#if !defined(WIN32)
+#if 0 
     {
         char buf[1024];
 

Modified: commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestNioByteBuffer.java
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestNioByteBuffer.java?rev=891146&r1=891145&r2=891146&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestNioByteBuffer.java
(original)
+++ commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestNioByteBuffer.java
Wed Dec 16 07:45:50 2009
@@ -140,13 +140,10 @@
             assertEquals("Capacity" + i, sizes[i], a[i].capacity());
         }
 
-        /* WARNING: Free only the first array element
-         * because they all share the same memory
-         */
         NioByteBuffer.free(a[0]);
 
     }
-
+    
     public void testArrayCreateIdx()
         throws Exception
     {
@@ -159,9 +156,9 @@
             assertEquals("Capacity" + i, sizes[i+2], a[i].capacity());
         }
 
-        /* WARNING: Free only the first array element
-         * because they all share the same memory
-         */
+        // WARNING: Free only the first array element
+        // because they all share the same memory
+        //
         NioByteBuffer.free(a[0]);
 
     }
@@ -178,9 +175,8 @@
             assertEquals("Capacity" + i, sizes[i], a[i].capacity());
         }
 
-        /* WARNING: Free only the first array element
-         * because they all share the same memory
-         */
+        // WARNING: Free only the first array element
+        // because they all share the same memory
         NioByteBuffer.free(a[0]);
 
     }
@@ -200,9 +196,8 @@
             assertEquals("Capacity" + i, sizes[i+2], a[i].capacity());
         }
 
-        /* WARNING: Do not free any Buffer.
-         * Use Pointer.free()
-         */
+        // WARNING: Do not free any Buffer.
+        // Use Pointer.free()
         mem.free();
 
     }
@@ -222,9 +217,8 @@
         // Aligned size
         // 104 + 1000 = 1104
         assertEquals("Size", 1104L, mem.sizeof());
-        /* WARNING: Do not free any Buffer.
-         * Use Pointer.free()
-         */
+        // WARNING: Do not free any Buffer.
+        // Use Pointer.free()
         mem.free();
 
     }



Mime
View raw message