[Bug 1897666] Re: FTBFS: nss for groovy ftbfs due to erroneous nonnull check arising from glibc getcwd() annotation

Launchpad Bug Tracker 1897666 at bugs.launchpad.net
Tue Oct 6 07:26:27 UTC 2020


This bug was fixed in the package nss - 2:3.55-1ubuntu3

---------------
nss (2:3.55-1ubuntu3) groovy; urgency=medium

  * Fix FTBFS due to erroneous glibc out-of-bounds checking with gcc 10
    (LP: #1897666)
    - debian/patches/fix-ftbfs-glibc-invalid-oob-error.patch: Disable
      non-null error checking on call to getcwd since this results in an
      erroneous warning that causes the build to fail otherwise

 -- Alex Murray <alex.murray at canonical.com>  Tue, 29 Sep 2020 10:39:29
+0930

** Changed in: nss (Ubuntu)
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1897666

Title:
  FTBFS: nss for groovy ftbfs due to erroneous nonnull check arising
  from glibc getcwd() annotation

Status in nss package in Ubuntu:
  Fix Released

Bug description:
  As per the archive test rebuild done recently by doko, nss FTBFS due
  to a compiler warning raised by gcc-10 (and this fails the build due
  to the use of -Werror in CFLAGS):

  https://launchpad.net/ubuntu/+archive/test-
  rebuild-20200925-groovy/+build/20033437

  nsinstall.c: In function ‘main’:
  nsinstall.c:70:16: error: argument 1 is null but the corresponding size argument 2 value is 4096 [-Werror=nonnull]
     70 | #define GETCWD getcwd
        |                ^
  nsinstall.c:239:8: note: in expansion of macro ‘GETCWD’
    239 |  cwd = GETCWD(0, PATH_MAX);
        |        ^~~~~~
  In file included from nsinstall.c:20:
  /usr/include/unistd.h:520:14: note: in a call to function ‘getcwd’ declared with attribute ‘write_only (1, 2)’
    520 | extern char *getcwd (char *__buf, size_t __size) __THROW __wur
        |              ^~~~~~
  nsinstall.c:70:16: error: argument 1 is null but the corresponding size argument 2 value is 4096 [-Werror=nonnull]
     70 | #define GETCWD getcwd
        |                ^
  nsinstall.c:246:13: note: in expansion of macro ‘GETCWD’
    246 |     todir = GETCWD(0, PATH_MAX);
        |             ^~~~~~
  In file included from nsinstall.c:20:
  /usr/include/unistd.h:520:14: note: in a call to function ‘getcwd’ declared with attribute ‘write_only (1, 2)’
    520 | extern char *getcwd (char *__buf, size_t __size) __THROW __wur
        |              ^~~~~~
  cc1: all warnings being treated as errors

  According to the upstream bug report at
  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96832 this would appear
  to be because of the annotation of getcwd() with the access attribute.
  However, there seems to be some debate about the best way to resolve
  this (whether in glibc or in the callers of getcwd, ie nss) for now I
  propose to just disable this check via the use of gcc's #pragma
  directive.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nss/+bug/1897666/+subscriptions



More information about the Ubuntu-sponsors mailing list