| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
generate.nativelibrary.sources and dynlink* gluegen files due to manual impl.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
to remove DNS Lookups etc ..
|
|
|
|
| |
whitespace tokenizer); String match: Store end-of-match and flag defined components.
|
|
|
|
| |
checks all glibc version ..
|
|
|
|
|
|
|
|
| |
'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'
|
|
|
|
| |
'useGCCARMTargetArchAndFloatOptions' indicating ARM arch & float gcc options are desired.
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
| |
gluegen-cpptasks-linux-armv6hf.xml: Enable cc-arg '-mfloat-abi=hard' ; Add script make*all.sh
|
|
|
|
| |
GLIBC_2.2.5 // Still minimum required is GLIBC_2.4!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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!
|
| |
|
|
|
|
| |
property, allowing to trigger x86_64 -> x86_32 crosscompilation.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
core modules
|
|
|
|
|
|
|
|
|
|
|
|
| |
Manifest ; Common jogamp_int_version for Android.
Until 2.0.2 gets released, the version string is 2.0.2-rc-<TIMESTAMP>
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.
|
|
|
|
|
|
| |
PointerBuffer, since referenced memory-size is arch dependent
Added extensive PointerBuffer unit tests w/ new mapping in generated test class.
|
|
|
|
|
|
| |
HashUtil.
Introduce markup: /*keyHash*/(.*)/*keyHash*/ allowing Long*HashMap to inject hash function for 64bit value.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Exclude java.part.awt in android gluegen-rt.
|
| |
|
|
|
|
| |
tests; Add optional property 'jvmJava7.exe' for Java7 unit tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 :)
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
| |
/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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
+ * <p>
+ * Note the following queries are performed:
+ * <ul>
+ * <li> not {@link CPUFamily#ARM} -> {@link ABIType#GENERIC_ABI} </li>
+ * <li> else
+ * <ul>
+ * <li> not {@link OSType#LINUX} -> {@link ABIType#EABI_GNU_ARMEL} </li>
+ * <li> else
+ * <ul>
+ * <li> Elf ARM Tags -> {@link ABIType#EABI_GNU_ARMEL}, {@link ABIType#EABI_GNU_ARMHF} </li>
+ * </ul></li>
+ * </ul></li>
+ * </ul>
+ * </p>
+ * <p>
+ * Elf ARM Tags are read using {@link ElfHeader}, .. and {@link SectionArmAttributes#abiVFPArgsAcceptsVFPVariant(byte)}.
+ * </p>
+ *
+ * @param cpuType
+ * @param osType
+ * @return
+ */
+ private static final ABIType queryABITypeImpl(CPUType cpuType, OSType osType) {
|
|
|
|
| |
sys in URI)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
distinguish ARM soft-float/hard-float (part-1)
https://jogamp.org/bugzilla/show_bug.cgi?id=681
+ * References:
+ * <ul>
+ * <li>http://linux.die.net/man/5/elf</li>
+ * <li>http://www.sco.com/developers/gabi/latest/contents.html</li>
+ * <li>http://infocenter.arm.com/
+ * <ul>
+ * <li>ARM IHI 0044E, current through ABI release 2.09</li>
+ * <li>ARM IHI 0045D, current through ABI release 2.09</li>
+ * </ul></li>
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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<String> 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.
|
| |
|
|
|
|
| |
required (?!)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
| |
i.e. can be launched on non-hacked device.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
simple primitive stack implementation.
Currently only FILO put/get operations are implemented using either
primitive arrays as I/O itself or <Type>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.
|
|
|
|
| |
jogamp-androidtasks.xml was using 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
|