8241319: WB_GetCodeBlob doesn't have ResourceMark
Igor Ignatyev
igor.ignatyev at oracle.com
Thu Mar 19 19:25:13 UTC 2020
Hi Leonid,
wouldn't it be better to add ResourceMark to codeBlob2objectArray?
-- Igor
> On Mar 19, 2020, at 12:14 PM, Leonid Mesnik <leonid.mesnik at oracle.com> wrote:
>
> Hi
>
> Could you please review following trivial fix which add ResourceMark in WB_GetCodeBlob. I verified that all other functions which call codeBlob2objectArray have ResourceMark already.
>
> The failure is not reproduced by regular testing. I hit it while running tests in virtual threads for project loom. See hs_err stack in jira issue.
>
>
> bug: https://bugs.openjdk.java.net/browse/JDK-8241319
>
> diff:
>
> diff --git a/src/hotspot/share/prims/whitebox.cpp b/src/hotspot/share/prims/whitebox.cpp
> index f8669d34a6..e389e6649d 100644
> --- a/src/hotspot/share/prims/whitebox.cpp
> +++ b/src/hotspot/share/prims/whitebox.cpp
> @@ -1632,6 +1632,7 @@ WB_ENTRY(jint, WB_GetCompilationActivityMode(JNIEnv* env, jobject o))
> WB_END
>
> WB_ENTRY(jobjectArray, WB_GetCodeBlob(JNIEnv* env, jobject o, jlong addr))
> + ResourceMark rm(THREAD);
> if (addr == 0) {
> THROW_MSG_NULL(vmSymbols::java_lang_NullPointerException(),
> "WB_GetCodeBlob: addr is null");
>
More information about the hotspot-compiler-dev
mailing list