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

MallocSiteTable::initialize() doesn't take function descriptors into account

    Details

    • Subcomponent:
      svc
    • Resolved In Build:
      b22

      Backports

        Description

        MallocSiteTable::initialize() creates a pseudo call stack for hashtable entry allocations which is populated with the addresses of some well-known static methods.

        However, taking the address of a function or static method in C/C++ isn't required to return the actual code address where that function lives in memory. On ppc64 (i.e. big-endian, ABI ELFv1) applying the address operator on a function will return the functions "function descriptor" (see http://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi-1.9.html#FUNC-DES) which is a struct of three pointers where the first one points to the actual function address.

        In order to get a correct stack trace on ppc64 as well, we therefore have to dereference the function descriptor before we can store the real function address.

        This bug is the reason why runtime/ElfDecoder/TestElfDirectRead.java fails on Linux/ppc64.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  simonis Volker Simonis
                  Reporter:
                  simonis Volker Simonis
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: