Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create toShortSignature() in Method.java #454

Merged

Conversation

eklaDFF
Copy link

@eklaDFF eklaDFF commented May 24, 2024

Created toShortSignature() in Method.java

@cyrille-artho
Copy link
Member

Hi,
This PR does not fix any additional failing test. We had 14 failing tests before and now. Can you please check again?

@eklaDFF
Copy link
Author

eklaDFF commented May 24, 2024 via email

@eklaDFF
Copy link
Author

eklaDFF commented May 24, 2024 via email

@cyrille-artho
Copy link
Member

How many failing tests do you have locally? The patch for repeat is already in JPF at this point, so perhaps this patch does not affect any additional features? Is there a test that failed before but works now? Perhaps the patch breaks a test that passed earlier (possibly for the wrong reason such as an incomplete check of the resulting state/output)?

@eklaDFF
Copy link
Author

eklaDFF commented May 24, 2024

Currently there is 14 failing test cases. The method repeat() solved two failing test case reducing total failed test cases to 14. No, there is not any test cases that failed before and now work.

Here is the link to see the changes https://github.com/eklaDFF/jpf-core

/////////////////////////////////////////////
Should we try with exact copy of code from OpenJDK17 to see we are at correct output ?

@cyrille-artho
Copy link
Member

In that case, is this patch a first step for a later fix of something? If that's the case, we can wait with a PR until the next change fixes something.

@eklaDFF
Copy link
Author

eklaDFF commented May 24, 2024 via email

@eklaDFF
Copy link
Author

eklaDFF commented May 25, 2024

A. Error report without implementing toShortSignature() in Method.java

gov.nasa.jpf.vm.NoUncaughtExceptionsProperty
java.lang.NoSuchMethodError: java.lang.reflect.Method.toShortSignature()Ljava/lang/String;
	at java.lang.reflect.ProxyGenerator$ProxyMethod.<init>(ProxyGenerator.java:711)
	at java.lang.reflect.ProxyGenerator.<clinit>(ProxyGenerator.java:108)
	at java.lang.reflect.Proxy.getProxyClass(Proxy.java:73)
	at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:85)
	at gov.nasa.jpf.test.vm.reflection.ProxyTest.testBasicProxy(ProxyTest.java:60)
	at java.lang.reflect.Method.invoke(gov.nasa.jpf.vm.JPF_java_lang_reflect_Method)
	at gov.nasa.jpf.util.test.TestJPF.runTestMethod(TestJPF.java:648)

B. Error report after implementing toShortSignature() in Method.java

gov.nasa.jpf.vm.NoUncaughtExceptionsProperty
java.lang.NoSuchMethodError: java.lang.Class.descriptorString()Ljava/lang/String;
	at sun.invoke.util.BytecodeDescriptor.unparseSig(BytecodeDescriptor.java:155)
	at sun.invoke.util.BytecodeDescriptor.unparseMethod(BytecodeDescriptor.java:144)
	at java.lang.invoke.MethodType.toMethodDescriptorString(MethodType.java:1190)
	at java.lang.reflect.ProxyGenerator$ProxyMethod.generateMethod(ProxyGenerator.java:721)
	at java.lang.reflect.ProxyGenerator.generateClassFile(ProxyGenerator.java:500)
	at java.lang.reflect.ProxyGenerator.generateProxyClass(ProxyGenerator.java:178)
	at java.lang.reflect.Proxy.getProxyClass(Proxy.java:73)
	at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:85)
	at gov.nasa.jpf.test.vm.reflection.ProxyTest.testBasicProxy(ProxyTest.java:60)
	at java.lang.reflect.Method.invoke(gov.nasa.jpf.vm.JPF_java_lang_reflect_Method)
	at gov.nasa.jpf.util.test.TestJPF.runTestMethod(TestJPF.java:648)

In A, our error is reported while it is at static block and in B our error is reported way ahead.

@cyrille-artho
Copy link
Member

Thank you for your explanation. I'll merge this as a partial fix for that test case (and I don't see a need to create a smaller test case where only the first function is needed).

@cyrille-artho cyrille-artho merged commit 3650f5a into javapathfinder:java-17 May 25, 2024
0 of 2 checks passed
@eklaDFF eklaDFF deleted the toShortSignatureBranch branch May 30, 2024 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants