[Bug sanitizer/85835] New: libsanitizer includes <sys/ustat.h> unconditionally

hjl.tools at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri May 18 18:11:00 GMT 2018


            Bug ID: 85835
           Summary: libsanitizer includes <sys/ustat.h> unconditionally
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
                CC: adhemerval.zanella at linaro dot org, dodji at gcc dot gnu.org,
                    dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org,
                    kcc at gcc dot gnu.org, marxin at gcc dot gnu.org
  Target Milestone: ---

libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc has

#include <sys/ustat.h>
  unsigned struct_ustat_sz = sizeof(struct ustat);
  unsigned struct_rlimit64_sz = sizeof(struct rlimit64);
  unsigned struct_statvfs64_sz = sizeof(struct statvfs64);

But <sys/ustat.h> has been removed from glibc 2.28 by

commit cf2478d53ad7071e84c724a986b56fe17f4f4ca7
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Sun Mar 18 11:28:59 2018 +0800

    Deprecate ustat syscall interface

    As for sysctl, ustat has been deprecated in favor of {f}statfs.  Also
    some newer ports which uses generic interface builds a stub version that
    returns ENOSYS.

    This patch deprecates ustat interface by removing ustat.h related headers,
    adding a compatibility symbol, and avoiding new ports to build and provide
    the symbol.

    Checked on x86_64-linux-gnu and i686-linux-gnu.  Also checked with a
    check-abi on all affected ABIs.

More information about the Gcc-bugs mailing list