| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
'yield_thread()' to avoid potential Java>17 collision (JEP 361)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
As of Java9, sun.misc.Cleaner has moved to jdk.internal.ref.Cleaner.
However, access has been made (under the table) via sun.misc.Unsafe,
which we are using for now as we cannot set the jdk.internal.ref.Cleaner method accessible.
In this regard, we had to change our Cleaner.clean(..) method using a ByteBuffer
instead of a Buffer object paramter.
All tests have passed, no more illegal access case running on Java11 has been exposed.
|
|
|
|
|
|
|
|
|
|
| |
gluegen-rt -> gluegen_rt
- Fix finding native library for Elf parsing
- Fix one unit test
- Fix comments
Completes commit 330dad069dee5a0cc0480cf5cd9052000004223a
|
|
|
|
|
| |
Implementation currently uses 256 bit Secure Hash (SHA) algorithm, but this may change in the future.
Hence only use 'SHA' in the names, not 'SHA256'.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
runtime validation
This change implements a strong SHA256 signature over:
1) source tree inclusive make recipe (SHA256-Source)
2) all class files (SHA256-Classes)
3) all native libraries (SHA256-Natives)
4) the class files as deployed in the jar (SHA256-Classes-this)
5) the native libraries as deployed in the jar (SHA256-Natives-this)
and drops all of these in the deployed Jar file.
This allows SHA256 validation of (4) + (5) at runtime
and further complete validation (1), (2) and (3) offline.
Full SCC would now required (1) - (3) to be placed on a server for further validation.
Optionally we may use GPG <https://gnupg.org/> or PGP to validate the build entity to implement the chain of trust <https://en.wikipedia.org/wiki/Chain_of_trust>
The SHA256 runtime validation is tested via: com.jogamp.common.util.TestVersionInfo
|
|
|
|
| |
executables
|
|
|
|
| |
for System related Operations
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Uri to handle relative path
Fix IOUtil.cleanPathString(..) special case:
Special case '/a/./../b' -> '/b'
requires to resolve './' before '../'.
Allow IOUtil and Uri to handle relative path:
- IOUtil.getParentOf(..)
- IOUtil.cleanPathString(..)
Handle cases:
'a/./../b' -> 'b'
'.././b' -> '../b'
- Uri: Handle null scheme
|
|
|
|
|
|
|
|
|
|
|
|
| |
caller to skip relative futile lookup
IOUtil.getResource(..) and IOUtil.ClassResources, needs more clarity.
ClassLoader shall be passed explicitly next to the optional
relative context Class instance.
This allows better efficiency, i.e. caller can pass ClassLoader
but skip a possible relative lookup, if not existing.
|
|
|
|
| |
deflated files w/ zip-level 9
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
test-executable ; Use CustomInflate for Performance
- Use 'WinMain' for Windows test-executable
This may have little difference than using std 'main' entry
- Add Windows x86_64 test executable
Since the reporter claims the test executable works well
on Windows i386, maybe utilizing a x86_64 test executable
on same VM fixes the issue
- Use CustomInflate for Performance
- Skips GZIP header
- Adds own custom header [magic, deflate-size, inflate-size]
- Own header allows simplified I/O read and deflation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
IOUtil.testDirExe():
- Satisfactory when executed
Failure to execute produce an IOException right at ProcessBuilder.start().
Hence we can allow an unexpected process exit value,
since we only want to learn whether executable files are allowed.
- More debug options
DEBUG_EXE: 'jogamp.debug.IOUtil.Exe'
DEBUG_EXE_NOSTREAM: 'jogamp.debug.IOUtil.Exe.NoStream'
- if DEBUG_EXE
- a pre-existing 'jogamp_exe_tst'+<SUFFIX> will be used as-is.
- the test-exe will not be deleted
- StreamMonitor is being used to dump stdout/stderr
if !DEBUG_EXE_NOSTREAM.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Use InterruptSource.Thread.create(..),
while reducing InterruptSource.Thread ctors to 3 variants.
- Use InterruptSource.Thread instead of java.lang.Thread where possible
- Use SourcedInterruptedException where possible
- SingletonInstanceServerSocket: start(), stop() and run()
- Persistent-Wait and Cancelable
- Add @since 2.3.2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PlatformPropsImpl.findSysLib(..).
This patch partially reverts of commit d12e4d4ea279998b27457691038e709879dcaca6.
NativeLibrary.open(..) requires search of system libraries,
since it loads the actual 'tool library' for which we generate the JNI binding.
The 'tool library' is preferably the system wide installed version,
e.g. libGL.so etc.
PlatformPropsImpl.findSysLib(..) also requires finding system libraries
as needed for PlatformPropsImpl.queryElfFile(..), i.e. using libjava.so etc.
Only the JNI 'glue library', glueing java calls to the 'tool library',
shall not use the system wide library search since we shall only use
JogAmp provided instances here.
This patch also reinstates binary compatibility w/ prev. GlueGen JARs
since NativeLibrary.enumerateLibraryPath(..) is public.
+++
Further more 'NativeLibrary.enumerateLibraryPath(..)'
now adds OSX system framework search _before_ the user path
in case 'searchSystemPath && searchSystemPathFirst'.
Original code always added this search to the end,
which does not match the intended behavior (-> bug).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
extension mechanism
NativeLibrary:
API change: Removed searchSystemPathFirst argument to the
open and enumerateLibraryPaths methods.
Removed the generic sun.boot.library.path system path and the
MacOS specific Frameworks paths from enumerateLibraryPaths.
JNILibLoaderBase, PlatformPropsImpl & TestElfReader01:
Updated to handle the NativeLibrary API change.
This change will prevent JogAmp modules to pickup and load unsupported
and old SUN JOGL 1 natives that may have been deployed with the JRE.
|
|
|
|
| |
of put32/get32
|
| |
|
| |
|
|
|
|
| |
and bitCount(), add unit test (passed)
|
| |
|
| |
|
|
|
|
| |
tests
|
|
|
|
| |
Signed-off-by: Xerxes Rånby <[email protected]>
|
|
|
|
| |
CompatibilityType.BACKWARD_COMPATIBLE_BINARY
|
|
|
|
|
|
| |
ArrayHashMap; Unify ctor for both impl.
Add/Enhance unit tests for both.
|
|
|
|
| |
-> v23x
|
|
|
|
| |
reduce test time (was: > 10 min)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
matching StaticConfig at runtime; Fix PPC (Bug 1056) and MIPSLE (Bug 1014) issues.
Currently the StaticConfig is being queried
via the key[OSType, CPUType ..]
as pre-determined by Java properties or the ELF parser.
This adds complication to maintain different platforms
and the key query might not even be sufficient.
The MachineDescriptor's StaticConfig only purpose shall be
to speed-up native data size and offset/alignment retrieval.
This is done by using the StaticConfig index within
all StaticConfig[]s as a lookup-index for the precomputed
struct's size and offset tables.
+++
Solution:
Rename: MachineDescriptor -> MachineDataInfo
Rename: MachineDescriptorRuntime -> MachineDataInfoRuntime
After having defined os.and.arch (OSType, CPUType and ABIType)
w/ the optional help of the now self containing ELF Reader (Bug 1125),
the native gluegen-rt library gets loaded enabling JNI methods.
It is satisfactory to retrieve MachineDataInfo
at runtime w/ JNI and find the matching/compatible StaticConfig.
Only in case none is found, the program needs to abort.
Otherwise the found MachineDataInfo.StaticConfig and MachineDataInfo
are stored for further use (see above).
This removes above complication and key to StaticConfig mapping.
New platforms simply need to add a new unique entry into the
StaticConfig[] table.
++
Also fixes Bug 1056 (PPC), thanks to tmancill [@] debian [.] org,
and Bug 1014 (MIPSLE), thanks to Dejan Latinovic.
Parts of the patch for Bug 1014 from Dejan Latinovic are included.
also solved by this change set.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ELF Reader 'jogamp.common.os.elf' currently uses
Platform's pre-determined OS_TYPE and CPUType.
It also uses the host platforms MachineDescription,
hence can not read ELF files from other machines.
This also forbids Platform to determine CPUType etc
w/o having a valid 'os.arch' property.
+++
ElfHeader should be split in
- ElfHeaderPart1 (CPUType independent)
- ElfHeaderPart2 (CPUType dependent)
Fix shall make the ELF Reader self containing
by only using ELF CPUType data, etc.
This requires customization of struct parsing,
where MachineDescription.Static index shall be
- defined in ElfHeaderPart1 using e_Ident's CPUType.
- used in ElfHeaderPart2 and all its struct types.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
setting of stream position (optional)
- Add setting position entry, optionally supported,
e.g. ByteBufferStream and ByteArrayStream
- Remove 'msbFirst' parameter on all 'bulk' read/write
operations.
These methods use LSB-first always, allowing proper
stream access of data w/ different bit-sizes.
Data is now read/write as little-endian
and swapped accordingly.
Optimizations are adopted for LSB-first operations.
This change removes API confusion/bugs:
- removes one decision (parameter)
- removes the data reversion case
- removes bugs w/ different bit-sizes
|
|
|
|
| |
(500 ms) per JVM after test class (cooperative w/ other JVM test instances)
|
|
|
|
| |
static fields; Change name to avoid testing itself.
|
|
|
|
|
|
|
|
|
| |
from JunitTracer and use it for all tests.
- Certain performance tests don't make sense utilizing several jenkins unit tests on one machine,
hence singleton test execution is desired.
- JOGL's UITestCase also will derive from this SingletonTestCase
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Validate active and GC'ed mapped-buffer count
in cleanAllSlices() via close() ..
- Fix missing unmapping last buffer in notifyLengthChangeImpl(),
branch criteria was off by one.
- cleanSlice(..) now also issues cleanBuffer(..) on the GC'ed entry,
hence if WeakReference is still alive, enforce it's release.
- cleanBuffer(..) reverts FLUSH_PRE_HARD -> FLUSH_PRE_SOFT
in case of an error.
- flush() -> flush(boolean metaData) to expose FileChannel.force(metaData).
- Add synchronous mode, flushing/syncing the mapped buffers when
in READ_WRITE mapping mode and issue FileChannel.force() if not READ_ONLY.
Above is implemented via flush()/flushImpl(..) for buffers and FileChannel,
as well as in syncSlice(..) for buffers only.
flush*()/syncSlice() is covered by:
- setLength()
- notifyLengthChange*(..)
- nextSlice()
Always issue flushImpl() in close().
- Windows: Clean all buffers in setLength(),
otherwise Windows will report:
- Windows: Catch MappedByteBuffer.force() IOException
- Optimization of position(..)
position(..) is now standalone to allow issuing flushSlice(..)
before gathering the new mapped buffer.
This shall avoid one extra cache miss.
Hence rename positionImpl(..) -> position2(..).
- All MappedByteBufferOutputStream.write(..) methods
issue syncSlice(..) on the last written current slice
to ensure new 'synchronous' mode is honored.
+++
Unit tests:
- Ensure test files are being deleted
- TestByteBufferCopyStream: Reduced test file size to more sensible values.
-
|
|
|
|
| |
to stream copy as well as direct memory mapped ByteBuffer access
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
OutputStream impl.
Added MappedByteBufferOutputStream as a child instance of MappedByteBufferInputStream,
since the latter already manages the file's mapped buffer slices.
Current design is:
- MappedByteBufferInputStream (parent)
- MappedByteBufferOutputStream
this is due to InputStream and OutputStream not being interfaces,
but most functionality is provided in one class.
We could redesign both as follows:
- MappedByteBufferIOStream (parent)
- MappedByteBufferInputStream
- MappedByteBufferOutputStream
This might visualize things better .. dunno whether its worth the
extra redirection.
+++
MappedByteBufferInputStream:
- Adding [file] resize support via custom FileResizeOp
- All construction happens via ctors
- Handle refCount, incr. by ctor and getOutputStream(..), decr by close
- Check whether stream is closed already -> IOException
- Simplify / Reuse code
MappedByteBufferOutputStream:
- Adding simple write operations
|
|
|
|
| |
IOException (Add note to FLUSH_NONE); Reduce test load / duration.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
InputStream impl., incl. mark/reset
- ByteBufferInputStream simply impl. InputStream for an arbitrary 2MiB restricted ByteBuffer
- Users may only need a smaller implementation for 'smaller' file sizes
or for streaming a [native] ByteBuffer.
- MappedByteBufferInputStream impl. InputStream for any file size,
while slicing the total size to memory mapped buffers via the given FileChannel.
The latter are mapped lazily and diff. flush/cache methods are supported
to ease virtual memory usage.
- TestByteBufferInputStream: Basic unit test for basic functionality and perf. stats.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for getNormalized(), getDirectory(), getParent() and getRelativeOf()
- Refine API doc
- Add notion of {@code host} and {@code port} validation
- Add create(Encoded ..), allowing creation of variants w/o re-encoding
- Provide common impl. for getNormalized(), getDirectory(), getParent() and getRelativeOf()
Above feature methods share common goals, hence use same implementation:
- If opaque, cut-off query and merge after operation
- cleanup path, i.e. /dummy/../test/ -> /test/
- cutoff file, dir - if requested
- append optional appendix and cleanup again
Return behavior various thought, i.e. null, this or allow exception.
Enhanced test of above features.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Uri:
- Add error correction (fix) of path at ctor
in case a a contained Uri is requested from an opaque one.
The latter might come from URI/URL and is not properly encoded!
See Uri.PARSE_HINT_FIX_PATH
- Simplify conversion methods:
- valueOf(URI/URL): Re-encode only if not opaque
- getNativeFilePath() -> toFile()
- Move IOUtil Uri related constants to class Uri
- Add DEBUG and DEBUG_SHOWFIX
- Complete adoption of URI -> Uri changes
- IOUtil, JarUtil and TempJarCache still holds some
left over deprecated methods, which will be removed
after officially starting 2.3.0 (JOGL dependencies)
- Otherwise not URI utilization left
- Tests
- Cleaned ip TestUri01 and TestUri03Resolving
- TestUri03Resolving also tests URL -> Uri,
and hence mentioned Uri.PARSE_HINT_FIX_PATH
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
OSX and Windows)
- Refine Uri
- remove System.err.print*
- scheme is of type Encode
- Refine Uri.Encode
- substring(..) shall return type Encode
- Fix unit tests (passing on GNU/Linux, OSX and Windows)
|
|
|
|
| |
chars but '!', allows removal of PATH_MIN_LEGAL ; Add comment for Harmony values for review
|
|
|
|
|
|
|
|
|
|
|
|
| |
differentiating encoded/decoded variants by type [Part 1]
- Add immutable com.jogamp.common.net.Uri class impl. RFC 2396 w/ encoding of RFC 3986
- Class Uri.Encoded is used to represent encoded parts
- IOUtil: Remove unused methods (residing in Uri) and mark others deprecated (will move to Uri)
- Adopt usage of Uri: This must be completet in follow-up commits!
|