I3W1BL: systemDictionary reslove class parser miss resourceMark

This commit is contained in:
kuenking111 2021-06-17 19:02:54 +08:00
parent 112962c036
commit 20b1631939
2 changed files with 6 additions and 2 deletions

View File

@ -918,7 +918,7 @@ Provides: java-%{javaver}-%{origin}-accessibility%{?1} = %{epoch}:%{version}-%{r
Name: java-%{javaver}-%{origin}
Version: %{javaver}.%{updatever}.%{buildver}
Release: 13
Release: 14
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons
# and this change was brought into RHEL-4. java-1.5.0-ibm packages
# also included the epoch in their virtual provides. This created a
@ -2182,6 +2182,9 @@ require "copy_jdk_configs.lua"
%endif
%changelog
* Thu Jun 17 2021 kuenking111 <wangkun49@huawei.com> - 1:1.8.0.292-b10.14
- fix systemDictionary resolve_from_stream ResourceMark
* Wed Jun 16 2021 kuenking111 <wangkun49@huawei.com> - 1:1.8.0.292-b10.13
- add fix_G1GC_memory_leak_in_numa.patch

View File

@ -23,7 +23,7 @@ index c3dec0a30..201dd9594 100644
*index = '\0'; // chop to just the package name
while ((index = strchr(name, '/')) != NULL) {
*index = '.'; // replace '/' with '.' in package name
@@ -1170,29 +1170,31 @@ Klass* SystemDictionary::resolve_from_stream(Symbol* class_name,
@@ -1170,29 +1170,32 @@ Klass* SystemDictionary::resolve_from_stream(Symbol* class_name,
!class_loader.is_null() &&
parsed_name != NULL &&
parsed_name->utf8_length() >= (int)pkglen) {
@ -50,6 +50,7 @@ index c3dec0a30..201dd9594 100644
- Exceptions::_throw_msg(THREAD_AND_LOCATION,
- vmSymbols::java_lang_SecurityException(), message);
- }
+ ResourceMark rm(THREAD);
+ bool prohibited;
+ const jbyte* base = parsed_name->base();
+ if ((base[0] | base[1] | base[2] | base[3] | base[4]) & 0x80) {