RFR: 8159237: PreservedMarks verification code fails
Stefan Karlsson
stefan.karlsson at oracle.com
Fri Jun 10 12:18:08 UTC 2016
Hi all,
Please review this patch to fix a recently introduced bug in the
verification code of the preserved marks code:
http://cr.openjdk.java.net/~stefank/8159237/webrev.01/
https://bugs.openjdk.java.net/browse/JDK-8159237
The bug was introduced when the following code:
volatile size_t total_size = 0; ... for (uint i = 0; i < _num; i += 1) {
total_size += get(i)->size();
get(i)->restore();
}
was moved into a separate function and the address to total_size was
passed as an argument to the new function. The new function incorrectly
updates the pointer and not the variable that the pointer points to:
total_size_addr += preserved_marks_set->get(i)->size();
The suggested fix for the bug is:
- total_size_addr += preserved_marks_set->get(i)->size();
+ *total_size_addr += preserved_marks_set->get(i)->size();
Thanks,
StefanK
More information about the hotspot-gc-dev
mailing list