RFR: 8253970: Build error: address argument to atomic builtin must be a pointer to integer or pointer ('volatile narrowOop *' invalid)

Kim Barrett kbarrett at openjdk.java.net
Sat Oct 3 16:23:37 UTC 2020


On Sat, 3 Oct 2020 16:05:57 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> __sync_val_compare_and_swap shouldn't call with narrowOop* for clang after JDK-8247912.
>> Before passing type T to __sync_val_compare_and_swap, the fix converts T to uint32_t* if sizeof(T) == 4.
>> 
>> Testing:
>>  - Zero VM build on Linux and MacOS with clang
>>  - Zero VM build on Linux with gcc
>
> No, don't make this change.  Something else is going wrong here.  The Platform layer shouldn't be called with enum
> types; the higher level platform-independent layer should have canonicalized such to the associated underlying integral
> types.

Apparently I misremembered.  The platform-independent layer isn't doing that canonicalization of enum types to
associated integral types.  But I think it should be in some places.

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

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


More information about the hotspot-runtime-dev mailing list