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

Bug#355109: libc6.1: ia64 build failure for coreutils



Aurelien Jarno a écrit :
Michael Stone a écrit :

Package: libc6.1
Severity: important

http://buildd.debian.org/fetch.php?&pkg=coreutils&ver=5.94-1&arch=ia64&stamp=1141336896&file=log&as=raw

From the build log:


pwd: ../sysdeps/unix/sysv/linux/getcwd.c:130: __getcwd: Assertion `__libc_errno != 34 || buf != ((void *)0) || size != 0' failed. pwd: /build/buildd/coreutils-5.94/build-tree/coreutils-5.94/tests/misc/pwd.tmp/25528/zzzzzzzzzzzzzzzzzzzzzzzzzzzzz[...]

The above is part of the build tests. For some reason this assertion
occurs on ia64, but every other architecture builds fine, suggesting a
problem in the ia64 toolchain.

This build failure is going to keep coreutils out of testing, so I'd
really like to get some kind of response. My next step is to disable
build tests on ia64, but I'd really rather fix the bug rather than hide
it (and ignore other potential problems by skipping the tests).


Looking at buildd.debian.org, it seems this problem is not really new, it appears since version 5.93-2 uploaded in November 2005. Doing more tests, it appears that the version in sarge also have the problem, is just that the test was not present in coreutils.

I'll try to find out what's the problem, which is probably in glibc.

Ok, the problem is both in the kernel and in glibc, but I don't know exactly what to do...

A call to getcwd() with a buffer smaller than the actual path should return ERANGE according to POSIX. This is true for the *syscall* on ia64, but the value returned is ENAMETOOLONG on other architectures. I think the glibc has to correct the return value, as the manual of the glibc also said the return value should be ERANGE.

Then a call getcwd() with a buffer equals to void should allocate the memory. The glibc assume that allocating a buffer of size PATH_MAX is enough, and use an assertion to verify that. However it checks for ERANGE and not ENAMETOOLONG, so the assertion is only enable on ia64.

I think the solution is
- Fix the kernel
- Correct returned the value in the glibc
- Remove the assertion

I will try to contact upstream about that to know is opinion.

Bye,
Aurelien

--
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net



Reply to: