RFR: 8254231: Implementation of Foreign Linker API (Incubator) [v15]

Jorn Vernee jvernee at openjdk.java.net
Mon Nov 9 16:34:05 UTC 2020


On Fri, 6 Nov 2020 22:07:39 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> Maurizio Cimadamore has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 64 commits:
>> 
>>  - Merge branch '8254162' into 8254231_linker
>>  - Fix post-merge issues caused by 8219014
>>  - Merge branch 'master' into 8254162
>>  - Addess remaining feedback from @AlanBateman and @mrserb
>>  - Address comments from @AlanBateman
>>  - Fix typo in upcall helper for aarch64
>>  - Merge branch '8254162' into 8254231_linker
>>  - Merge branch 'master' into 8254162
>>  - Fix issues with derived buffers and IO operations
>>  - More 32-bit fixes for TestLayouts
>>  - ... and 54 more: https://git.openjdk.java.net/jdk/compare/a50fdd54...b38afb3f
>
> src/hotspot/cpu/aarch64/universalUpcallHandler_aarch64.cpp line 68:
> 
>> 66:   Symbol* cname_sym = SymbolTable::new_symbol(cname, (int)strlen(cname));
>> 67:   Symbol* mname_sym = SymbolTable::new_symbol(mname, (int)strlen(mname));
>> 68:   Symbol* mdesc_sym = SymbolTable::new_symbol(mdesc, (int)strlen(mdesc));
> 
> You don't need the strlen() argument.

Ok, I see it has an overload that does that in the header file (and I only looked at the .cpp file. :( )

> src/hotspot/cpu/aarch64/universalUpcallHandler_aarch64.cpp line 121:
> 
>> 119:                          upcall_info.upcall_method.name, upcall_info.upcall_method.sig,
>> 120:                          &args, thread);
>> 121: }
> 
> This code shouldn't be in the cpu directory.  This should be in SharedRuntime or in jni.cpp.  It should have a JNI_ENTRY and not transition directly.  I don't know what AttachCurrentThreadAsDaemon does.

Roger that.

We need the thread state transition though in case we get a random native thread calling us.

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

PR: https://git.openjdk.java.net/jdk/pull/634



More information about the security-dev mailing list