Review Request JDK-7119643: It is not possible to read files with a path longer than 2048 characters
Dmitry Samersoff
dmitry.samersoff at oracle.com
Sun Mar 23 19:19:04 UTC 2014
Poonam,
1.
MAXPATHLEN == PATH_MAX and it's a system constant that comes from
sys/param.h and linux/limits.h so current behavior of hotspot is
absolutely correct.
Moreover, we uses MAXPATHLEN in many places in os_*.cpp files, so this
patch makes hotspot behavior inconsistent.
Typical value of PATH_MAX is 4096 so it's unclean for me why we have
problems with 2048 bytes file.
We probably should check our reference build platform.
2.
Test could be a pure java.
-Dmitry
On 2014-03-21 16:52, Poonam Bajaj wrote:
> Hi,
>
> Review request for:
> JDK-7119643 <https://bugs.openjdk.java.net/browse/JDK-7119643>: It is
> not possible to read files with a path longer than 2048 characters
>
> Problem and Fix: This bug is a regression from 6u29 and exists only on
> Linux platform. With the fix for 6348631, a limit of MAX_PATH (2K) got
> introduced on the file path length in the os::open() and os::stat()
> functions in os_linux.cpp. These changes remove that limit. These
> changes also add a regression test case to check that the files having
> path longer than 2048 are read without any error.
>
> Webrev: http://cr.openjdk.java.net/~poonam/7119643/webrev.00/
>
> This fix needs to go into 9, 8u, 7u and 6u.
>
> Thanks,
> Poonam
>
--
Dmitry Samersoff
Oracle Java development team, Saint Petersburg, Russia
* I would love to change the world, but they won't give me the sources.
More information about the hotspot-runtime-dev
mailing list