Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per the comment immediately preceeding the definition, JVM_MAXPATHLEN exists
to support "JVM and the rest of JDK are built on different Linux releases". We
used to have the JVM and the rest of the JDK separable, and could use
(somewhat) different versions of them together. But that model was elminated
years ago.
All uses of JVM_MAXPATHLEN are in HotSpot. (There are also
unused definitions of that name in
jdk.hotspot.agent/share/native/libsaproc/sadis.c.)
Looking around, there are many uses of MAXPATHLEN in HotSpot. If we really
need JVM_MAXPATHLEN, how sure are we that all of those uses of MAXPATHLEN are
okay?
So maybe it would be better to just remove JVM_MAXPATHLEN and use MAXPATHLEN
everywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for finding that, I was also unsure whether or not the comment above was still valid today. I agree that if JVM_MAXPATHLEN is actually unneeded it can be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After further inspection, MAXPATHLEN seems to only be used within the hotspot/os directory and other areas in Hotspot rely on JVM_MAXPATHLEN. Tampering with this could cause some issues since the value of JVM_MAXPATHLEN varies between platforms and does not necessarily rely on MAXPATHLEN. The simple fix in this PR is sufficient.