JDK-8206454 : [8u] os::current_stack_pointer() fails to compile on later Windows compilers (warning C4172: returning address of local variable)
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-07-06
  • Updated: 2020-04-12
  • Resolved: 2018-07-09
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 7 JDK 8
7u271Fixed 8u192 b02Fixed
Description
Using a later Windows compiler such as VS2017 on 8u, we have the compile error:

...\hotspot\src\os_cpu\windows_x86\vm\os_windows_x86.cpp(460) : warning C4172: returning address of local variable or temporary: dummy

We really do want to return the local variable address, we can add a #pragma to avoid this error.