mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
8146695: FinalizeTest04 crashes VM with EXCEPTION_INT_DIVIDE_BY_ZERO
Reviewed-by: jwilhelm, jprovino
This commit is contained in:
parent
a37ef034c1
commit
f17b4db454
1 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -375,7 +375,7 @@ size_t DefNewGeneration::adjust_for_thread_increase(size_t new_size_candidate,
|
||||||
|
|
||||||
// 1. Check an overflow at 'threads_count * NewSizeThreadIncrease'.
|
// 1. Check an overflow at 'threads_count * NewSizeThreadIncrease'.
|
||||||
threads_count = Threads::number_of_non_daemon_threads();
|
threads_count = Threads::number_of_non_daemon_threads();
|
||||||
if (NewSizeThreadIncrease <= max_uintx / threads_count) {
|
if (threads_count > 0 && NewSizeThreadIncrease <= max_uintx / threads_count) {
|
||||||
thread_increase_size = threads_count * NewSizeThreadIncrease;
|
thread_increase_size = threads_count * NewSizeThreadIncrease;
|
||||||
|
|
||||||
// 2. Check an overflow at 'new_size_candidate + thread_increase_size'.
|
// 2. Check an overflow at 'new_size_candidate + thread_increase_size'.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue