JDK-8166501 : compilation error in stackwalk.cpp on some gccs
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.lang
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-09-22
  • Updated: 2016-10-14
  • Resolved: 2016-09-22
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 9
9 b140Fixed
Related Reports
Relates :  
Description
This should be THREAD in the return statement.  It gets a compilation error on my version of gcc.

diff --git a/src/share/vm/prims/stackwalk.cpp b/src/share/vm/prims/stackwalk.cpp
--- a/src/share/vm/prims/stackwalk.cpp
+++ b/src/share/vm/prims/stackwalk.cpp
@@ -331,10 +331,10 @@
     assert (use_frames_array(mode), "Bad mode for get live frame");
     RegisterMap regMap(jt, true);
     LiveFrameStream stream(jt, &regMap);
-    return fetchFirstBatch(stream, stackStream, mode, skip_frames, frame_count, start_index, frames_array, CHECK_NULL);
+    return fetchFirstBatch(stream, stackStream, mode, skip_frames, frame_count, start_index, frames_array, THREAD);
   } else {
     JavaFrameStream stream(jt, mode);
-    return fetchFirstBatch(stream, stackStream, mode, skip_frames, frame_count, start_index, frames_array, CHECK_NULL);
+    return fetchFirstBatch(stream, stackStream, mode, skip_frames, frame_count, start_index, frames_array, THREAD);
   }
 }

Comments
Ah, so the difference was slowdebug. Should be a quick one to fix. Thanks Brent.
22-09-2016

I get error with devkit(gcc4.9.2-OEL6.4) (slowdebug): /home/rehn/source/jdk/ul_bt/hotspot/src/share/vm/prims/stackwalk.cpp: In static member function 'static oopDesc* StackWalk::walk(Handle, jlong, int, int, int, objArrayHandle, Thread*)': /home/rehn/source/jdk/ul_bt/hotspot/src/share/vm/prims/stackwalk.cpp:339:1: error: control reaches end of non-void function [-Werror=return-type] } It's from: 8165372: StackWalker performance regression following JDK-8147039
22-09-2016