JDK-8253970 : Build error: address argument to atomic builtin must be a pointer to integer or pointer ('volatile narrowOop *' invalid)
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 16
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-10-03
  • Updated: 2021-01-04
  • Resolved: 2020-10-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 16
16 b21Fixed
Related Reports
Relates :  
Description
* Symptom
------------------------------------------------
/jdk/src/hotspot/os_cpu/bsd_zero/atomic_bsd_zero.hpp:258:10: error: address argument to atomic builtin must be a pointer to integer or pointer ('volatile narrowOop *' invalid)
  return __sync_val_compare_and_swap(dest, compare_value, exchange_value);
         ^                           ~~~~
./src/hotspot/share/runtime/atomic.hpp:746:12: note: in instantiation of function template specialization 'Atomic::PlatformCmpxchg<4>::operator()<narrowOop>' requested here
    return PlatformCmpxchg<sizeof(T)>()(dest,
           ^
./src/hotspot/share/runtime/atomic.hpp:722:10: note: in instantiation of member function 'Atomic::CmpxchgImpl<narrowOop, narrowOop, narrowOop, void>::operator()' requested here
  return CmpxchgImpl<D, U, T>()(dest, compare_value, exchange_value, order);
         ^
   ... (rest of output omitted)
------------------------------------------------

* Reproduce
Build Zero VMs with clang on Linux or MacOS platforms
Comments
Changeset: cb7701b7 Author: Jie Fu <jiefu@openjdk.org> Date: 2020-10-19 13:18:50 +0000 URL: https://git.openjdk.java.net/jdk/commit/cb7701b7
19-10-2020