Skip to content

Commit 4369603

Browse files
committed
8356597: AOT cache and CDS archive should not be created in read-only mode
Reviewed-by: shade, kvn
1 parent fa7c5a6 commit 4369603

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/hotspot/share/cds/filemap.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -747,8 +747,7 @@ void FileMapInfo::open_as_output() {
747747
// Use remove() to delete the existing file because, on Unix, this will
748748
// allow processes that have it open continued access to the file.
749749
remove(_full_path);
750-
int mode = CDSConfig::is_dumping_preimage_static_archive() ? 0666 : 0444;
751-
int fd = os::open(_full_path, O_RDWR | O_CREAT | O_TRUNC | O_BINARY, mode);
750+
int fd = os::open(_full_path, O_RDWR | O_CREAT | O_TRUNC | O_BINARY, 0666);
752751
if (fd < 0) {
753752
log_error(cds)("Unable to create %s %s: (%s).", CDSConfig::type_of_archive_being_written(), _full_path,
754753
os::strerror(errno));

0 commit comments

Comments
 (0)