mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8203356: VM Object Allocation Collector can infinite recurse
VM Event callback do not provoke a VM alloc event Reviewed-by: sspitsyn, phh, amenkov, cjplummer
This commit is contained in:
parent
3c135ae705
commit
b9b522a7ad
4 changed files with 176 additions and 1 deletions
|
@ -2722,7 +2722,14 @@ void JvmtiEventCollector::setup_jvmti_thread_state() {
|
|||
// should not happen since we're trying to configure for event collection
|
||||
guarantee(state != NULL, "exiting thread called setup_jvmti_thread_state");
|
||||
if (is_vm_object_alloc_event()) {
|
||||
_prev = state->get_vm_object_alloc_event_collector();
|
||||
JvmtiVMObjectAllocEventCollector *prev = state->get_vm_object_alloc_event_collector();
|
||||
|
||||
// If we have a previous collector and it is disabled, it means this allocation came from a
|
||||
// callback induced VM Object allocation, do not register this collector then.
|
||||
if (prev && !prev->is_enabled()) {
|
||||
return;
|
||||
}
|
||||
_prev = prev;
|
||||
state->set_vm_object_alloc_event_collector((JvmtiVMObjectAllocEventCollector *)this);
|
||||
} else if (is_dynamic_code_event()) {
|
||||
_prev = state->get_dynamic_code_event_collector();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue