Closed robby-phd closed 3 years ago
@robby-phd Thanks for reporting the issue we will check it out and let you know our thoughts
No idea what the class initializer
org.sireum.Os_Ext$.<clinit>
is doing. But definitely something that should not run at image build time. Why do you have --initialize-at-build-time
on the native image command line? Unless you have manually inspected all classes to be safe for initialization at image build time, this is not an option to use.
I thought I did, but I changed a field initialization that used to be simple and forgot to make the modified unsafe-at-build-time initialization lazy. It is interesting that the problem only manifests in Linux. Anyway, I have made the field lazy and confirmed that it workarounds the issue. Thanks.
as the issue has been resolved, closing the issue
It would be great if native-image behaves the same/similarly on the different platforms that it supports for the same input and options specified.
It would be great if native-image behaves the same/similarly on the different platforms that it supports for the same input and options specified.
But in that case the application is behaving differently on the different platforms.
Ah yes, you are right. Just curious, will there be a feature to abort native compilation with --initialize-at-build-time
when an init hits an unsafe method (and perhaps output a nice error message with the relevant call chain)?
Describe the issue For a jar file from my project, native-image hangs in Linux but compiles successfully in macOS (and Windows).
Steps to reproduce the issue
Describe GraalVM and your environment:
More details
It seems the issue is triggered from this line, which eventually calls
Thread.join()
/Object.wait()
.Logs: