On Fri, 11 Sep 2026 16:00:37 GMT, John R Rose <[email protected]> wrote:

>> In current code I found this code which makes address table dependent on the 
>> VM config:
>> 
>> 
>>     if (ValueTypeReturnedAsFields) {                                         
>>                                                                              
>>                                                                              
>>                        
>>       ADD_EXTERNAL_ADDRESS(SharedRuntime::store_value_type_fields_to_buf);   
>>                                                                              
>>                                                                              
>>                        
>>     }
>> 
>> 
>> So we already have this problem in the current code base.
>
> One partial solution: Fold the conditional flag expression into the macro 
> call, and have the macro somehow incorporate logic to check or assert that 
> the condition is the same for AP (as recorded in cache) and TR.
> 
> To be clear about priorities here: I don't think there is a significant bug 
> here. I would support separate config-hardening PRs after this PR. I predict 
> we are not going to get all the config checks shaken out in one go. 
> 
> But, a check of extrs-length will catch bugs (or a few at different phases) 
> will make a broad fence against config alignment bugs on the addrs array. So 
> I recommend that for this PR.

> So we already have this problem in the current code base.

I am wrong here. It is not a problem because the flag 
`ValueTypeReturnedAsFields` is already being recorded in the AOTCodeCache 
config.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30778#discussion_r3991135027

Reply via email to