[Orca-users] Diskinfo.se segmentation fault on Solaris 10

carl.staroscik at barclayscapital.com carl.staroscik at barclayscapital.com
Thu Dec 8 23:43:20 PST 2005


I have been seeing this on Solaris 10 . It seems that diskinfo.se gets a
value from readdir which is invalid and when dereferenced causes a
segmentation fault. Has anyone else seen this and have they found a fix
for it ? I have added the code detailed in the fragment below to stop
the faults and keep my systems monitored:

I have tucked this into include/diskinfo.se in the SE toolkit.

for (ld = readdir(dirp); ld > 0; ld = readdir(dirp)) {
      // grow the array if needed
      if (count == GLOBAL_diskinfo_size) {
        GLOBAL_diskinfo_size += 4;
        GLOBAL_disk_info = renew GLOBAL_disk_info[GLOBAL_diskinfo_size];
      }
 

      // 09-12-2005 Carl Hack to stop segmentation faults - must be a
bug in readdir -
      if (ld > 18446744071543217903) {
        continue;
      }
           
     // get the segmentation fault here when ld is >
18446744071543217903

      dp = *((dirent_t *) ld);


Package details below:

PKGINST:  RICHPse
      NAME:  The SymbEL Interpreter
  CATEGORY:  application
      ARCH:  sparc,i386
   VERSION:  3.4 (03:59 PM 01/05/05)
   BASEDIR:  /opt
    VENDOR:  Rich Pettit
      DESC:  The SymbEL Interpreter
    PSTAMP:  05 Jan 05
  INSTDATE:  Oct 14 2005 11:10
   HOTLINE:  se-feedback at setoolkit.com
     EMAIL:  se-feedback at setoolkit.com
    STATUS:  completely installed
     FILES:      344 installed pathnames
                  39 directories
                  26 executables
               30020 blocks used (approx)


Carl Staroscik
Solaris Product Manager
Unix Engineering
Barclays Capital Services Ltd



------------------------------------------------------------------------
For more information about Barclays Capital, please
visit our web site at http://www.barcap.com.


Internet communications are not secure and therefore the Barclays 
Group does not accept legal responsibility for the contents of this 
message.  Although the Barclays Group operates anti-virus programmes, 
it does not accept responsibility for any damage whatsoever that is 
caused by viruses being passed.  Any views or opinions presented are 
solely those of the author and do not necessarily represent those of the 
Barclays Group.  Replies to this email may be monitored by the Barclays 
Group for operational or business reasons.

------------------------------------------------------------------------





More information about the Orca-users mailing list