OpenJDK / jdk / hs
changeset 35471:deb38c83d759
8146695: FinalizeTest04 crashes VM with EXCEPTION_INT_DIVIDE_BY_ZERO
Reviewed-by: jwilhelm, jprovino
author | sangheki |
---|---|
date | Fri, 08 Jan 2016 08:51:18 -0800 |
parents | 75c679ad0747 |
children | cd54a457564e cf27aeb0942d |
files | hotspot/src/share/vm/gc/serial/defNewGeneration.cpp |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hotspot/src/share/vm/gc/serial/defNewGeneration.cpp Thu Jan 07 16:19:41 2016 -0800 +++ b/hotspot/src/share/vm/gc/serial/defNewGeneration.cpp Fri Jan 08 08:51:18 2016 -0800 @@ -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. * * This code is free software; you can redistribute it and/or modify it @@ -375,7 +375,7 @@ // 1. Check an overflow at 'threads_count * NewSizeThreadIncrease'. 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; // 2. Check an overflow at 'new_size_candidate + thread_increase_size'.