commit e946fe33ab21d907e587402572effac4d9aba000
Author: Sven Gothel
Date: Tue Jun 25 13:54:09 2013 +0200
TAG RC12 / Android 0914013
commit c28d5c8d0d83670a548671a1d0da55e3447ea0c7
Author: Sven Gothel
Date: Tue Jun 25 09:31:04 2013 +0200
Refine commit 5e01e993aeba4e95fc8aa6e75b3e295011e27bbb, skip Buffers.sizeOfBufferElem(..) call.
commit 72f60a534db7c0b731d4dca83481679817ad7574
Author: Sven Gothel
Date: Tue Jun 25 09:04:16 2013 +0200
UnixDynamicLinkerImpl: Unify impl. of openLibraryLocal(..), openLibraryGlobal(..) and lookupSymbolGlobal(..) - removing duplicate code.
commit 5e01e993aeba4e95fc8aa6e75b3e295011e27bbb
Author: Sven Gothel
Date: Tue Jun 25 09:03:28 2013 +0200
AbstractBuffer: Generalize 'capacity' calculation, since we may encounter a byte-buffer w/ given elementSize semantics
commit 6ff3fe730671b0bfed61b56e1179aaecd39f53a5
Author: Sven Gothel
Date: Tue Jun 25 06:56:44 2013 +0200
Fix SingletonInstanceServerSocket.kill(): Needs to mark alive=false in case of JVM shutdown!
commit 0cce9a0eb5ab3ca25531c8fb8a9ef8be5c758487
Author: Sven Gothel
Date: Mon Jun 24 12:00:50 2013 +0200
Fix commit e46b51f75b550bc0faf70ae18f526d466d8180f3
Funny .. subclasses didn't compile in test compilation locally.
commit e46b51f75b550bc0faf70ae18f526d466d8180f3
Author: Sven Gothel
Date: Mon Jun 24 11:53:02 2013 +0200
SingletonInstance: Add stats about time/attempts, subtract real-time delta from remaining amount.
commit c5fcd2215ed1c7634d8976ad914506c3ec674a2d
Author: Sven Gothel
Date: Mon Jun 24 08:32:06 2013 +0200
Scripts: Build macosx w/ java7 targeting java6 in build-macosx.
commit a7545f4fda73c215cff0da7256417bc1d1bd450b
Author: Sven Gothel
Date: Sat Jun 22 07:18:14 2013 +0200
Fix commit eb842815498f5926828b49c48fffce22fc9586a2: Adding missing files
commit 26bd0f9aa06c3294198f961fadff04ecd8e93cdc
Author: Sven Gothel
Date: Fri Jun 21 12:01:52 2013 +0200
Fix jogamp-androidtask.xml's keytool and jarsigner options for Java6 / Android compatibility w/ Java7 toolchain.
commit b375bf84b56b391aa014154de2e7129de9af909a
Author: Sven Gothel
Date: Fri Jun 21 07:22:14 2013 +0200
ProcAddressTable: Fix regressions: getField(..) -> getDeclaredField(..), incl. access check; Utilize 'AccessibleObject.setAccessible(Field[], true)' for performance.
commit f55074132e0369cb09a6fc4bda69ab936bd820fa
Author: Sven Gothel
Date: Fri Jun 21 04:30:49 2013 +0200
ProcAddressTable: If using a SecurityManager 'checkAllLinkPermission()' instead of 'checkAllPermissions' if accessing the cached function handles.
commit adb3d51d67b10a68ec8af01765a52b1da185637e
Author: Sven Gothel
Date: Fri Jun 21 04:17:30 2013 +0200
scripts runtests ..
commit b82f1b112a57fe2f36ba505fd837e3c6fba5fefa
Author: Sven Gothel
Date: Fri Jun 21 03:45:49 2013 +0200
Scripts: Use a local hostname for JOGAMP_JAR_CODEBASE for security testing
commit eb842815498f5926828b49c48fffce22fc9586a2
Author: Sven Gothel
Date: Fri Jun 21 03:45:07 2013 +0200
Security: Tighten DynamicLinker*, NativeLibrary and DynamicLibraryBundle access (2)
- Completes 23341a2df2d2ea36784a16fa1db8bc7385351a12
- Replace 'DynamicLinker' interface w/ well documented one
- All DynamicLinker methods are now considered secure, i.e.:
- open/lookup and close utilize reference counting on handle via a hash map.
- lookupSymbol(..) and close(..) impl. validate the passed library handle
whether it's retrieved via open*.
This is the fast path, not that expensive.
- lookupSymbolGlobal(..) performs
Check acccess of 'new RuntimePermission("loadLibrary.*")' if SecurityManager is installed.
This is the slow path.
- DynamicLibraryBundleInfo now reflects the security requirements,
i.e. whether priviledged access is needed.
commit 19bef683d38f4ce7b0dcb5c516244c6f87504e41
Author: Sven Gothel
Date: Fri Jun 21 02:17:44 2013 +0200
Fix regression of f69831574d4927d03d40c330d0b047d8c89622a4: Use getDeclaredField() and setAccessible(true) due to package private handle fields.
commit 2d811311976077bae9522afe533a140b97e62f8f
Author: Sven Gothel
Date: Thu Jun 20 21:23:16 2013 +0200
Scripts Windows / JOGAMP_JAR_CODEBASE: No double quotes, otherwise they would be added to MANIFEST
commit 302a821f0b9bd29e8aa9a1f3ddae1d5ec846d6f6
Author: Sven Gothel
Date: Thu Jun 20 20:27:21 2013 +0200
Scripts: Windows java run: Use 6u45
commit b5fe100798071110119993be89ff66e313f32b96
Author: Sven Gothel
Date: Thu Jun 20 20:25:04 2013 +0200
Script: Add adb logcat script
commit f69831574d4927d03d40c330d0b047d8c89622a4
Author: Sven Gothel
Date: Thu Jun 20 20:06:35 2013 +0200
ProcAddressTable: Make all handles package private, use local PROCADDRESS_VAR_PREFIX instance, add checkAllPermissions() for reset() and initEntry(..)
- Generated ProcAddressTable's function handles are all package private
- Generated ProcAddressTable's visibility can be set via 'AccessControl' config, default: public.
- ProcAddressTable's reset() and initEntry(..) perform checkAllPermissions() 1st.
commit 8cabcd2de8b46c42dffcaaf46ccc2dc4d092ebba
Author: Sven Gothel
Date: Thu Jun 20 20:01:38 2013 +0200
DynamicLookupHelper: Add secure isFunctionAvailable(..); NativeLibrary: Add TODO comments, re protected lookup functions.
commit 9a0d4c81e8c38f454d7bb5cde433a32194d410fb
Author: Sven Gothel
Date: Thu Jun 20 19:51:57 2013 +0200
DynamicLinker*: Proper Override notation
commit 2d8e25398e929f553c4524e9c57f083d90ba4e08
Author: Sven Gothel
Date: Thu Jun 20 08:59:55 2013 +0200
Security: Gluegen generated native methods w/ 'pass through function pointer' _must_ be private!
commit 23341a2df2d2ea36784a16fa1db8bc7385351a12
Author: Sven Gothel
Date: Thu Jun 20 08:11:29 2013 +0200
Security: Tighten DynamicLinker*, NativeLibrary and DynamicLibraryBundle access.
commit 6704fab767307b89fa21250c20f1dab56323ffac
Author: Sven Gothel
Date: Thu Jun 20 04:29:21 2013 +0200
Bug 758: Fix scripts and ant build files to work w/ Java7 (default now) producing Java6 bytecode ; Apply JAR Manifest tags: Sealed, Permissions and Codebase
commit 6c30050195849cd385422fc6e65230c16b818215
Author: Sven Gothel
Date: Wed Jun 19 05:29:59 2013 +0200
Fix URLCompositionTest for Bug 757 (3): If file, replace '/' in expected result w/ OS specific File.separatorChar
Take 3 (duh!): JRE impl. varies .. i.e. plain URL w/o JAR path differs from URL w/ JAR scheme on Windows .. well.
commit 4d35974c6b87692bc1c3f6e6b7bb674a7a478053
Author: Sven Gothel
Date: Wed Jun 19 05:19:17 2013 +0200
Fix URLCompositionTest for Bug 757 (2): If file, replace '/' in expected result w/ OS specific File.separatorChar
The JAR entry shall stay untouched, i.e. separator is platform independent '/'.
commit b97666cf0a6d49c593d565d0eba8af92bcf5eb94
Author: Sven Gothel
Date: Wed Jun 19 05:05:29 2013 +0200
Fix URLCompositionTest for Bug 757: If file, replace '/' in expected result w/ OS specific File.separatorChar
commit 4376174ad35fdaf76f59430328582e913f468674
Author: Sven Gothel
Date: Wed Jun 19 04:44:14 2013 +0200
Fix Bug 757: Regression of URL to URI conversion (Encoded path not compatible w/ file scheme.
Regression of (Bug 683, Commit b98825eb7cfb61aead4a7dff57471cd2d2c26823).
The URI encoded path cannot be read by File I/O (if file scheme), since the latter
requests an UTF8/16 name, not an URI encoded name (i.e. %20 for space).
The encoded URL is produced if calling 'uri.toURL()' and hence
the new 'IOUtil.toURL(URI)' provides a custom conversion recovering the UTF name via 'new File(uri).getPath()'.
Tested w/
- synthetic URI/URL coposition (unit test)
- manual w/ moving 'build' to 'build öä lala' for gluegen, joal and jogl.
+++
Misc.:
- 'URI JarUtil.getURIDirname(URI)' -> 'URI IOUtil.getDirname(URI)'
++
commit 88dca02541d96f68a892ae7824e9e1b29793ae55
Author: Sven Gothel
Date: Tue Jun 18 10:42:52 2013 +0200
Refine 4feb65517ae4a4e2b9b04cdfc4b85582cb8b9784: Handle verbose error cases post catch block, i.e. exception (if occured) and dlerror value.
commit 4feb65517ae4a4e2b9b04cdfc4b85582cb8b9784
Author: Sven Gothel
Date: Tue Jun 18 01:41:30 2013 +0200
Robostness: Catch Throwables on NativeLibrary.open(..) and be verbose in DEBUG mode ; DynamicLinker: Add 'String getLastError()'.
commit e18771cc020f6fd42f6427540c079e48699ab310
Author: Sven Gothel
Date: Mon Jun 17 10:09:32 2013 +0200
Complete 5d211c6fa6a0452cc4569712e436184e34504a88: Remove generate.nativelibrary.sources and dynlink* gluegen files due to manual impl.
commit 5d211c6fa6a0452cc4569712e436184e34504a88
Author: Sven Gothel
Date: Sun Jun 16 19:16:31 2013 +0200
Fix DynamicLinker Impl: Add Bionic specialization using Bionic's non POSIX values; Using same pattern for Mac OS X.
Add Bionic specialization using Bionic's non POSIX values
- derive from UnixDynamicLinkerImpl
- specify own flag and mode values
- use UnixDynamicLinkerImpl native code
Using same pattern for Mac OS X
- derive from UnixDynamicLinkerImpl
- specify own flag and mode values
- use UnixDynamicLinkerImpl native code
- drop MacOSXDynamicLinkerImpl native code
commit d01cb422c4621fbc1b5ea2bcd7d19f3ff8602715
Author: Sven Gothel
Date: Sat Jun 15 05:27:51 2013 +0200
Fix CStruct APT File Location - Threw FileNotFoundException w/ Java7
commit a7802a2ab90a68ecbba962149a335f975fce24e7
Author: Sven Gothel
Date: Fri Jun 14 04:40:39 2013 +0200
GlueGen (Compile Time): Add 'CStruct' Annotation Processor (APT) to 'gluegen' C Structs on-the-fly (2-pass actually).
Convenient annotation processing (APT) hooked to 'javac' (1.6) via gluegen.jar META-INF
service provider 'javax.annotation.processing.Processor' -> 'com.jogamp.gluegen.structgen.CStructAnnotationProcessor'.
Am implicit APT / JAVAC would be possible, however - to have a proper process
the unit test utilizes an explicit 2 pass run:
Original code from Michael Bien's 'superglue' git://github.com/mbien/superglue.git,
finally merged to GlueGen (as once intended).
Note: The APT javac pass requires to use 'gluegen.jar' instead of 'gluegen-rt.jar' !
The 2-pass process also alows using the runtime gluegen-rt.jar and hence ensures
clean namespace check at compilation.
commit 3cf28f2980b1593e4b32230d5206decd6afe2cbb
Author: Britta Eckhardt
Date: Thu Jun 13 20:53:44 2013 +0200
Fix Bug 749: Add Support for Solaris SPARC 32bit
commit 1fedf87d2808ea1afa51ec4d6432a8e5379ae07e
Author: Sven Gothel
Date: Thu Jun 13 20:35:48 2013 +0200
Android SDK changes: Add /build-tools/17.0.0 to PATH
commit eabc810f2ed3b1680ac101e828348d49ee939e1d
Author: Sven Gothel
Date: Thu Jun 13 20:34:50 2013 +0200
Fix Bug 751 OSX Java-6: Derive host/target-rt jar file from 'java.home'.
commit 1a01dce6c42b398cdd68d405828774a3ab366456
Author: Sven Gothel
Date: Tue Jun 11 16:25:48 2013 +0200
Bug 752: Review Code Vulnerabilities (Permission Checks of new exposed code and privileged access)
This review focuses on how we perform permission checks,
or better - do we circumvent some assuming full privileges ?
Some native methods do need extra permission validation, i.e. loading native libraries.
Further more AccessController.doPrivileged(..) shall not cover generic code
exposing a critical feature to the user.
Further more .. we should rely on the SecuritManager, i.e. AccessControlContext's
'checkPermission(Permission)' code to comply w/ fine grained permission access.
It is also possible to have full permission w/o having any certificates (-> policy file).
+++
We remove implicit AccessController.doPrivileged(..) from within our trusted code
for generic methods, like Property access, temp. files.
+++
SecurityUtil:
- Remove 'getCommonAccessControlContext(Class> clz)',
which returned a local AccessControlContext for later restriction
if the passed class contains all certificates as the 'trusted' GlueGen class has.
- Simply expose convenient permission check methods relying on
SecurityManager / AccessControlContext.
PropertyAccess:
- 'protected static void addTrustedPrefix(..)' requires AllPermissions if SecurityManager is installed.
- Remove implicit doPrivileged(..) triggered by passed AccessControlContext instance,
only leave it for trusted prefixes.
IOUtil:
- Remove all doPrivileged(..) - Elevation shall be performed by caller.
DynamicLinker:
- 'public long openLibraryLocal(..)' and 'public long openLibraryGlobal(..)'
may throw SecurityException, if a SecurityManager is installed and the dyn. link permission
is not granted in the calling code.
Implemented in their respective Unix, OSX and Windows manifestation.
Caller has to elevate privileges via 'doPrivileged(..) {}' !
+++
Tests:
- Property access
- File access
- Native library loading
Manual Applet test (unsigned, but w/ SecurityManager and policy file):
> gluegen/test/applet
Applet has been tested w/ signed JAR w/ Firefox and Java7 on GNU/Linux as well.
Manual Application test (unsigned, but w/ SecurityManager and policy file):
com.jogamp.junit.sec.TestSecIOUtil01
- Run w/ SecurityManager and policy file:
- gluegen/scripts/runtest-secmgr.sh
- Run w/o SecurityManager:
- gluegen/scripts/runtest.sh
commit 377d9de1ff1e2fabcd9bb7f65c0318f3c890392c
Author: Sven Gothel
Date: Sun Jun 9 06:00:47 2013 +0200
Fix Bug 683 part1b: Add IOUtil.getRelativeOf(URL, ..), wrapper for URI for convenience (JOGL ShaderCode) and bwd. compatibility
commit 83cc11676314488ca0669366933e807e8fdead87
Author: Sven Gothel
Date: Sun Jun 9 05:39:51 2013 +0200
Bug 747: AndroidVersion: HashMap -> IntObjectHashMap
commit b98825eb7cfb61aead4a7dff57471cd2d2c26823
Author: Sven Gothel
Date: Sun Jun 9 05:33:16 2013 +0200
Fix Bug 683 part1: IOUtil, JarUtil, TempJarCache, .. uses URI instead of URL to remove DNS Lookups etc ..
commit 959d6d83ec26152343d538287c02eeebf0dcf238
Author: Sven Gothel
Date: Fri May 31 06:17:57 2013 +0200
Enhance VersionNumber*: Use only RegExp and cache default (no wrapped whitespace tokenizer); String match: Store end-of-match and flag defined components.
commit e612416fd3ea802d5fa572729f035e5e64674349
Author: Sven Gothel
Date: Sun May 5 13:32:51 2013 +0200
RecursiveThreadGroupLockImpl01Unfairish: Fix DEBUG output
commit 6dd403b5b460e58a4b1cb3ed3e522355f50901b7
Author: Sven Gothel
Date: Mon Apr 29 19:33:55 2013 +0200
Buffers: getRemainingBytes(Object) -> remainingBytes(Object); sizeOfBufferElem(Buffer) -> sizeOfBufferElem(Object) to include NativeBuffer>
Misc:
- Add remainingElem(Object buffer).
- Removed 'sizeOfBufferType(Class> bufferType)', since we don't use such calling convention w/ class type
Note: remainingBytes(..) exist to allow using only one branch traversal to return the remaining size in bytes
instead of 2, remaining(obj) and sizeOfBufferElem(obj).
Note: The methods can take NativeBuffer> as an argument.
commit 35e932c32dad33693caa249a8139708412e8d798
Author: Sven Gothel
Date: Sat Apr 27 06:42:36 2013 +0200
Buffers: Add 'sizeOfBufferType(Class> bufferType)'
commit 5039f22bf0a89d658f613d14000e71be4e27f56a
Author: Sven Gothel
Date: Sat Apr 27 04:50:47 2013 +0200
Buffers: Expose 'getRemainingBytes(Object buffer)'
commit b5ede1f7779bb55e25df4a5724c72f79d8f96640
Author: Sven Gothel
Date: Fri Apr 26 05:14:20 2013 +0200
VersionNumber*: Add static final 'zeroVersion' for convenience and identity.
commit ef274002b64850b275fe9867026a89987b3169e0
Author: Sven Gothel
Date: Wed Apr 24 04:58:10 2013 +0200
Adding scripts to check all JogAmp native ARM libraries ; check-glibc.sh checks all glibc version ..
commit 49e4b614e97a97bf7b501cf402a3e9871b997222
Author: Sven Gothel
Date: Tue Apr 23 23:28:45 2013 +0200
Revert "make/lib/gluegen-cpptasks-linux-armv6[hf].xml: Set property 'useGCCARMTargetArchAndFloatOptions' indicating ARM arch & float gcc options are desired."
This reverts commit 025795f5011b374e5d6a5ab254e9d5a594d83595.
Extra state/property is not required since we can utilize propery 'isCrosscompilation'
commit 025795f5011b374e5d6a5ab254e9d5a594d83595
Author: Sven Gothel
Date: Tue Apr 23 23:18:40 2013 +0200
make/lib/gluegen-cpptasks-linux-armv6[hf].xml: Set property 'useGCCARMTargetArchAndFloatOptions' indicating ARM arch & float gcc options are desired.
commit 9267c581b199060ded0ddfa0258ff6bff4ba2163
Author: Sven Gothel
Date: Tue Apr 23 22:59:16 2013 +0200
Fix Bug 650: Use toolchain default arch & float options for default arm cc/ld target in make/gluegen-cpptasks-base.xml
Specialized arch & float arm options are defined in
- lib/gluegen-cpptasks-linux-armv6.xml (armv5te + softfp), or
- lib/gluegen-cpptasks-linux-armv6hf.xml (armv6 + hardfp)
commit 3b7ea9f67487be8f133c19b493b632fc579c5049
Author: Sven Gothel
Date: Tue Apr 23 22:58:38 2013 +0200
Modify linux-arm scripts for new toolchain (crosstools-ng) ; gluegen-cpptasks-linux-armv6hf.xml: Enable cc-arg '-mfloat-abi=hard' ; Add script make*all.sh
commit eb8ba86c01d502a04dc50150bda5f5b71dc03ca5
Author: Sven Gothel
Date: Sun Apr 21 09:01:01 2013 +0200
glibc-compat-symbols.h: Add __arm__ -> GLIBC_2.4 ; default is now GLIBC_2.2.5 // Still minimum required is GLIBC_2.4!
commit 04606a7afa8aa06b975bf6fca84517bb311e613b
Author: Sven Gothel
Date: Sun Apr 21 08:36:21 2013 +0200
Add 'glibc-compat-symbols.h' to force usage of minimal GLIBC symbols currently for memcpy only, used in our x86_32 and default gcc toolchain cmake file.
Note: JogAmp's minimum GLIBC is 2.4 due to '__stack_chk_fail' (stack overflow checking)
GLIBC 2.4 - March 2006 - Standard for LSB 4.0, Used in SLES 10
We could add compile/link option '-fno-stack-protector', however stack protection seems reasonable
and a pre 2006 distribution a bit too 'far fetched' for our multimedia bindings anyway.
+++
Added convenient script 'make/scripts/check-glibc-version.sh' to sort and list GLIBC versions per symbol.
+++
Besides openal-soft (commit 554b34927cd6a2e0c0ce227108ebf8521bcba889),
jogamp modules do not reference any GLIBC symbols > 2.4 per default!
If so, 'glibc-compat-symbols.h' should be included per default!
commit 796192797bc65f5eff91f29a5abee9776dcf2ea3
Author: Sven Gothel
Date: Sun Apr 21 05:06:20 2013 +0200
build.xml: fix intendations
commit f0f098a0de19d48b290eadb091c6930689b2e327
Author: Sven Gothel
Date: Sat Apr 20 23:22:37 2013 +0200
make/gluegen-cpptasks-base.xml: Expose evaluated 'isI386' and 'isAMD64' property, allowing to trigger x86_64 -> x86_32 crosscompilation.
commit 588b47fd4c0784cd48bbe19890f4a0074f389cf0
Author: Sven Gothel
Date: Tue Apr 16 04:12:47 2013 +0200
VersionNumber: Add API doc, use final int values, remove protected 'nop' ctor; Add VersionNumberString [extends VersionNumber] which additionally holds the orig. string value.
commit 86f5e7eac7544d2511b70c2142634c89c69d0594
Author: Sven Gothel
Date: Sat Apr 13 23:04:01 2013 +0200
Fix Bug 715: Don't modify 'carray' pointer returned from GetPrimitiveArrayCritical(..)
The 'carray' pointer returned from GetPrimitiveArrayCritical(..) was moved about the array offset
and used in ReleasePrimitiveArrayCritical(..) to release the pinpointed memory.
Even though this 'is' a bug by violating the _sparse_ specification, Hotspot impl. doesn't use the value at all (NOP)
and hence this code didn't produce an error since .. (Same w/ Dalvik).
Now the array offset is added while passing the carray pointer to the native function call
and hence is no more modified and the orig. value is passed to ReleasePrimitiveArrayCritical(..).
Tested w/ GlueGen unit tests and all JOGL unit tests (on Linux x64 w/ 'a' hotspot VM).
commit 47333929fd4e563d61996654d2a435b52b904ef0
Author: Sven Gothel
Date: Sat Apr 13 23:00:09 2013 +0200
Bug 715: Adding unit test w/ 'intArrayCopy(int *dest, int *src, int num)' to test array offset working correct.
The 'carray' pointer returned from GetPrimitiveArrayCritical(..) is moved about the array offset
and used in ReleasePrimitiveArrayCritical(..) to release the pinpointed memory.
Even though this 'is' a bug by violating the _sparse_ specification, Hotspot impl. doesn't use the value at all (NOP)
and hence this code didn't produce an error since .. (Same w/ Dalvik).
A followup commit will fix this issue.
commit 21fc00af1c404d93280e21d05efc124ec23d575b
Author: Sven Gothel
Date: Thu Apr 11 06:49:24 2013 +0200
IntBitfield: Add bit-count, O(1) per int-element, using HAKEM.
commit 5502353eaed3ad1866f172a10935671116ed7c9a
Author: Sven Gothel
Date: Thu Apr 11 00:37:30 2013 +0200
IntBitfield: Add optimization path w/ int bitCount bitfield range. Replace '* 32' -> '<< 5', same for division.
commit f4644bf95f6cef34c7098b432a84fccccba263e6
Author: Harvey Harrison
Date: Tue Apr 9 22:06:06 2013 -0700
gluegen: remove executable bit from java and c source files
Signed-off-by: Harvey Harrison
commit d721e4f356d2cb272b0eb47829220a5b2b23c2dc
Author: Harvey Harrison
Date: Wed Apr 3 23:55:16 2013 -0700
gluegen: use enhanced for-loops in ArrayHashSet
Fixes an infinite loop in addAll due to the following line:
mod = mod || add(iter.next()) ;
After the first successful add, mod will be true and thereafter iter.next
will never be called again, due to || shortcutting. the loop will then run forever
as any further elements will never be taken from the iterator, so hasNext will always
be true.
Signed-off-by: Harvey Harrison
commit d70f55e63c38331486249bdfdbd1234ce4bbeb09
Author: Harvey Harrison
Date: Wed Apr 3 23:30:53 2013 -0700
gluegen: use explicit ArrayList constructor to avoid @SuppressWarnings and clone()
ArrayList.clone does _not_ make a shallow copy, a new internal array is allocated.
As such, there is nearly no benefit to using clone().
Signed-off-by: Harvey Harrison
commit bdbba7ca4ae73c3212a46318dab83731706c4e3e
Author: Sven Gothel
Date: Mon Apr 1 02:45:40 2013 +0200
ArrayHashSet: Add ctor w/ initialCapacity and (initialCapacity, loadFactor)
commit a256b64fa57d9f7789baaf379bd9afdc54d8095d
Author: Sven Gothel
Date: Thu Mar 28 22:59:29 2013 +0100
VersionUtil: add getManifest(.., String[] extensions) variant, allowing detection of multiple ordered extensions
commit 0d459235979710be6c9cededb8d9e385fdc25d85
Author: Sven Gothel
Date: Thu Mar 28 21:31:42 2013 +0100
Revert version.timestamp to yyyyMMdd only, i.e. w/o HHmm
Changes in hour/minute is not only overkill, but may confuse our aggregation scripts, which compare versions.
Out nodes time daemon may not be in synchronized that well.
commit 25858c68302e194da80fd9cf91cefcba426a42ea
Author: Sven Gothel
Date: Thu Mar 28 20:36:24 2013 +0100
Align integer version property name .. jogamp_int_version -> jogamp.version.int
commit a7834bb17673ca4eacbb6d599a39e70e00993079
Author: Sven Gothel
Date: Thu Mar 28 20:21:32 2013 +0100
Move *_base_version to jogamp.version.base: Unifying base version across all core modules
commit a3f2ef50ad33c58a240a17fcf03e415d772207c3
Author: Sven Gothel
Date: Thu Mar 28 20:06:30 2013 +0100
Bug 588: Adding jogamp.version property, i.e. 2.0.2-rc- used for Manifest ; Common jogamp_int_version for Android.
Until 2.0.2 gets released, the version string is 2.0.2-rc-
and used in the Manifest for IMPLEMENTATION_VERSION.
The previous build version name of IMPLEMENTATION_VERSION
goes into the new tag IMPLEMENTATION_BUILD.
Further more, we use a common jogamp_int_version for Android, to make life more easy.
commit 0b3c2e5944a27e5eebc6fb82270aae3c91cebc1a
Author: Sven Gothel
Date: Wed Mar 20 02:38:35 2013 +0100
Fix unit test of commit 1610dbb4e4d1a1ecf31eb837a47e0f5be04afdac: Add native address cleanup (32bit)
commit 1610dbb4e4d1a1ecf31eb837a47e0f5be04afdac
Author: Sven Gothel
Date: Wed Mar 20 02:15:53 2013 +0100
Fix intptr_t*, uintptr_t*, ptrdiff_t* and size_t* mapping, map them to PointerBuffer, since referenced memory-size is arch dependent
Added extensive PointerBuffer unit tests w/ new mapping in generated test class.
commit 4becdfa125b07ff969d6540e1112735b53cd15eb
Author: Sven Gothel
Date: Mon Mar 18 08:12:31 2013 +0100
Fix RecursiveLockImpl* corner case: Timeout reached but lock released -> Assume Lock
If timeout has been reached but the lock has been released, the lock has to be assumed.
commit 192224fc3c38521f38eb3bc51bebb16b628e4cdb
Author: Sven Gothel
Date: Mon Mar 18 04:02:46 2013 +0100
Function- RunnableTask: Clear runnableException @ start for re-entry; Fix tExecuted (@ exception); Add debug property 'jogamp.debug.TaskBase.TraceSource', to dump ctor stack trace @ exception.
commit b1eb7ca6b9d7dec7ff62c1f1e8ef0a0545724d2f
Author: Sven Gothel
Date: Mon Mar 18 03:00:45 2013 +0100
Function- RunnableTask: Add PrintStream 'exceptionOut' argument allowing non blocking exceptions to be shown.
Exceptions occuring on non blocking off-thread tasks shall at least be made visible
while not allowed to crash the system.
commit 1a4514accc8f61ab7ff5fe8c82d22a5ef356c865
Author: Sven Gothel
Date: Tue Mar 12 17:50:22 2013 +0100
Fix Long*HashMap impl. of IntIntHashMap: Better 64bit hash value, using new HashUtil.
Introduce markup: /*keyHash*/(.*)/*keyHash*/ allowing Long*HashMap to inject hash function for 64bit value.
commit 692ee1477a5422cb119070ecd87321833c302873
Author: Sven Gothel
Date: Thu Feb 28 21:55:02 2013 +0100
Unit Tests: OSX/Java7 w/o 32bit tests ; Reliable Test1p*JavaEmitter JNI binding initialization
- OSX/Java7 w/o 32bit tests
OSX/Java7 has no 32bit JVM, disable d32 tests for such, using property 'use.macosx32'
- Reliable Test1p*JavaEmitter JNI binding initialization
Load libs and init JNI binding statically w/ @BeforeClass,
since OSX/Java7 for some reason gets confused (?) w/ init sequence.
This is no issue for JOGL etc .. as far we have observed.
commit 99a50b38f5650fedca0f207e03706ffa9492e50c
Author: Sven Gothel
Date: Thu Feb 28 18:27:38 2013 +0100
Promote AWTEDTExecutor to public package com.jogamp.common.util.awt ; Exclude java.part.awt in android gluegen-rt.
commit 27424d9f36659a09195eaae77cf774f7ba3c0eec
Author: Sven Gothel
Date: Thu Feb 21 14:03:38 2013 +0100
Minor edits to JarUtil.Resolver functionality: Exception types, avoiding duplicate processing of strings etc.
commit fd475cc0f42eed11f908da4c725e3f53610ed156
Author: Sven Gothel
Date: Tue Feb 19 10:34:24 2013 +0100
Only evn. JUNIT_DISABLED==true -> junit.is.disabled:=true
commit 6b86764f2e195b4046000fd5a7fcf3331ca72d21
Author: Sven Gothel
Date: Sun Feb 17 19:43:47 2013 +0100
Add property 'jvmJava.exe' -> ${java.home}/bin/java, default jvm for unit tests; Add optional property 'jvmJava7.exe' for Java7 unit tests.
commit e4fc97f6c08d58d1a62543fdfda92fddfda6ee68
Author: Sven Gothel
Date: Sun Feb 17 18:22:33 2013 +0100
OSX/Java7 darwin/jawt_md.h Workaround ; Disable OSX/i386 if compiled w/ Java7 [1.7 - 2.0]; Valid Java range [1.6 - 2.0].
- OSX/Java7 darwin/jawt_md.h Workaround
Include JOGL's JNI MacOSX platform headers, since Oracle's Java7 darwin/jawt_md.h
has X11 dependencies and does not define JAWT_SurfaceLayers.
- Disable OSX/i386 if compiled w/ Java7 [1.7 - 2.0]
Set macosx32 depending on 'ant.java.version'
- Valid Java range [1.6 - 2.0]
Foresee new Java versions 1.9 and 2.0 :)
commit 45a84db7739aba2ab4526d7ef87850b9eb824740
Author: Wade Walker
Date: Sun Feb 17 10:48:00 2013 -0600
Add security checks to resolver methods.
commit 4aa36ed61fd1bb434f2a5dd4d7dbffd6f87a446d
Author: Sven Gothel
Date: Sun Feb 17 15:16:03 2013 +0100
OSX Java6/Java7: Adapt to used JDK (Apple's Java6 or Oracle's Java7)
- Pick-up OSX Java7 locations if setup via ${java.home} and files available
- host.rt.jar, target.rt.jar
- java.home.dir
- java.includes.dir
- java.includes.dir.platform
- java.lib.dir.platform
- Remove 'very old' Java4/5 OSX locations
- Remove java.osx.frameworks.dir, since JavaNativeFoundation.h dependencies are removed
commit 1604f2341e496b380fbb3cf8d1e0134d947d8536
Author: Sven Gothel
Date: Thu Feb 14 01:48:54 2013 +0100
Fix FunctionTask's run()/eval(..) return value assignment: Ensure it's done before syncObject.notifyAll() ; Make methods final
Fixes commit b387d012103a02eb7d5eb919306583295ef09a38.
commit b387d012103a02eb7d5eb919306583295ef09a38
Author: Sven Gothel
Date: Wed Feb 13 13:04:27 2013 +0100
Adding Function and FunctionTask extending RunnableTask functionality
Function allows passing arguments and having a return value in contrast to Runnable,
where FunctionTask allows a Function to be invoked and waited for.
commit f3894c9fa1904572ee21b5c3aa2ca9e26a5d5d1e
Author: Wade Walker
Date: Mon Feb 11 17:00:02 2013 -0600
Make JarUtil work with custom classloaders
Added the ability for users to set a "resolver" in JarUtil
that lets it find resources that are loaded by a custom classloader.
This is needed in OSGi apps (like Eclipse RCP apps), since OSGi
resources do not have simple jar: URLs (they use a custom
protocol called bundleresource:).
commit 30841742e735e70b3946d16711089960084e894c
Author: Sven Gothel
Date: Sat Feb 9 06:17:45 2013 +0100
Bug 681: Add Elf Parsing for other OS than Linux, if ARM and !ANDROID using /proc/self/exe (Linux) or a found java/jvm native lib.
- PlatformPropsImpl.queryABITypeImpl: Check Elf Header for ARM + !ANDROID (i.e. add other OS than Linux, use native java/jmv lib)
- NativeLibrary.enumerateLibraryPaths: Add 'sun.boot.library.path' to enumeration!
- TestElfReader01: Add test for finding java/jvm native lib and parse it
commit a47d19d59cc8772dcf1ef67083c4401d913ad8d2
Author: Sven Gothel
Date: Fri Feb 8 19:28:39 2013 +0100
TestElfReader01.testGNULinuxSelfExe: Restrict to LINUX
commit 371e1dbff6f5f255ab27ed0ab32368abb06eed82
Author: Sven Gothel
Date: Fri Feb 8 19:21:10 2013 +0100
Bug 681: Use ELF Header + ARM EABI Section Parsing in PlatformPropsImpl to to distinguish ARM soft-float/hard-float (part-2)
+ /**
+ * Returns the {@link ABIType} of the current platform using given {@link CPUType cpuType}
+ * and {@link OSType osType} as a hint.
+ *
+ * Note the following queries are performed:
+ *
+ * - not {@link CPUFamily#ARM} -> {@link ABIType#GENERIC_ABI}
+ * - else
+ *
+ * - not {@link OSType#LINUX} -> {@link ABIType#EABI_GNU_ARMEL}
+ * - else
+ *
+ * - Elf ARM Tags -> {@link ABIType#EABI_GNU_ARMEL}, {@link ABIType#EABI_GNU_ARMHF}
+ *
+ *
+ *
+ *
+ *
+ * Elf ARM Tags are read using {@link ElfHeader}, .. and {@link SectionArmAttributes#abiVFPArgsAcceptsVFPVariant(byte)}.
+ *
+ *
+ * @param cpuType
+ * @param osType
+ * @return
+ */
+ private static final ABIType queryABITypeImpl(CPUType cpuType, OSType osType) {
commit 60409268e1d43be26b656b191d6684037f943123
Author: Sven Gothel
Date: Fri Feb 8 19:04:49 2013 +0100
Script: ADB launcher: Use system package, instead of user package (pkg -> sys in URI)
commit 2432dbef17c1dc4164f055cf434073bdabf8a6a9
Author: Sven Gothel
Date: Fri Feb 8 05:12:39 2013 +0100
Bug 681: Add Basic ELF Header + ARM EABI Section Parsing, allowing to distinguish ARM soft-float/hard-float (part-1)
https://jogamp.org/bugzilla/show_bug.cgi?id=681
+ * References:
+ *
+ * - http://linux.die.net/man/5/elf
+ * - http://www.sco.com/developers/gabi/latest/contents.html
+ * - http://infocenter.arm.com/
+ *
+ * - ARM IHI 0044E, current through ABI release 2.09
+ * - ARM IHI 0045D, current through ABI release 2.09
+ *
Added self contained jogamp.common.os.elf package w/ entry point class ElfHeader
to read a RandomAccessFile and parse it as an ELF file.
ELF Parsing completness:
- Header: OK
- SectionHeader: OK
- Section Type SHT_ARM_ATTRIBUTES: OK
- Will be read into SectionArmAttributes
- Used to distinguisgh soft/hard VFP float
Tested manually on:
- Linux intel 32bit / 64bit, arm soft-float and hard-float
commit 1118cb7182611d0a77764a3c781a1148849b3022
Author: Sven Gothel
Date: Fri Feb 1 02:31:29 2013 +0100
IOUtil.copyStream2ByteBuffer: Turns out on Android, no -1 (EOS) is returned - relax loop-condition (hope thats ok)
commit ec7f7a3c809bb9e3beb84ce90e2fcbd8b7f4b7ee
Author: Sven Gothel
Date: Fri Feb 1 02:16:08 2013 +0100
IOUtil.copyStream2ByteBuffer: read while numRead > -1 ; add variant w/ initialCapcity
commit b47d0d92dd222999bf38633de1cec8de6a7ad369
Author: Sven Gothel
Date: Thu Jan 31 21:15:32 2013 +0100
Android: Cleanup ClassLoaderUtil/LauncherUtil - Using cached parent ClassLoader for SYS-Packages w/ native libs, and non cached child ClassLoader for USR-Packages
Android's Dalvik VM, like a JVM, cannot load a native library from one location by multiple ClassLoader.
Since we don't like to hardcode the system-packages, as it was before, i.e. "com.jogamp.common", "javax.media.opengl",
we need to either copy the libs or use parenting of cached ClassLoader.
The latter is chosen, since it's faster and uses less resources.
- System-packages are passed through from the user 'List LauncherUtil.BaseActivityLauncher::getSysPackages()'
to the ActivityLauncher, which instantiates the ClassLoader.
- No more hard-reference the system-packages in ClassLoaderUtil ("com.jogamp.common", "javax.media.opengl"),
just use the new user provided system-packages.
- The system-packages denominate a hash-key for caching, a new ClassLoader is created and mapped
if it does not yet exist.
- A non-chached user-packages ClassLoader is created using the cached system-packages ClassLoader as it's parent.
commit c8de8fbf5d080b674b509763fbb7374c21ee705b
Author: Sven Gothel
Date: Thu Jan 31 16:11:59 2013 +0100
Fix comments in gluegen-cpptasks-android* config file
commit e58643727cc36d6dc27cec9e02934c26de7621ee
Author: Sven Gothel
Date: Thu Jan 31 16:11:30 2013 +0100
Cleanup GlueGen config 'ExtendedInterfaceSymbols*'
Semantics Change:
ExtendedInterfaceSymbolsOnly was used for implementation generation only,
which is considered a bug!
- ExtendedInterfaceSymbolsIgnore C.java
- Ignore symbols in C.java for interface generation
- ExtendedInterfaceSymbolsOnly C.java
- Only use symbols in C.java for interface generation
- ExtendedImplementationSymbolsIgnore C.java
- Ignore symbols in C.java for implementation generation
- ExtendedImplementationSymbolsOnly C.java
- Only use symbols in C.java for implementation generation
- ExtendedIntfAndImplSymbolsIgnore C.java
- Ignore symbols in C.java for interface and implementation generation
- ExtendedIntfAndImplSymbolsOnly C.java
- Only use symbols in C.java for interface and implementation generation
commit 0634a2f9b4812b04dce4df466568184beac5c8cf
Author: Sven Gothel
Date: Thu Jan 31 14:11:46 2013 +0100
Bump Android NDK to 'android-ndk-r8d' - Note: '-fno-use-linker-plugin' is required (?!)
commit a45d7b1d090a77cadfd7877dc0eb468d4970efc4
Author: Sven Gothel
Date: Wed Jan 30 15:38:24 2013 +0100
Add OSX Java7 build script
commit 00c9fa8f2d69d15a2e4183e127b543a92fb5f4b8
Author: Sven Gothel
Date: Wed Jan 30 15:35:40 2013 +0100
GlueGen: NativeLibrary Fix, JNILibLoaderBase Enhancement
- NativeLibrary Fix
- enumerateLibraryPaths(..):
- Properly iterate through all prefix _and_ suffix.
- Make public for JNILibLoaderBase.loadLibraryInternal(..)
- isValidNativeLibraryName(..):
- Stop iterating through prefix, if previously found
but suffix doesn't match.
- JNILibLoaderBase.loadLibraryInternal(..) Enhancement
- Mark customLibLoader FIXME: remove (we will get rid of jnlp.launcher.class)
- If System.load(TempJarCache) and System.loadLibrary(plainLibName) fails,
use NativeLibrary.enumerateLibraryPaths() w/ System.load(..) as last resort.
Tested on Linux x86_64 Java6 and OSX Java7 manually, no regressions expected.
commit be6c4158cf901af01be370b31e5bec368a51b2d5
Author: Sven Gothel
Date: Sat Jan 19 05:47:52 2013 +0100
adb-launch-main: logcat: append to log
commit d171a7ccc65fd284fe7e81ea3ff11d38360387bb
Author: Sven Gothel
Date: Sat Jan 19 05:45:29 2013 +0100
Fix ActivityLauncher/MainLauncher .. and make adb-launch-main more suitable
- ActivityLauncher
- no finish() from onDestroy()
- MainLauncher
- finish activity after returning 'main()' returns
- no finish() from onDestroy()
- adb-launch-main:
- Clear logcat
- Wait until activity is stopped
- Dump logcat to local logfile
commit 2f3b9e92483021b6b678b6111de1294997f3cd74
Author: Sven Gothel
Date: Sat Jan 19 05:20:17 2013 +0100
MainLauncher: Remove Thread.destroy() - n/a on Android ..
commit f1cc4080095ab0bab53833e74093845bb8193686
Author: Sven Gothel
Date: Sat Jan 19 05:15:46 2013 +0100
Add MainLauncher adb launch script. Here we only utilize non-root features, i.e. can be launched on non-hacked device.
commit 039ff52d12f5dd750494fb2dea580946291bdb7e
Author: Sven Gothel
Date: Sat Jan 19 03:57:52 2013 +0100
Modified Java 1.5 Buffers patch 2b7d1b1d25cb2cd73311ec9159b465f0391bf5e0 - May break GCJ/ECJ .. needs to be revised.
- Adding JAVA_6 in PlatformPropsImpl
- Buffers.isDirect() chooses fast-path iff JAVA_6, otherwise using reflection (GCJ/ECJ)
- Adding JAVA_6 info in VersionUtil
- API doc: Refine JAVA_SE and JAVA_6 spec.
TODO: In case GCJ etc is unable to compile the JAVA_6 code
even though it uses a static condition (probably not),
We have to wrap isStatic in an own class, one for JAVA_6 and one for <= 1.5.
This will be a good exercise for further issues we may have w/ Java <= 1.5.
commit 2b7d1b1d25cb2cd73311ec9159b465f0391bf5e0
Author: Xerxes Rånby
Date: Fri Jan 18 16:25:59 2013 +0100
Buffer.isDirect() operation is undefined w/ Eclipse ecj and GCJ gij JRE.
Fix for the runtime error using GCJ gij JRE:
java.lang.NoSuchMethodError: method java.nio.Buffer.isDirect with signature ()Z was not found.
at com.jogamp.common.nio.Buffers.isDirect(Buffers.java:363)
Also Eclipse ecj refuses to compile code using java.nio.Buffer.isDirect().
----------
1. ERROR
...
return ((Buffer) buf).isDirect();
^^^^^^^^
The method isDirect() is undefined for the type Buffer
Signed-off-by: Xerxes Rånby
commit 9c1c6d49e11574d8afe351a8100872a645ccdd36
Author: Xerxes Rånby
Date: Fri Jan 18 16:21:04 2013 +0100
PlatformPropsImpl: JAVA_RUNTIME_NAME is null using GCJ gij JRE.
Signed-off-by: Xerxes Rånby
commit 2537f8816f39fdc47cd5aaedd747a7b12b94ca5e
Author: Sven Gothel
Date: Fri Jan 18 02:21:53 2013 +0100
test script
commit 029e941b12165e8fb04eae440812d5ea5ba1608d
Author: Sven Gothel
Date: Fri Jan 18 02:21:40 2013 +0100
RecursiveLock.getHoldCount(): Fix API doc formatting
commit 41e7c7ca3ae2005b23182d7f28abd0b8ed11e73c
Author: Sven Gothel
Date: Fri Jan 18 02:21:15 2013 +0100
Buffers: Fix typo
commit 1b9f0739ecc25105384b557afa698c42e08d4cc6
Author: Sven Gothel
Date: Fri Jan 18 02:20:26 2013 +0100
Android Completion for launching main() class via MainLauncher; Fix ActivityLauncher order of delegation/super activity callbacks.
- StaticContext:
- Add ViewGroup for standalone tests w/ UI
- MainLauncher/LauncherUtil:
- Complete launching a main() class from our activity launcher
- adding main-cmdline-args
- ActivityLauncher
- Fix order of delegation/super activity callbacks.
commit 8018da4e37ac520fb49018fa6323b187526cd29e
Author: Sven Gothel
Date: Wed Jan 16 17:36:08 2013 +0100
README: Add new IRC channel, mark Jabber deprecated
commit 8b3e5b94bcd3167278eb972b2be37086d3bd2996
Author: Sven Gothel
Date: Mon Dec 31 14:52:36 2012 +0100
PrimitiveStack: Add 'void position(int)' to set new position. Add test case w/ initialSizeElem:=0.
commit ac16df0bab94fab313030ead42644844d1690a82
Author: Sven Gothel
Date: Sun Dec 30 23:59:08 2012 +0100
Add com.jogamp.common.util.PrimitiveStack (FloatStack and IntegerStack), a simple primitive stack implementation.
Currently only FILO put/get operations are implemented using either
primitive arrays as I/O itself or Buffer.
Unit tests are included..
Note: Only FloatStack is implemented in a manual, where others (IntegerStack)
is derived (generated) from it. Same goes w/ unit tests.
commit 0104f0ff35304b0aa416c2caa7b53aadf592f36a
Author: Sven Gothel
Date: Sun Dec 30 19:56:25 2012 +0100
Fix Bug625: StructAccessor missing setShortsAt() and getShortsAt() methods for short[]
For short[] Java code gets emitted for an StructAccessor object that uses:
void setShortsAt(int i, short[] shorts)
short[] getShortsAt(int i, short[] shorts)
Problem was that StructAccessor.java had no such methods - added.
commit 0b43b43f889ad7fc220942b0076e2001ca3cf13f
Author: Sven Gothel
Date: Fri Dec 28 14:03:36 2012 +0100
Refine AWTEDTExecutor.invoke(..): Allow control whether a non AWT-EDT may execute the runnable.
For some 'rare' AWT/GL lifecycle actions, it is required to only run the command on the AWT-EDT,
hence adding an argument determining the restriction.
commit 4cbceccb3a91bb4b9bcf9e109e5f777fa50606a3
Author: Sven Gothel
Date: Thu Dec 27 07:18:33 2012 +0100
Complete commit 43163af2618a0aaa3cf41de8027ef402d7e89cc3 - jogamp-androidtasks.xml was using ANDROID_SDK_HOME, -> ANDROID_HOME
commit 43163af2618a0aaa3cf41de8027ef402d7e89cc3
Author: Sven Gothel
Date: Thu Dec 27 05:53:56 2012 +0100
Android build scripts: Fix env. name ANDROID_SDK_HOME -> ANDROID_HOME
Intuitively I assumed ANDROID_SDK_HOME to be pointing to the SDK root dir,
however this is not true: Semantics by Android tools are:
ANDROID_SDK_HOME - Users ~/.android folder
ANDROID_HOME - SDK root folder
commit 5bd9880b54a48326742008d36175b1403c891ee1
Author: Sven Gothel
Date: Thu Dec 27 05:50:21 2012 +0100
Android Launcher: Fix ClassLoaderUtil's JNI lib-path determination, use ApplicationInfo's nativeLibraryDir (API level 9).
On Android > 4.0.3 (maybe even earlier), w/ a split filesystem (internal and SDCARD)
the JNI libs maybe stored at a different location than it's data path.
ApplicationInfo's nativeLibraryDir properly determines the JNI storage location, hence use it.
Prev. code also derived JNI lib path by the launcher's ApplicationInfo's nativeLibraryDir,
which might be different than the user package's nativeLibraryDir.
This is especially true, since the launcher may not hold any native libraries.