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

ubsan aarch64: immediate_aarch64.cpp:298:31: runtime error: shift exponent 32 is too large for 32-bit type 'int'

XMLWordPrintable

    • aarch64
    • os_x

      On macOS aarch64 with ubsan enabled, we run into this issue :

      src/hotspot/cpu/aarch64/immediate_aarch64.cpp:298:31: runtime error: shift exponent 32 is too large for 32-bit type 'int'

          #0 0x108778830 in initLITables_t::initLITables_t() immediate_aarch64.cpp:340
          #1 0x18edb5058 in invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const::$_0::operator()() const+0xa4 (dyld:arm64e+0xfffffffffff69058)
          #2 0x18edf30d0 in invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const+0xa8 (dyld:arm64e+0xfffffffffffa70d0)
          #3 0x18ede6998 in invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const+0x1ec (dyld:arm64e+0xfffffffffff9a998)
          #4 0x18ed962f8 (<unknown module>)
          #5 0x18ede592c in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const+0xbc (dyld:arm64e+0xfffffffffff9992c)
          #6 0x18ede8204 in dyld3::MachOFile::forEachInitializerPointerSection(Diagnostics&, void (unsigned int, unsigned int, bool&) block_pointer) const+0x9c (dyld:arm64e+0xfffffffffff9c204)
          #7 0x18edf2dc4 in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const+0x1ac (dyld:arm64e+0xfffffffffffa6dc4)
          #8 0x18edb106c (<unknown module>)
          #9 0x18edb7610 in dyld4::JustInTimeLoader::runInitializers(dyld4::RuntimeState&) const+0x20 (dyld:arm64e+0xfffffffffff6b610)
          #10 0x18edb1458 (<unknown module>)
          #11 0x18edb50e8 in dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const::$_1::operator()() const+0x70 (dyld:arm64e+0xfffffffffff690e8)
          #12 0x18edb1624 (<unknown module>)
          #13 0x18edcd624 in dyld4::APIs::dlopen_from(char const*, int, void*)+0x6d0 (dyld:arm64e+0xfffffffffff81624)
          #14 0x1028d60e0 in LoadJavaVM java_md_macosx.m:553
          #15 0x1028cd928 in JLI_Launch java.c:296
          #16 0x102417998 in main main.c:166
          #17 0x1028d70b8 in apple_main java_md_macosx.m:310
          #18 0x18f122f90 in _pthread_start+0x84 (libsystem_pthread.dylib:arm64e+0x6f90)
          #19 0x18f11dd30 in thread_start+0x4 (libsystem_pthread.dylib:arm64e+0x1d30)

      Seems the nbits shift is reported, maybe this could be omitted (why is this shift needed here at all) ?

          uint64_t or_bits_top = (0 << nbits) | or_bits_sub;

            Unassigned Unassigned
            mbaesken Matthias Baesken
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: