RFR: JDK-8294902: Undefined Behavior in C2 regalloc with null references [v9]

Andrew Haley aph at openjdk.org
Mon Dec 12 17:53:37 UTC 2022


On Mon, 12 Dec 2022 15:22:23 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> Andrew Haley has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Reviewer feedback
>
> src/hotspot/share/runtime/vmStructs.hpp line 193:
> 
>> 191: // Converts any type T to a reference type.
>> 192: template<typename T>
>> 193: std::add_rvalue_reference_t<T> declval() noexcept;
> 
> I think I'd prefer this was in globalDefinitions.hpp rather than squirreled away in this obscure location.  But maybe that can wait until someone else needs it.  (And maybe by then we can use std::declval :) )

I tried that, but it needed <type_traits> in globalDefinitions.hpp, so I backed off. How's this?

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

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


More information about the hotspot-dev mailing list