Skip to content

Commit 750a2f9

Browse files
committed
8375547: [lworld] Dependency verification fails with assert "Should have been marked for deoptimization"
Reviewed-by: mchevalier
1 parent c09d99d commit 750a2f9

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/hotspot/share/runtime/sharedRuntime.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2025, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2026, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -2936,13 +2936,17 @@ void CompiledEntrySignature::compute_calling_conventions(bool init) {
29362936
for (int i = 0; i < supers->length(); ++i) {
29372937
Method* super_method = supers->at(i);
29382938
if (super_method->is_scalarized_arg(arg_num) DEBUG_ONLY(|| (stress && (os::random() & 1) == 1))) {
2939-
super_method->set_mismatch();
2940-
MutexLocker ml(Compile_lock, Mutex::_safepoint_check_flag);
29412939
JavaThread* thread = JavaThread::current();
29422940
HandleMark hm(thread);
29432941
methodHandle mh(thread, super_method);
29442942
DeoptimizationScope deopt_scope;
2945-
CodeCache::mark_for_deoptimization(&deopt_scope, mh());
2943+
{
2944+
// Keep the lock scope minimal. Prevent interference with other
2945+
// dependency checks by setting mismatch and marking within the lock.
2946+
MutexLocker ml(Compile_lock, Mutex::_safepoint_check_flag);
2947+
super_method->set_mismatch();
2948+
CodeCache::mark_for_deoptimization(&deopt_scope, mh());
2949+
}
29462950
deopt_scope.deoptimize_marked();
29472951
}
29482952
}

0 commit comments

Comments
 (0)