JDK-6416525 : Cannot run NetBeans IDE on Nevada with Mustang
Type:Bug
Component:core-libs
Sub-Component:java.io
Affected Version:6
Priority:P1
Status:Resolved
Resolution:Fixed
OS:solaris_11
CPU:x86
Submitted:2006-04-21
Updated:2010-08-19
Resolved:2006-05-13
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
When I try to run NetBeans IDE v5.0 on Nevada build 33 I get this error when using Mustang b79:
Segmentation Fault - Core dumped
Comments
EVALUATION
The issue is with listing files in a directory that is part of a dos (pcfs) filesystem. It is not Nevada specific.
The fix for 6395581 finds the maximum size that a filename can be within a particular filesystem and uses that to allocate memory to store the filenames as they are retrieved. This is the documented way for doing this type of task, as per the readdir man pages (see comments section). The problem is that for pcfs the value returned for PC_NAME_MAX (PCFNAMESIZE) is always 8. Clearly there can be filenames greater than this on a pcfs filesystem, and if this happens the memory beyond the 8 bytes allocated is corrupted.
The fix for java is to not lookup PC_NAME_MAX and use a defined maximum size that will be large enough to hold any filename.