You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This just results in skipping some native methods and marking libraries as "good" without them actually being "good".
Proposed fix
It would be better to not try to load class into JVM, but rather parse the bytecode using javassist. That way class could be analyzed for presence of native methods without loading all dependent classes.
The text was updated successfully, but these errors were encountered:
aidar-stripe
changed the title
NoClassDefFoundError in JarNativeInfo misses potential native methods
graviton-ready-java: NoClassDefFoundError in JarNativeInfo misses potential native methods
May 25, 2024
Describe the bug
When you ask tool to verify N jars, that are dependent on each other, like:
jar1
->Class1
jar2
->Class2
jar3
->Class3
And
Class2
has a dependency onClass1
and also contains native methods,JarNativeInfo
would try to loadClass2
, but fail willNoClassDefFound
error, that would be ignored: https://github.com/aws/porting-advisor-for-graviton/blob/main/src/advisor/tools/graviton-ready-java/src/main/java/com/amazonaws/labs/GravitonReadyAssessor/JarNativeInfo.java#L185This just results in skipping some native methods and marking libraries as "good" without them actually being "good".
Proposed fix
It would be better to not try to load class into JVM, but rather parse the bytecode using javassist. That way class could be analyzed for presence of native methods without loading all dependent classes.
The text was updated successfully, but these errors were encountered: