I have encountered a problem with the apgas library when running on SPARC architecture. The problem is that the calls made by the library to Kryo rely on Sun.misc.Unsafe. This is fine on x86 but crashes on SPARC architectures.
It is a known issue with the Kryo library and can easily be solved : EsotericSoftware/kryo#219 (comment)
In file apgas/apgas/src/apgas/impl/KryoSerializer.java
@Override
public void write(ObjectDataOutput objectDataOutput, Object object)
throws IOException {
final Output output = new UnsafeOutput((OutputStream) objectDataOutput);
final Kryo kryo = kryoThreadLocal.get();
kryo.writeClassAndObject(output, object);
output.flush();
}
@Override
public Object read(ObjectDataInput objectDataInput) throws IOException {
final Input input = new UnsafeInput((InputStream) objectDataInput);
final Kryo kryo = kryoThreadLocal.get();
return kryo.readClassAndObject(input);
}
Replacing UnsafeOutput by Output and UnsafeInput by Input will prevent the crash from happening.
I have encountered a problem with the apgas library when running on SPARC architecture. The problem is that the calls made by the library to Kryo rely on Sun.misc.Unsafe. This is fine on x86 but crashes on SPARC architectures.
It is a known issue with the Kryo library and can easily be solved : EsotericSoftware/kryo#219 (comment)
In file apgas/apgas/src/apgas/impl/KryoSerializer.java
Replacing
UnsafeOutputbyOutputandUnsafeInputbyInputwill prevent the crash from happening.