Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8291633

Build failures with GCC 11, Alpine 3 due to incompatible casts from nullptr

XMLWordPrintable

    • gc
    • b09
    • x86
    • linux_alpine

        On Alpine 3.16 (using gcc version 11.2.1 20220219 (Alpine 11.2.1_git20220219)) I run into the following build error :


        /openjdk/build/make-support/failure-logs # more hotspot_variant-server_libjvm_objs_abstractDisassembler.o.log
        In file included from /openjdk/src/jdk/src/hotspot/share/gc/shared/barrierSetConfig.inline.hpp:40,
                         from /openjdk/src/jdk/src/hotspot/share/oops/access.inline.hpp:31,
                         from /openjdk/src/jdk/src/hotspot/share/oops/oop.inline.hpp:31,
                         from /openjdk/src/jdk/src/hotspot/share/compiler/abstractDisassembler.cpp:32:
        /openjdk/src/jdk/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.inline.hpp: In instantiation of 'oopDesc* ShenandoahBarrierSet::oop_xchg(DecoratorSet, T*, oop) [with T = oopDesc*; oop = oopDesc*; DecoratorSet = long unsigned int]':
        /openjdk/src/jdk/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.inline.hpp:305:22: required from 'static oopDesc* ShenandoahBarrierSet::AccessBarrier<decorators, BarrierSetT>::oop_atomic_xchg_in_heap(T*, oop) [with T = oopDesc*; long unsigned int decorators = 549924; BarrierSetT = ShenandoahBarrierSet; oop = oopDesc*]'
        /openjdk/src/jdk/src/hotspot/share/oops/access.inline.hpp:101:54: required from 'static oopDesc* AccessInternal::PostRuntimeDispatch<GCBarrierType, AccessInternal::BARRIER_ATOMIC_XCHG, decorators>::oop_access_barrier(void*, oop) [with GCBarrierType = ShenandoahBarrierSet::AccessBarrier<549924, ShenandoahBarrierSet>; long unsigned int decorators = 549924; oop = oopDesc*]'
        /openjdk/src/jdk/src/hotspot/share/oops/access.inline.hpp:222:9: required from 'static typename EnableIf<HasDecorator<ds, 4>::value, FunctionPointerT>::type AccessInternal::BarrierResolver<decorators, FunctionPointerT, barrier_type>::resolve_barrier_gc() [with long unsigned int ds = 549924; long unsigned int decorators = 549892; FunctionPointerT = oopDesc* (*)(void*, oopDesc*); AccessInternal::BarrierType barrier_type = AccessInternal::BARRIER_ATOMIC_XCHG; typename EnableIf<HasDecorator<ds, 4>::value, FunctionPointerT>::type = oopDesc* (*)(void*, oopDesc*); EnableIf<HasDecorator<ds, 4>::value, FunctionPointerT> = std::enable_if<true, oopDesc* (*)(void*, oopDesc*)>]'
        /openjdk/src/jdk/src/hotspot/share/oops/access.inline.hpp:257:55: required from 'static FunctionPointerT AccessInternal::BarrierResolver<decorators, FunctionPointerT, barrier_type>::resolve_barrier_rt() [with long unsigned int decorators = 549892; FunctionPointerT = oopDesc* (*)(void*, oopDesc*); AccessInternal::BarrierType barrier_type = AccessInternal::BARRIER_ATOMIC_XCHG]'
        /openjdk/src/jdk/src/hotspot/share/oops/access.inline.hpp:264:32: required from 'static FunctionPointerT AccessInternal::BarrierResolver<decorators, FunctionPointerT, barrier_type>::resolve_barrier() [with long unsigned int decorators = 549892; FunctionPointerT = oopDesc* (*)(void*, oopDesc*); AccessInternal::BarrierType barrier_type = AccessInternal::BARRIER_ATOMIC_XCHG]'
        /openjdk/src/jdk/src/hotspot/share/oops/access.inline.hpp:321:96: [ skipping 2 instantiation contexts, use -ftemplate-backtrace-limit=0 to disable ]
        /openjdk/src/jdk/src/hotspot/share/oops/accessBackend.hpp:538:31: required from 'static T AccessInternal::RuntimeDispatch<decorators, T, AccessInternal::BARRIER_ATOMIC_XCHG>::atomic_xchg(void*, T) [with long unsigned int decorators = 549892; T = oopDesc*]'
        /openjdk/src/jdk/src/hotspot/share/oops/accessBackend.hpp:850:80: required from 'static typename EnableIf<(! HasDecorator<decorators, 2048>::value), T>::type AccessInternal::PreRuntimeDispatch::atomic_xchg(void*, T) [with long unsigned int decorators = 549892; T = oopDesc*; typename EnableIf<(! HasDecorator<decorators, 2048>::value), T>::type = oopDesc*; EnableIf<(! HasDecorator<decorators, 2048>::value), T> = std::enable_if<true, oopDesc*>]'
        /openjdk/src/jdk/src/hotspot/share/oops/accessBackend.hpp:1014:64: required from 'T AccessInternal::atomic_xchg_reduce_types(T*, T) [with long unsigned int decorators = 549892; T = oopDesc*]'
        /openjdk/src/jdk/src/hotspot/share/oops/accessBackend.hpp:1198:57: required from 'T AccessInternal::atomic_xchg(P*, T) [with long unsigned int decorators = 525316; P = oopDesc*; T = oopDesc*]'
        /openjdk/src/jdk/src/hotspot/share/oops/access.hpp:269:75: required from 'static T Access<decorators>::oop_atomic_xchg(P*, T) [with P = oopDesc*; T = oopDesc*; long unsigned int decorators = 525312]'
        /openjdk/src/jdk/src/hotspot/share/oops/oopHandle.inline.hpp:65:51: required from here
        /openjdk/src/jdk/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.inline.hpp:214:62: error: invalid cast from type 'std::nullptr_t' to type 'oopDesc**'
          214 | previous = load_reference_barrier<T>(decorators, previous, reinterpret_cast<T*>(NULL));
              | ^~~~~~~~~~~~~~~~~~~~~~~~~~

              shade Aleksey Shipilev
              mbaesken Matthias Baesken
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: