On Thu, 10 Nov 2022 14:59:20 GMT, Maurizio Cimadamore <mcimadam...@openjdk.org> 
wrote:

>> Jorn Vernee has updated the pull request incrementally with two additional 
>> commits since the last revision:
>> 
>>  - Work around x86 failures
>>  - Review comments
>
> src/java.base/share/classes/jdk/internal/foreign/abi/CallingSequence.java 
> line 188:
> 
>> 186:     }
>> 187: 
>> 188:     public int capturedStateMask() {
> 
> Isn't this a final static during execution?

It's fixed for a particular linkage request, but it can differ between them. 
(for instance, on Windows one downcall handle can save `errno` and another can 
save `GetLastError`)

> src/java.base/share/classes/jdk/internal/foreign/abi/NativeEntryPoint.java 
> line 78:
> 
>> 76:     private static void checkType(MethodType methodType, boolean 
>> needsReturnBuffer, int savedValueMask) {
>> 77:         if (methodType.parameterType(0) != long.class) {
>> 78:             throw new IllegalArgumentException("Address expected as 
>> first param: " + methodType);
> 
> Is throwing IAE correct here? E.g. can the user do anything about it, or does 
> the exception describe more of an internal error? (In that case 
> AssertionError might be better?)

Yes, it's an internal error. I can change the exception type

> test/jdk/ProblemList.txt line 484:
> 
>> 482: # jdk_foreign
>> 483: 
>> 484: java/foreign/callarranger/TestAarch64CallArranger.java generic-x86
> 
> Should we exclude these tests on 32 bits in the jtreg header (as I think we 
> do for other tests) ?

I'm not sure what the conventional move here would be. Adding them to the 
problem list doesn't seem to make the failures go away in GHA at least. I can 
exclude them with `@requires` as well.

-------------

PR: https://git.openjdk.org/jdk/pull/11019

Reply via email to