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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 10
    • 10
    • hotspot
    • b21

      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.

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

              Created:
              Updated:
              Resolved: