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

noexecstack check in os::dll_load on Linux is too expensive

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 10
    • Fix Version/s: 10
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b21

      Description

      void * os::dll_load(const char *filename, char *ebuf, int ebuflen) {
      ...
        if (os::uses_stack_guard_pages() && !os::Linux::_stack_is_executable) {
          ElfFile ef(filename);
          if (!ef.specifies_noexecstack()) {

      the ElfFile calls load_table() which creates a lot of data structure, but specifies_noexecstack just checks for a little bit of info specified in the header. As a result, we may unnecessarily spend a lot of time with large .so files.

        Attachments

          Activity

            People

            • Assignee:
              kvn Vladimir Kozlov
              Reporter:
              iklam Ioi Lam
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: