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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 10
    • Affects Version/s: 10
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved: