[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
getcwd infinite recursion
From: |
Colin Watson |
Subject: |
getcwd infinite recursion |
Date: |
Sun, 14 Oct 2007 04:14:21 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Hi,
I'm in the process of making my man-db package use Gnulib. Upon
importing the xgetcwd module and using it, I found that calling xgetcwd
caused infinite recursion:
#34894 0x0805cc1e in getcwd (buf=0x0, size=0) at getcwd.c:157
#34895 0x0805cc1e in getcwd (buf=0x0, size=0) at getcwd.c:157
#34896 0x0805ca0b in xgetcwd () at xgetcwd.c:37
#34897 0x08050a6a in main (argc=2, argv=0xbfe7bc04) at man.c:726
configure defines HAVE_PARTLY_WORKING_GETCWD on my system, namely Debian
unstable with glibc 2.6.1. I note that lib/getcwd.c says (much reduced
for brevity):
#if !_LIBC
# define __getcwd getcwd
#endif
char *
__getcwd (char *buf, size_t size)
{
#if HAVE_PARTLY_WORKING_GETCWD
# undef getcwd
dir = getcwd (buf, size);
#endif
Isn't this bound to break with HAVE_PARTLY_WORKING_GETCWD && !LIBC? The
function definition preprocesses to char *getcwd.
I'm working with the gnulib package in Debian unstable (last commit
dated 2007-09-18), but inspection of a current git checkout suggests
that it has the same problem.
Thanks,
--
Colin Watson address@hidden
- getcwd infinite recursion,
Colin Watson <=
- Re: getcwd infinite recursion, Bruno Haible, 2007/10/14
- Re: getcwd infinite recursion, Colin Watson, 2007/10/14
- Re: getcwd infinite recursion, Bruno Haible, 2007/10/14
- Re: getcwd infinite recursion, Colin Watson, 2007/10/14
- Re: getcwd infinite recursion, Bruno Haible, 2007/10/14
- Re: getcwd infinite recursion, Ralf Wildenhues, 2007/10/15
- Re: getcwd infinite recursion, Bruno Haible, 2007/10/15
- Re: getcwd infinite recursion, Ralf Wildenhues, 2007/10/29
- Re: getcwd infinite recursion, Colin Watson, 2007/10/15
- Re: getcwd infinite recursion, Bruno Haible, 2007/10/15