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

ubsan: vmreg.cpp checking error member call on misaligned address

    XMLWordPrintable

Details

    • b22
    • generic
    • generic

    Backports

      Description

        When using ubsan for checking undefined behavior, we run into the following error (clang / macOS x86_64 / fastdebug build) :
        /jdk/src/hotspot/share/code/vmreg.cpp:33:66: runtime error: member call on misaligned address 0x00011960afe9 for type 'VMRegImpl', which requires 2 byte alignment
        0x00011960afe9: note: pointer points here
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
                      ^
            #0 0x1177679c4 in _GLOBAL__sub_I_vmreg.cpp vmreg.cpp
            #1 0x1056d1b46 in ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&)+0x216 (dyld:x86_64+0x1db46)
            #2 0x1056d1f51 in ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&)+0x27 (dyld:x86_64+0x1df51)
            #3 0x1056ccae5 in ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&)+0x1eb (dyld:x86_64+0x18ae5)
            #4 0x1056ca89e in ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&)+0xbe (dyld:x86_64+0x1689e)
            #5 0x1056ca93f in ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&)+0x51 (dyld:x86_64+0x1693f)
            #6 0x1056baa11 in dyld::runInitializers(ImageLoader*)+0x51 (dyld:x86_64+0x6a11)
            #7 0x1056c6119 in dlopen_internal+0x267 (dyld:x86_64+0x12119)
            #8 0x7fff20450c93 in dlopen_internal(char const*, int, void*)+0xb8 (libdyld.dylib:x86_64+0x17c93)
            #9 0x7fff2043f07d in dlopen+0x1b (libdyld.dylib:x86_64+0x607d)
            #10 0x1030b8d51 in LoadJavaVM java_md_macosx.m:553
           ... (rest of output omitted)


        For some reason the error is still reported with switched off alignment checks (JDK-8331298) .

        Attachments

          Issue Links

            Activity

              People

                mdoerr Martin Doerr
                mbaesken Matthias Baesken
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: