NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/47806 ("Abort trap" when running Linux lddconfig)

The following reply was made to PR kern/47806; it has been noted by GNATS.

From: David Holland <>
Subject: Re: kern/47806 ("Abort trap" when running Linux lddconfig)
Date: Tue, 3 Sep 2013 03:34:09 +0000

 On Tue, Aug 27, 2013 at 10:20:01PM +0000, Sergio Lopez wrote:
  >  ldconfig uses dirent's d_type to determine whether an entry is a
  >  regular file or a link, and it's getting confused by bogus values on
  >  said field.
  >  The emulation code puts d_type just after the d_name string, but glibc
  >  expects to find it at the end of the record, which, as the structure
  >  is ALIGN'ed, could be at a different offset.
 It might be a good idea to insert the type in both places, in case
 some older version of glibc does it the other way or the behavior
 depends on what glibc thinks the kernel version is.
 I think the tidy way to write it would be
    idb.d_name[bdp->d_namlen + 1] = 0;
    idb.d_name[ALIGN(bdp->d_namlen) + 1] = 0;
 if I understand all the bits correctly.
 David A. Holland

Home | Main Index | Thread Index | Old Index