8157464: Disallow StackWalker.getCallerClass() be called by caller-sensitive method

Reviewed-by: bchristi, coleenp, dfuchs, sspitsyn
This commit is contained in:
Mandy Chung 2016-09-14 11:53:20 -07:00
parent cc223fcb91
commit 5460376f61
3 changed files with 17 additions and 3 deletions

View file

@ -82,6 +82,9 @@ private:
static void fill_live_stackframe(Handle stackFrame, const methodHandle& method, int bci,
javaVFrame* jvf, TRAPS);
static inline bool get_caller_class(int mode) {
return (mode & JVM_STACKWALK_GET_CALLER_CLASS) != 0;
}
static inline bool skip_hidden_frames(int mode) {
return (mode & JVM_STACKWALK_SHOW_HIDDEN_FRAMES) == 0;
}