Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitced7909

Browse files
committed
8275286: Check current thread when calling JRT methods that expect it
Reviewed-by: zgu, coleenp, dholmes
1 parentc0f3e1d commitced7909

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎src/hotspot/share/runtime/interfaceSupport.inline.hpp‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ class VMNativeEntryWrapper {
300300

301301
#defineJRT_ENTRY(result_type, header) \
302302
result_type header { \
303+
assert(current ==JavaThread::current(),"Must be"); \
303304
MACOS_AARCH64_ONLY(ThreadWXEnable__wx(WXWrite, current)); \
304305
ThreadInVMfromJava__tiv(current); \
305306
VM_ENTRY_BASE(result_type, header, current) \
@@ -327,6 +328,7 @@ class VMNativeEntryWrapper {
327328

328329
#defineJRT_ENTRY_NO_ASYNC(result_type, header) \
329330
result_type header { \
331+
assert(current ==JavaThread::current(),"Must be"); \
330332
MACOS_AARCH64_ONLY(ThreadWXEnable__wx(WXWrite, current)); \
331333
ThreadInVMfromJava__tiv(current,false/* check asyncs*/); \
332334
VM_ENTRY_BASE(result_type, header, current) \
@@ -336,17 +338,20 @@ class VMNativeEntryWrapper {
336338
// to get back into Java from the VM
337339
#defineJRT_BLOCK_ENTRY(result_type, header) \
338340
result_type header { \
341+
assert(current ==JavaThread::current(),"Must be"); \
339342
MACOS_AARCH64_ONLY(ThreadWXEnable__wx(WXWrite, current)); \
340343
HandleMarkCleaner__hm(current);
341344

342345
#defineJRT_BLOCK \
343346
{ \
347+
assert(current ==JavaThread::current(),"Must be"); \
344348
ThreadInVMfromJava__tiv(current); \
345349
JavaThread* THREAD = current;/* For exception macros.*/ \
346350
debug_only(VMEntryWrapper __vew;)
347351

348352
#defineJRT_BLOCK_NO_ASYNC \
349353
{ \
354+
assert(current ==JavaThread::current(),"Must be"); \
350355
ThreadInVMfromJava__tiv(current,false/* check asyncs*/); \
351356
JavaThread* THREAD = current;/* For exception macros.*/ \
352357
debug_only(VMEntryWrapper __vew;)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp