-
Notifications
You must be signed in to change notification settings - Fork 370
Handle internal function signatures correctly for functions used by records in Java 17 #513
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
base: java-17
Are you sure you want to change the base?
Conversation
…thod to handle BMTypes.RECORDS_0
It looks like the tests for
Please check. |
Yes it fails.
I meant to say that the error of ClassNotFound I or Z disappeared
…On Sat, 1 Feb, 2025, 8:41 pm cyrille-artho, ***@***.***> wrote:
It looks like the tests for equals and hashcode still fail:
java17.RecordFeatureTest > testRecordHashCode FAILED
java.lang.AssertionError at RecordFeatureTest.java:38
java17.RecordFeatureTest > testRecordEquality FAILED
java.lang.AssertionError at RecordFeatureTest.java:28
Please check.
—
Reply to this email directly, view it on GitHub
<#513 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASVOVFZYGWH2V5SZUHLTJ732NTP3PAVCNFSM6AAAAABWGJBHQ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMRYHE4DSNJQHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Perhaps the Java bytecode-style class descriptor is needed here? That would be |
No, Ljava/lang/Boolean do not help much.
====================================================== system under test
java17.RecordFeatureTest.runTestMethod()
====================================================== search started:
06/02/25, 3:11 am
[WARNING] orphan NativePeer method:
jdk.internal.misc.Unsafe.getUnsafe()Lsun/misc/Unsafe;
====================================================== error 1
gov.nasa.jpf.vm.NoUncaughtExceptionsProperty
java.lang.ClassNotFoundException: class not found: Ljava.lang.Boolean
at java17.RecordFeatureTest$Point.equals(RecordFeatureTest.java:7)
at gov.nasa.jpf.util.test.TestJPF.assertEquals(TestJPF.java:1041)
at java17.RecordFeatureTest.testRecordEquality(RecordFeatureTest.java:32)
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)
…On Mon, Feb 3, 2025 at 12:38 PM cyrille-artho ***@***.***> wrote:
functionalInterfaceName = "java.lang.Boolean";
Perhaps the Java bytecode-style class descriptor is needed here? That
would be Ljava/lang/Boolean. Try that and see if the test for equals then
passes.
—
Reply to this email directly, view it on GitHub
<#513 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASVOVF3DY27WPKZHCSZQWQD2N4IWFAVCNFSM6AAAAABWGJBHQ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMZQGEZTKNBRGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hi, did you see that ?
…On Thu, 6 Feb, 2025, 3:13 am Ekla, ***@***.***> wrote:
No, Ljava/lang/Boolean do not help much.
====================================================== system under test
java17.RecordFeatureTest.runTestMethod()
====================================================== search started:
06/02/25, 3:11 am
[WARNING] orphan NativePeer method:
jdk.internal.misc.Unsafe.getUnsafe()Lsun/misc/Unsafe;
====================================================== error 1
gov.nasa.jpf.vm.NoUncaughtExceptionsProperty
java.lang.ClassNotFoundException: class not found: Ljava.lang.Boolean
at java17.RecordFeatureTest$Point.equals(RecordFeatureTest.java:7)
at gov.nasa.jpf.util.test.TestJPF.assertEquals(TestJPF.java:1041)
at java17.RecordFeatureTest.testRecordEquality(RecordFeatureTest.java:32)
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)
On Mon, Feb 3, 2025 at 12:38 PM cyrille-artho ***@***.***>
wrote:
> functionalInterfaceName = "java.lang.Boolean";
>
> Perhaps the Java bytecode-style class descriptor is needed here? That
> would be Ljava/lang/Boolean. Try that and see if the test for equals
> then passes.
>
> —
> Reply to this email directly, view it on GitHub
> <#513 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ASVOVF3DY27WPKZHCSZQWQD2N4IWFAVCNFSM6AAAAABWGJBHQ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMZQGEZTKNBRGE>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
Try |
[image: Screenshot 2025-02-10 at 1.57.55 PM.png]
It is being translated to Try Ljava/lang/Boolean instead of Ljava.lang.Boolean
from Ljava/lang/Boolean
…On Mon, Feb 10, 2025 at 1:31 PM cyrille-artho ***@***.***> wrote:
Try Ljava/lang/Boolean instead of Ljava.lang.Boolean, as forward slashes
are used in the bytecode.
—
Reply to this email directly, view it on GitHub
<#513 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASVOVFZF4BPKFFBC5ZFSZAT2PBMF7AVCNFSM6AAAAABWGJBHQ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNBXGIYDCOJZGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
[image: Screenshot 2025-02-10 at 1.59.31 PM.png]
In case of java.lang.Integer,the error is forwarded to Assertion Error. Do
you not think at this point, JVM is able to find the Integer Class ?
…On Mon, Feb 10, 2025 at 1:59 PM Ekla ***@***.***> wrote:
[image: Screenshot 2025-02-10 at 1.57.55 PM.png]
It is being translated to Try Ljava/lang/Boolean instead of Ljava.lang.Boolean
from Ljava/lang/Boolean
On Mon, Feb 10, 2025 at 1:31 PM cyrille-artho ***@***.***>
wrote:
> Try Ljava/lang/Boolean instead of Ljava.lang.Boolean, as forward slashes
> are used in the bytecode.
>
> —
> Reply to this email directly, view it on GitHub
> <#513 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ASVOVFZF4BPKFFBC5ZFSZAT2PBMF7AVCNFSM6AAAAABWGJBHQ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNBXGIYDCOJZGI>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
Your current version in the PR does not translate |
Hi, updated the one statement as
to make difference in their output behaviour. |
The test still fail, and I'm not sure why. The initial "L" is missing in "Ljava/lang/Boolean", but the descriptor for Integer is correct, so that is not necessarily the reason for the test for "equals" to fail. |
Actually I left them intentionally to see how they behave. But fixed them now. Now look at them. Should I debug them and create a diagram of program flow to understand ? Or should schedule a meeting for exploring what is happening there, if you have time ? One thing to notice is that when we remove |
Overall, ClassLoader is having some problem ? Like not not loading the Class at the time of requirement ? |
That is interesting; perhaps some parts of JPF's code expect that the |
You were right,
From here, we are assured that either we have to move forward with directly |
Try a workaround in |
Either it is |
Thanks for checking. It must be something else then. |
2025-02-24 01-50-46.mp4
<https://drive.google.com/file/d/1rAm-nMycVoZDwfNVXyFlCq2jiCv5kebU/view?usp=drive_web>
If frame (DirectCallStackFrame) is null then it executes the if part and
calls for re-execution otherwise executes the else part. When it is called
for re-execution, fame is now not null and then else is executed.
Catch is that for the failing test, 2nd execution call is not taking place.
…On Sun, Feb 23, 2025 at 11:39 PM cyrille-artho ***@***.***> wrote:
Thanks for checking. It must be something else then.
—
Reply to this email directly, view it on GitHub
<#513 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASVOVF5X4G3X3J7G4XJOWUD2RIFEZAVCNFSM6AAAAABWGJBHQ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNZXGAYTMNJZHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
[image: cyrille-artho]*cyrille-artho* left a comment
(javapathfinder/jpf-core#513)
<#513 (comment)>
Thanks for checking. It must be something else then.
—
Reply to this email directly, view it on GitHub
<#513 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASVOVF5X4G3X3J7G4XJOWUD2RIFEZAVCNFSM6AAAAABWGJBHQ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNZXGAYTMNJZHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I have added you for access to the above video. Please have a look.
…On Mon, Feb 24, 2025 at 2:05 AM Ekla ***@***.***> wrote:
2025-02-24 01-50-46.mp4
<https://drive.google.com/file/d/1rAm-nMycVoZDwfNVXyFlCq2jiCv5kebU/view?usp=drive_web>
If frame (DirectCallStackFrame) is null then it executes the if part
and calls for re-execution otherwise executes the else part. When it is
called for re-execution, fame is now not null and then else is executed.
Catch is that for the failing test, 2nd execution call is not taking place.
On Sun, Feb 23, 2025 at 11:39 PM cyrille-artho ***@***.***>
wrote:
> Thanks for checking. It must be something else then.
>
> —
> Reply to this email directly, view it on GitHub
> <#513 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ASVOVF5X4G3X3J7G4XJOWUD2RIFEZAVCNFSM6AAAAABWGJBHQ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNZXGAYTMNJZHE>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
> [image: cyrille-artho]*cyrille-artho* left a comment
> (javapathfinder/jpf-core#513)
> <#513 (comment)>
>
> Thanks for checking. It must be something else then.
>
> —
> Reply to this email directly, view it on GitHub
> <#513 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ASVOVF5X4G3X3J7G4XJOWUD2RIFEZAVCNFSM6AAAAABWGJBHQ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNZXGAYTMNJZHE>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
Thanks. It looks like the failed class lookup in your video happens at application level, not within JPF. JPF reports a violation of "NoUncaughtExceptionProperty" with a stack trace that includes (only) the test case. |
Still the problem remains same as
|
It is possible that something that goes wrong at the JPF level causes the exception to appear at application level. |
IMPORTANT Point 1 :
When we pass |
Is there any other way to see the flow of method calls with parameters ? Printing Statements creates huge logs and becomes complex to analyse them. |
You can try adding the option |
To see me method flow, added
|
@pparizek , can you please check? |
There are some debugging print statements in some of the commits, that should not be merged into the java-17 branch. Please remove them first. |
I will have more time to dig into this (read the log/output, think about internal class names versus source-level class name) starting from April 7 or so. At this time we have a local grant application deadline approaching very fat, and now I am very busy with teaching-related stuff too. |
No description provided.