[8u] RFR (XS) 8260236: better init AnnotationCollector _contended_group
Aleksey Shipilev
shade at redhat.com
Mon Mar 15 18:00:48 UTC 2021
Original fix:
https://bugs.openjdk.java.net/browse/JDK-8260236
https://github.com/openjdk/jdk/commit/fd2641ed
Unfortunately, this does not apply to 8u cleanly, because the AnnotationProcessor is still in .hpp
in 8u.
Therefore, 8u variant is:
diff -r b0825e3772d3 src/share/vm/classfile/classFileParser.hpp
--- a/src/share/vm/classfile/classFileParser.hpp Mon Apr 20 13:34:04 2015 +0200
+++ b/src/share/vm/classfile/classFileParser.hpp Mon Mar 15 18:59:42 2021 +0100
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2021, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -137,11 +137,11 @@
const Location _location;
int _annotations_present;
u2 _contended_group;
AnnotationCollector(Location location)
- : _location(location), _annotations_present(0)
+ : _location(location), _annotations_present(0), _contended_group(0)
{
assert((int)_annotation_LIMIT <= (int)sizeof(_annotations_present) * BitsPerByte, "");
}
// If this annotation name has an ID, report it (or _none).
ID annotation_index(ClassLoaderData* loader_data, Symbol* name);
Testing: Linux x86_64 build
--
Thanks,
-Aleksey
More information about the jdk8u-dev
mailing list