JDK-8353946 : Incorrect WINDOWS ifdef in os::build_agent_function_name
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 24
  • Priority: P3
  • Status: New
  • Resolution: Unresolved
  • OS: windows
  • Submitted: 2025-04-07
  • Updated: 2025-04-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 25
25Unresolved
Related Reports
Causes :  
Description
The os::build_agent_function_name code contains:

#ifdef WINDOWS
      else { // Need to check for drive prefix e.g. C:L.dll
        if ((start = strchr(lib_name, ':')) != nullptr) {
          lib_name = ++start;
        }
      }
#endif

but the build does not define WINDOWS, it defines _WINDOWS.

Obviously testing is lacking in this area. However it only affects agents specified using a drive letter only, with no path e.g. C:foo.dll. It is unlikely many agents get specified this way.
Comments
Workaround: specify the full-path to the agent
08-04-2025