mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 02:24:40 +02:00
8228407: JVM crashes with shared archive file mismatch
Stop processing other header fields if initial header check has failed. Reviewed-by: dholmes, jiangli
This commit is contained in:
parent
3476b6dab8
commit
fc7aa2306c
2 changed files with 13 additions and 3 deletions
|
@ -1610,7 +1610,9 @@ bool FileMapInfo::initialize(bool is_static) {
|
|||
}
|
||||
|
||||
init_from_file(_fd, is_static);
|
||||
if (!validate_header(is_static)) {
|
||||
// UseSharedSpaces could be disabled if the checking of some of the header fields in
|
||||
// init_from_file has failed.
|
||||
if (!UseSharedSpaces || !validate_header(is_static)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue