aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Script: Add adb logcat scriptSven Gothel2013-06-201-0/+4
|
* ProcAddressTable: Make all handles package private, use local ↵Sven Gothel2013-06-203-38/+85
| | | | | | | | 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.
* DynamicLookupHelper: Add secure isFunctionAvailable(..); NativeLibrary: Add ↵Sven Gothel2013-06-203-11/+65
| | | | TODO comments, re protected lookup functions.
* DynamicLinker*: Proper Override notationSven Gothel2013-06-204-3/+15
|
* Security: Gluegen generated native methods w/ 'pass through function ↵Sven Gothel2013-06-201-15/+37
| | | | pointer' _must_ be private!
* Security: Tighten DynamicLinker*, NativeLibrary and DynamicLibraryBundle access.Sven Gothel2013-06-206-136/+207
|
* Bug 758: Fix scripts and ant build files to work w/ Java7 (default now) ↵Sven Gothel2013-06-2027-142/+202
| | | | producing Java6 bytecode ; Apply JAR Manifest tags: Sealed, Permissions and Codebase
* Fix URLCompositionTest for Bug 757 (3): If file, replace '/' in expected ↵Sven Gothel2013-06-191-2/+4
| | | | | | 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.
* Fix URLCompositionTest for Bug 757 (2): If file, replace '/' in expected ↵Sven Gothel2013-06-191-1/+11
| | | | | | result w/ OS specific File.separatorChar The JAR entry shall stay untouched, i.e. separator is platform independent '/'.
* Fix URLCompositionTest for Bug 757: If file, replace '/' in expected result ↵Sven Gothel2013-06-191-10/+12
| | | | w/ OS specific File.separatorChar
* Fix Bug 757: Regression of URL to URI conversion (Encoded path not ↵Sven Gothel2013-06-199-82/+218
| | | | | | | | | | | | | | | | | | | | | | | | 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)' ++
* Refine 4feb65517ae4a4e2b9b04cdfc4b85582cb8b9784: Handle verbose error cases ↵Sven Gothel2013-06-181-26/+31
| | | | post catch block, i.e. exception (if occured) and dlerror value.
* Robostness: Catch Throwables on NativeLibrary.open(..) and be verbose in ↵Sven Gothel2013-06-184-7/+29
| | | | DEBUG mode ; DynamicLinker: Add 'String getLastError()'.
* Complete 5d211c6fa6a0452cc4569712e436184e34504a88: Remove ↵Sven Gothel2013-06-179-291/+0
| | | | generate.nativelibrary.sources and dynlink* gluegen files due to manual impl.
* Fix DynamicLinker Impl: Add Bionic specialization using Bionic's non POSIX ↵Sven Gothel2013-06-167-154/+92
| | | | | | | | | | | | | | | 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
* Fix CStruct APT File Location - Threw FileNotFoundException w/ Java7Sven Gothel2013-06-154-35/+116
|
* GlueGen (Compile Time): Add 'CStruct' Annotation Processor (APT) to ↵Sven Gothel2013-06-1410-8/+416
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | '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: <!-- Annotation Processor Only - First --> <javac destdir="${build_t.java}"> <classpath refid="junit.compile.classpath"/> <compilerarg value="-proc:only"/> <compilerarg value="-J-Djogamp.gluegen.structgen.debug"/> <compilerarg value="-J-Djogamp.gluegen.structgen.output=${build_t.gen}/classes"/> <src path="${test.base.dir}/com/jogamp/gluegen/test/junit/structgen"/> </javac> <!-- Javac Only - Second --> <javac destdir="${build_t.java}"> <classpath refid="junit.compile.classpath"/> <compilerarg value="-proc:none"/> <src path="${test.base.dir}"/> <src path="${build_t.gen}" /> </javac> 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.
* Fix Bug 749: Add Support for Solaris SPARC 32bitBritta Eckhardt2013-06-132-19/+30
|
* Android SDK changes: Add /build-tools/17.0.0 to PATHSven Gothel2013-06-131-1/+1
|
* Fix Bug 751 OSX Java-6: Derive host/target-rt jar file from 'java.home'.Sven Gothel2013-06-133-12/+31
|
* Bug 752: Review Code Vulnerabilities (Permission Checks of new exposed code ↵Sven Gothel2013-06-1120-225/+881
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix Bug 683 part1b: Add IOUtil.getRelativeOf(URL, ..), wrapper for URI for ↵Sven Gothel2013-06-091-0/+12
| | | | convenience (JOGL ShaderCode) and bwd. compatibility
* Bug 747: AndroidVersion: HashMap -> IntObjectHashMapSven Gothel2013-06-091-7/+6
|
* Fix Bug 683 part1: IOUtil, JarUtil, TempJarCache, .. uses URI instead of URL ↵Sven Gothel2013-06-0913-399/+532
| | | | to remove DNS Lookups etc ..
* Enhance VersionNumber*: Use only RegExp and cache default (no wrapped ↵Sven Gothel2013-05-315-42/+402
| | | | whitespace tokenizer); String match: Store end-of-match and flag defined components.
* RecursiveThreadGroupLockImpl01Unfairish: Fix DEBUG outputSven Gothel2013-05-051-3/+4
|
* Buffers: getRemainingBytes(Object) -> remainingBytes(Object); ↵Sven Gothel2013-04-291-60/+60
| | | | | | | | | | | | 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.
* Buffers: Add 'sizeOfBufferType(Class<?> bufferType)'Sven Gothel2013-04-271-1/+24
|
* Buffers: Expose 'getRemainingBytes(Object buffer)'Sven Gothel2013-04-272-6/+31
|
* VersionNumber*: Add static final 'zeroVersion' for convenience and identity.Sven Gothel2013-04-262-1/+8
|
* Adding scripts to check all JogAmp native ARM libraries ; check-glibc.sh ↵Sven Gothel2013-04-243-8/+77
| | | | checks all glibc version ..
* Revert "make/lib/gluegen-cpptasks-linux-armv6[hf].xml: Set property ↵Sven Gothel2013-04-232-4/+0
| | | | | | | | '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'
* make/lib/gluegen-cpptasks-linux-armv6[hf].xml: Set property ↵Sven Gothel2013-04-232-0/+4
| | | | 'useGCCARMTargetArchAndFloatOptions' indicating ARM arch & float gcc options are desired.
* Fix Bug 650: Use toolchain default arch & float options for default arm ↵Sven Gothel2013-04-231-6/+8
| | | | | | | | 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)
* Modify linux-arm scripts for new toolchain (crosstools-ng) ; ↵Sven Gothel2013-04-2321-14/+23
| | | | gluegen-cpptasks-linux-armv6hf.xml: Enable cc-arg '-mfloat-abi=hard' ; Add script make*all.sh
* glibc-compat-symbols.h: Add __arm__ -> GLIBC_2.4 ; default is now ↵Sven Gothel2013-04-211-3/+13
| | | | GLIBC_2.2.5 // Still minimum required is GLIBC_2.4!
* Add 'glibc-compat-symbols.h' to force usage of minimal GLIBC symbols ↵Sven Gothel2013-04-212-0/+23
| | | | | | | | | | | | | | | | | | | | | | 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!
* build.xml: fix intendationsSven Gothel2013-04-211-5/+5
|
* make/gluegen-cpptasks-base.xml: Expose evaluated 'isI386' and 'isAMD64' ↵Sven Gothel2013-04-201-26/+24
| | | | property, allowing to trigger x86_64 -> x86_32 crosscompilation.
* VersionNumber: Add API doc, use final int values, remove protected 'nop' ↵Sven Gothel2013-04-162-21/+94
| | | | ctor; Add VersionNumberString [extends VersionNumber] which additionally holds the orig. string value.
* Fix Bug 715: Don't modify 'carray' pointer returned from ↵Sven Gothel2013-04-131-5/+15
| | | | | | | | | | | | | | | 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).
* Bug 715: Adding unit test w/ 'intArrayCopy(int *dest, int *src, int num)' to ↵Sven Gothel2013-04-134-2/+64
| | | | | | | | | | | | 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.
* IntBitfield: Add bit-count, O(1) per int-element, using HAKEM.Sven Gothel2013-04-111-0/+26
|
* Merge remote-tracking branch 'hharrison/master'Sven Gothel2013-04-1120-0/+0
|\
| * gluegen: remove executable bit from java and c source filesHarvey Harrison2013-04-0920-0/+0
| | | | | | | | Signed-off-by: Harvey Harrison <[email protected]>
* | IntBitfield: Add optimization path w/ int bitCount bitfield range. Replace ↵Sven Gothel2013-04-112-12/+61
|/ | | | '* 32' -> '<< 5', same for division.
* gluegen: use enhanced for-loops in ArrayHashSetHarvey Harrison2013-04-031-10/+9
| | | | | | | | | | | | 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 <[email protected]>
* gluegen: use explicit ArrayList constructor to avoid @SuppressWarnings and ↵Harvey Harrison2013-04-031-4/+2
| | | | | | | | | 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 <[email protected]>
* ArrayHashSet: Add ctor w/ initialCapacity and (initialCapacity, loadFactor)Sven Gothel2013-04-011-4/+24
|
* VersionUtil: add getManifest(.., String[] extensions) variant, allowing ↵Sven Gothel2013-03-281-5/+30
| | | | detection of multiple ordered extensions