Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8214976: Warn about uses of functions replaced for portability #6961

Closed
wants to merge 97 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
b4b0328
8278824: Uneven work distribution when scanning heap roots in G1
Dec 28, 2021
e7244c1
8278966: two microbenchmarks tests fail "assert(!jvms->method()->has_…
rwestrel Jan 4, 2022
06f3713
8279379: GHA: Print tests that are in error
shipilev Jan 4, 2022
58b5fb3
8265317: [vector] assert(payload->is_object()) failed: expected 'obje…
Jan 4, 2022
95a3010
8275830: C2: Receiver downcast is missing when inlining through metho…
Jan 4, 2022
12182a1
8214976: Warn about uses of functions replaced for portability
hseigel Jan 4, 2022
191f730
Merge
JesperIRL Jan 4, 2022
f8f9148
8278948: compiler/vectorapi/reshape/TestVectorCastAVX1.java crashes i…
merykitty Jan 4, 2022
f326305
8278114: New addnode ideal optimization: converting "x + x" into "x <…
CptGit Jan 5, 2022
8b5de27
8279485: Incorrect copyright year in compiler/lib/ir_framework/IRNode…
Jan 5, 2022
0f4807e
8279222: Incorrect legacyMap.get in java.security.Provider after JDK-…
shipilev Jan 5, 2022
9d43d25
8278897: Alignment of heap segments is not enforced correctly
mcimadamore Jan 5, 2022
0f98efb
8279445: Update JMH devkit to 1.34
shipilev Jan 5, 2022
b6ec39c
8279510: Parallel: Remove unused PSScavenge::_consecutive_skipped_sca…
albertnetymk Jan 5, 2022
a741b92
8279453: Disable tools/jar/ReproducibleJar.java on 32-bit platforms
shipilev Jan 5, 2022
5cd9515
8279525: ProblemList java/awt/GraphicsDevice/CheckDisplayModes.java o…
Jan 5, 2022
590fa9d
8278612: [macos] test/jdk/java/awt/dnd/RemoveDropTargetCrashTest cras…
Jan 5, 2022
9a0e890
8277515: Update --release 18 symbol information for JDK 18 build 29
jddarcy Jan 5, 2022
564c8c6
8279529: ProblemList java/nio/channels/DatagramChannel/ManySourcesAnd…
Jan 5, 2022
7b429a6
8279168: Shenandoah: Remove unused always_true in ShenandoahRootAdjus…
zhengyu123 Jan 5, 2022
523300e
8279526: Exceptions::count_out_of_memory_exceptions miscounts class m…
shipilev Jan 5, 2022
ab49053
8279533: Bad indentation and missing curly braces in BlockBegin::set_end
LudwikJaniuk Jan 5, 2022
f7d8a38
revert strdup() changes and address some of Kim's comments
hseigel Jan 5, 2022
844dfb3
Merge
JesperIRL Jan 6, 2022
456bd1e
8211004: javac is complaining about non-denotable types and refusing …
Jan 6, 2022
2dbb936
8279339: (ch) Input/Output streams returned by Channels factory metho…
Jan 6, 2022
bc12381
8279505: Update documentation for RETRY_COUNT and REPEAT_COUNT
shipilev Jan 6, 2022
7c792f2
8279333: Some JFR tests do not accept 'GCLocker Initiated GC' as a va…
Jan 6, 2022
8703f14
8273322: Enhance macro logic optimization for masked logic operations.
Jan 6, 2022
b3dbfc6
4884570: StreamPrintService.isAttributeValueSupported does not work p…
prrace Jan 6, 2022
8d0f385
8279520: SPNEGO has not passed channel binding info into the underlyi…
wangweij Jan 6, 2022
6a42fba
8279258: Auto-vectorization enhancement for two-dimensional array ope…
DamonFool Jan 7, 2022
62d03c2
8279547: [vectorapi] Enable vector cast tests after JDK-8278948
merykitty Jan 7, 2022
967ef0c
8278020: ~13% variation in Renaissance-Scrabble
iklam Jan 7, 2022
4243f4c
8279540: Shenandoah: Should only clear CLD::_claim_strong mark for st…
zhengyu123 Jan 7, 2022
d65c665
8279527: Dereferencing segments backed by different scopes leads to p…
mcimadamore Jan 7, 2022
d47af74
8279500: Remove FileMapHeader::_heap_obj_roots
iklam Jan 7, 2022
f203723
8279337: The MToolkit is still referenced in a few places
mrserb Jan 8, 2022
77757ba
8225122: Test AncestorResized.java fails when Windows desktop is scaled.
mrserb Jan 8, 2022
e14fb4f
8279437: [JVMCI] exception in HotSpotJVMCIRuntime.translate can exit …
Jan 8, 2022
8d1a1e8
8278228: C2: Improve identical back-to-back if elimination
rwestrel Jan 10, 2022
2f8a2fd
8279568: IGV: Add bci and line number property for OSR compilations
chhagedorn Jan 10, 2022
4aefd8b
8279528: Unused TypeEnter.diag after JDK-8205187
shipilev Jan 10, 2022
642ab34
8278373: JavacTrees.searchMethod finds incorrect match
Jan 10, 2022
5fa13bb
8279522: Serial: Remove unused Generation::clear_remembered_set
albertnetymk Jan 10, 2022
79b614c
8279523: Parallel: Remove unnecessary PSScavenge::_to_space_top_befor…
albertnetymk Jan 10, 2022
8f969a1
8278930: javac tries to compile a file twice via PackageElement.getEn…
Jan 10, 2022
1f101b0
8278329: some TraceDeoptimization code not included in PRODUCT build
tobiasholenstein Jan 10, 2022
06b4d49
8278344: sun/security/pkcs12/KeytoolOpensslInteropTest.java test fail…
MBaesken Jan 10, 2022
6613ce6
8279300: [arm32] SIGILL when running GetObjectSizeIntrinsicsTest
Jan 10, 2022
354c904
8273452: DocTrees.getDocCommentTree should be specified as idempotent
hns Jan 10, 2022
928e347
8279032: compiler/loopopts/TestSkeletonPredicateNegation.java times o…
Jan 10, 2022
4ff6720
8183227: read/write APIs in class os shall return ssize_t
Jan 10, 2022
ad34f03
8279515: C1: No inlining through invokedynamic and invokestatic call …
Jan 10, 2022
11d88ce
8218857: Confusing overloads for os::open
Jan 10, 2022
76477f8
8142362: Lots of code duplication in Copy class
coleenp Jan 10, 2022
debaa28
8274679: Remove unnecessary conversion to String in security code in …
turbanoff Jan 10, 2022
40df5df
8279398: jdk/jfr/api/recording/time/TestTimeMultiple.java failed with…
egahlin Jan 10, 2022
dee447f
8274809: Update java.base classes to use try-with-resources
turbanoff Jan 10, 2022
d9b1bb5
Merge
JesperIRL Jan 10, 2022
0d19096
8279642: JFR: Remove unnecessary creation of Duration and Instant obj…
egahlin Jan 10, 2022
d7e6e9b
8279643: JFR: Explain why path is sometimes missing from FileRead and…
egahlin Jan 10, 2022
4471e95
8279645: JFR: The cacheEventType in Dispatcher is never assigned
egahlin Jan 10, 2022
2f7665b
8279644: hsdis may not work when it was built with --with-binutils=sy…
YaSuenag Jan 11, 2022
2f13872
8279646: JFR: Remove recursive call in jdk.jfr.internal.Control
egahlin Jan 11, 2022
6504458
8279647: JFR: Unclosed directory stream
egahlin Jan 11, 2022
ec5a455
8279682: JFR: Remove dead code
egahlin Jan 11, 2022
126328c
8279560: AArch64: generate_compare_long_string_same_encoding and LARG…
Jan 11, 2022
bf7bcaa
8277748: Obsolete the MinInliningThreshold flag in JDK 19
eme64 Jan 11, 2022
3121898
8279703: G1: Remove unused force_not_compacted local in G1CalculatePo…
Jan 11, 2022
2bbeae3
8279668: x86: AVX2 versions of vpxor should be asserted
shipilev Jan 11, 2022
d46410c
8279785: JFR: 'jfr configure' should show default values
egahlin Jan 11, 2022
4c52eb3
8279669: test/jdk/com/sun/jdi/TestScaffold.java uses wrong condition
zzambers Jan 11, 2022
c08b2ac
8225093: Special property jdk.boot.class.path.append should not defau…
Jan 11, 2022
08e14c6
8278207: G1: Tighten verification in G1ResetSkipCompactingClosure
albertnetymk Jan 11, 2022
9e02447
8279834: Alpine Linux fails to build when --with-source-date enabled
Jan 11, 2022
c3d0a94
8279833: Loop optimization issue in String.encodeUTF8_UTF16
cl4es Jan 11, 2022
cfee451
8273914: Indy string concat changes order of operations
cushon Jan 11, 2022
6714184
8279700: Parallel: Simplify ScavengeRootsTask constructor API
albertnetymk Jan 11, 2022
c4518e2
8278868: Add x86 vectorization support for Long.bitCount()
vamsi-parasa Jan 11, 2022
36f41cb
8279884: Use better file for cygwin source permission check
vidmik Jan 11, 2022
3aaa098
8276694: Pattern trailing unescaped backslash causes internal error
Jan 11, 2022
1c688f4
8279900: compiler/vectorization/TestPopCountVectorLong.java fails due…
DamonFool Jan 12, 2022
f16f6a9
8279821: JFR: Log warnings properly when loading a misconfigured .jfc…
egahlin Jan 12, 2022
13bfb49
6496103: isFileHidingEnabled return false by default
TejeshR13 Jan 12, 2022
319d230
8277463: JFileChooser with Metal L&F doesn't show non-canonical UNC p…
Jan 12, 2022
bd339aa
8277627: Fix copyright years in some jvmci files
eme64 Jan 12, 2022
4f0b650
8278581: Improve reference processing statistics log output
albertnetymk Jan 12, 2022
525b20f
8279676: Dubious YMM register clearing in x86_64 arraycopy stubs
shipilev Jan 12, 2022
ece98d8
8278461: Use Executable.getSharedParameterTypes() instead of Executab…
stsypanov Jan 12, 2022
ff0cb98
8279536: jdk/nio/zipfs/ZipFSOutputStreamTest.java timed out
jaikiran Jan 12, 2022
f54ce84
8238161: use os::fopen in HS code where possible
Jan 12, 2022
8fed8ab
8278065: Refactor subclassAudits to use ClassValue
rkennke Jan 12, 2022
ddddec7
8274243: Implement fast-path for ASCII-compatible CharsetEncoders on …
Jan 12, 2022
e87a7c5
rebase
hseigel Jan 12, 2022
f5bd8dc
rebase attempt 2
hseigel Jan 12, 2022
d64a893
more stuff
hseigel Jan 12, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2020 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -435,7 +435,7 @@ void VM_Version::check_virtualizations() {
// system_type=...qemu indicates PowerKVM
// e.g. system_type=IBM pSeries (emulated by qemu)
char line[500];
FILE* fp = fopen(info_file, "r");
FILE* fp = os::fopen(info_file, "r");
if (fp == NULL) {
return;
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2018 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -230,7 +230,7 @@ int AixAttachListener::init() {
// We must call bind with the actual socketaddr length. This is obligatory for AS400.
int res = ::bind(listener, (struct sockaddr*)&addr, SUN_LEN(&addr));
if (res == -1) {
::close(listener);
os::close(listener);
return -1;
}

@@ -248,7 +248,7 @@ int AixAttachListener::init() {
}
}
if (res == -1) {
::close(listener);
os::close(listener);
::unlink(initial_path);
return -1;
}
@@ -375,13 +375,13 @@ AixAttachOperation* AixAttachListener::dequeue() {
// We must prevent accept blocking on the socket if it has been shut down.
// Therefore we allow interrupts and check whether we have been shut down already.
if (AixAttachListener::is_shutdown()) {
::close(listener());
os::close(listener());
set_listener(-1);
return NULL;
}
s = ::accept(listener(), &addr, &len);
if (s == -1) {
::close(listener());
os::close(listener());
set_listener(-1);
return NULL; // log a warning?
}
@@ -391,21 +391,21 @@ AixAttachOperation* AixAttachListener::dequeue() {
socklen_t optlen = sizeof(cred_info);
if (::getsockopt(s, SOL_SOCKET, SO_PEERID, (void*)&cred_info, &optlen) == -1) {
log_debug(attach)("Failed to get socket option SO_PEERID");
::close(s);
os::close(s);
continue;
}

if (!os::Posix::matches_effective_uid_and_gid_or_root(cred_info.euid, cred_info.egid)) {
log_debug(attach)("euid/egid check failed (%d/%d vs %d/%d)",
cred_info.euid, cred_info.egid, geteuid(), getegid());
::close(s);
os::close(s);
continue;
}

// peer credential look okay so we read the request
AixAttachOperation* op = read_request(s);
if (op == NULL) {
::close(s);
os::close(s);
continue;
} else {
return op;
@@ -453,7 +453,7 @@ void AixAttachOperation::complete(jint result, bufferedStream* st) {
}

// done
::close(this->socket());
os::close(this->socket());

delete this;
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2021 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -108,6 +108,8 @@
#include <sys/utsname.h>
#include <sys/vminfo.h>

PRAGMA_PERMIT_FORBIDDEN_C_FUNCTION(close); // prevents compiler warnings for all functions

// Missing prototypes for various system APIs.
extern "C"
int mread_real_time(timebasestruct_t *t, size_t size_of_timebasestruct_t);
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2022, 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
@@ -239,7 +239,7 @@ static int SCANF_ARGS(2, 0) vread_statdata(const char* procfile, _SCANFMT_ const
int n;
char buf[2048];

if ((f = fopen(procfile, "r")) == NULL) {
if ((f = os::fopen(procfile, "r")) == NULL) {
return -1;
}

@@ -615,7 +615,7 @@ bool SystemProcessInterface::SystemProcesses::ProcessIterator::is_dir(const char
struct stat mystat;
int ret_val = 0;

ret_val = stat(name, &mystat);
ret_val = os::stat(name, &mystat);
if (ret_val < 0) {
return false;
}
@@ -662,7 +662,7 @@ void SystemProcessInterface::SystemProcesses::ProcessIterator::get_exe_name() {

jio_snprintf(buffer, PATH_MAX, "/proc/%s/stat", _entry->d_name);
buffer[PATH_MAX - 1] = '\0';
if ((fp = fopen(buffer, "r")) != NULL) {
if ((fp = os::fopen(buffer, "r")) != NULL) {
if (fgets(buffer, PATH_MAX, fp) != NULL) {
char* start, *end;
// exe-name is between the first pair of ( and )
@@ -690,7 +690,7 @@ char* SystemProcessInterface::SystemProcesses::ProcessIterator::get_cmdline() {

jio_snprintf(buffer, PATH_MAX, "/proc/%s/cmdline", _entry->d_name);
buffer[PATH_MAX - 1] = '\0';
if ((fp = fopen(buffer, "r")) != NULL) {
if ((fp = os::fopen(buffer, "r")) != NULL) {
size_t size = 0;
char dummy;

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2022, 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
@@ -166,7 +166,7 @@ extern "C" {
if (s != -1) {
BsdAttachListener::set_listener(-1);
::shutdown(s, SHUT_RDWR);
::close(s);
os::close(s);
}
if (BsdAttachListener::has_path()) {
::unlink(BsdAttachListener::path());
@@ -198,7 +198,7 @@ int BsdAttachListener::init() {
}

// create the listener socket
listener = ::socket(PF_UNIX, SOCK_STREAM, 0);
listener = os::socket(PF_UNIX, SOCK_STREAM, 0);
if (listener == -1) {
return -1;
}
@@ -211,7 +211,7 @@ int BsdAttachListener::init() {
::unlink(initial_path);
int res = ::bind(listener, (struct sockaddr*)&addr, sizeof(addr));
if (res == -1) {
::close(listener);
os::close(listener);
return -1;
}

@@ -230,7 +230,7 @@ int BsdAttachListener::init() {
}
}
if (res == -1) {
::close(listener);
os::close(listener);
::unlink(initial_path);
return -1;
}
@@ -360,21 +360,21 @@ BsdAttachOperation* BsdAttachListener::dequeue() {
gid_t pgid;
if (::getpeereid(s, &puid, &pgid) != 0) {
log_debug(attach)("Failed to get peer id");
::close(s);
os::close(s);
continue;
}

if (!os::Posix::matches_effective_uid_and_gid_or_root(puid, pgid)) {
log_debug(attach)("euid/egid check failed (%d/%d vs %d/%d)", puid, pgid,
geteuid(), getegid());
::close(s);
os::close(s);
continue;
}

// peer credential look okay so we read the request
BsdAttachOperation* op = read_request(s);
if (op == NULL) {
::close(s);
os::close(s);
continue;
} else {
return op;
@@ -421,7 +421,7 @@ void BsdAttachOperation::complete(jint result, bufferedStream* st) {
}

// done
::close(this->socket());
os::close(this->socket());

delete this;
}
@@ -473,7 +473,7 @@ int AttachListener::pd_init() {
bool AttachListener::check_socket_file() {
int ret;
struct stat st;
ret = stat(BsdAttachListener::path(), &st);
ret = os::stat(BsdAttachListener::path(), &st);
if (ret == -1) { // need to restart attach listener.
log_debug(attach)("Socket file %s does not exist - Restart Attach Listener",
BsdAttachListener::path());
@@ -107,6 +107,8 @@
#define MAP_ANONYMOUS MAP_ANON
#endif

PRAGMA_PERMIT_FORBIDDEN_C_FUNCTION(close); // prevents compiler warnings for all functions

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again here, why suppress the warning rather than fix the small number of calls in this file.


#define MAX_PATH (2 * K)

// for timer info max values which include all bits
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2022, 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
@@ -167,7 +167,7 @@ extern "C" {
if (s != -1) {
LinuxAttachListener::set_listener(-1);
::shutdown(s, SHUT_RDWR);
::close(s);
os::close(s);
}
if (LinuxAttachListener::has_path()) {
::unlink(LinuxAttachListener::path());
@@ -199,7 +199,7 @@ int LinuxAttachListener::init() {
}

// create the listener socket
listener = ::socket(PF_UNIX, SOCK_STREAM, 0);
listener = os::socket(PF_UNIX, SOCK_STREAM, 0);
if (listener == -1) {
return -1;
}
@@ -212,7 +212,7 @@ int LinuxAttachListener::init() {
::unlink(initial_path);
int res = ::bind(listener, (struct sockaddr*)&addr, sizeof(addr));
if (res == -1) {
::close(listener);
os::close(listener);
return -1;
}

@@ -230,7 +230,7 @@ int LinuxAttachListener::init() {
}
}
if (res == -1) {
::close(listener);
os::close(listener);
::unlink(initial_path);
return -1;
}
@@ -271,7 +271,7 @@ LinuxAttachOperation* LinuxAttachListener::read_request(int s) {

do {
int n;
RESTARTABLE(read(s, buf+off, left), n);
RESTARTABLE(os::read(s, buf+off, left), n);
assert(n <= left, "buffer was too small, impossible!");
buf[max_len - 1] = '\0';
if (n == -1) {
@@ -360,21 +360,21 @@ LinuxAttachOperation* LinuxAttachListener::dequeue() {
socklen_t optlen = sizeof(cred_info);
if (::getsockopt(s, SOL_SOCKET, SO_PEERCRED, (void*)&cred_info, &optlen) == -1) {
log_debug(attach)("Failed to get socket option SO_PEERCRED");
::close(s);
os::close(s);
continue;
}

if (!os::Posix::matches_effective_uid_and_gid_or_root(cred_info.uid, cred_info.gid)) {
log_debug(attach)("euid/egid check failed (%d/%d vs %d/%d)",
cred_info.uid, cred_info.gid, geteuid(), getegid());
::close(s);
os::close(s);
continue;
}

// peer credential look okay so we read the request
LinuxAttachOperation* op = read_request(s);
if (op == NULL) {
::close(s);
os::close(s);
continue;
} else {
return op;
@@ -385,7 +385,7 @@ LinuxAttachOperation* LinuxAttachListener::dequeue() {
// write the given buffer to the socket
int LinuxAttachListener::write_fully(int s, char* buf, int len) {
do {
int n = ::write(s, buf, len);
int n = os::write(s, buf, len);
if (n == -1) {
if (errno != EINTR) return -1;
} else {
@@ -421,7 +421,7 @@ void LinuxAttachOperation::complete(jint result, bufferedStream* st) {
}

// done
::close(this->socket());
os::close(this->socket());

delete this;
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2022, 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
@@ -146,7 +146,7 @@ bool CgroupSubsystemFactory::determine_type(CgroupInfo* cg_infos,
* Conversely, for cgroups v2 (unified hierarchy), cpu, cpuacct, cpuset, memory
* controllers must have hierarchy ID 0 and the unified controller mounted.
*/
cgroups = fopen(proc_cgroups, "r");
cgroups = os::fopen(proc_cgroups, "r");
if (cgroups == NULL) {
log_debug(os, container)("Can't open %s, %s", proc_cgroups, os::strerror(errno));
*flags = INVALID_CGROUPS_GENERIC;
@@ -214,7 +214,7 @@ bool CgroupSubsystemFactory::determine_type(CgroupInfo* cg_infos,
* - on a cgroups v1 system, collect info for mapping
* the host mount point to the local one via /proc/self/mountinfo below.
*/
cgroup = fopen(proc_self_cgroup, "r");
cgroup = os::fopen(proc_self_cgroup, "r");
if (cgroup == NULL) {
log_debug(os, container)("Can't open %s, %s",
proc_self_cgroup, os::strerror(errno));
@@ -269,7 +269,7 @@ bool CgroupSubsystemFactory::determine_type(CgroupInfo* cg_infos,

// Find various mount points by reading /proc/self/mountinfo
// mountinfo format is documented at https://www.kernel.org/doc/Documentation/filesystems/proc.txt
mntinfo = fopen(proc_self_mountinfo, "r");
mntinfo = os::fopen(proc_self_mountinfo, "r");
if (mntinfo == NULL) {
log_debug(os, container)("Can't open %s, %s",
proc_self_mountinfo, os::strerror(errno));
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2022, 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
@@ -108,7 +108,7 @@ template <typename T> int subsystem_file_line_contents(CgroupController* c,
}
strncat(file, filename, MAXPATHLEN-filelen);
log_trace(os, container)("Path to %s is %s", filename, file);
fp = fopen(file, "r");
fp = os::fopen(file, "r");
if (fp != NULL) {
int err = 0;
while ((p = fgets(buf, MAXPATHLEN, fp)) != NULL) {