RFR(xs): (jdk10) 8173828: realpath is unsafe

Thomas Stüfe thomas.stuefe at gmail.com
Tue Mar 14 07:11:20 UTC 2017

Hi all,

may I have reviews for this smallish fix.

Issue: https://bugs.openjdk.java.net/browse/JDK-8173828

In short, realpath(3) is unsafe the way it is traditionally used (with a
user buffer provided). It is safe if used in the new POSIX.1-2008 compliant
way. To wrap this behavior, I added a new os::Posix::realpath() function
which takes a buffer and a buffer size (like a sane API would but the
ancient realpath() did not) and moved safe buffer handling into this API.

Kind Regards, Thomas

More information about the hotspot-runtime-dev mailing list