GNU bug report logs - #10305
coreutils-8.14, "rm -r" fails with EBADF

Previous Next

Package: coreutils;

Reported by: "Joachim Schmitz" <jojo <at> schmitz-digital.de>

Date: Thu, 15 Dec 2011 14:08:01 UTC

Severity: wishlist

Tags: notabug

Full log


Message #189 received at 10305 <at> debbugs.gnu.org (full text, mbox):

From: "Joachim Schmitz" <jojo <at> schmitz-digital.de>
To: "'Paul Eggert'" <eggert <at> cs.ucla.edu>
Cc: bug-gnulib <at> gnu.org, nagendra.vs <at> hp.com, 'Jim Meyering' <jim <at> meyering.net>,
	10305 <at> debbugs.gnu.org, "'Schmitz, Joachim'" <schmitz <at> hp.com>,
	'Eric Blake' <eblake <at> redhat.com>
Subject: RE: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
Date: Sat, 21 Jul 2012 12:42:19 +0200
> From: Paul Eggert [mailto:eggert <at> cs.ucla.edu]
> Sent: Saturday, July 21, 2012 7:38 AM
> To: Joachim Schmitz
> Cc: 10305 <at> debbugs.gnu.org; bug-gnulib <at> gnu.org; 'Eric Blake'; 'Jim Meyering';
> 'Schmitz, Joachim'; nagendra.vs <at> hp.com
> Subject: Re: bug#10305: coreutils-8.14, "rm -r" fails with EBADF
> 
> On 07/20/2012 09:17 AM, Joachim Schmitz wrote:
> > The coreutils config.hin in 8.17 no more defines any of RAW_DECL_*
> functions, which were present in 8.15. Can we expect more problems because
> of this?
> Sorry, I've lost context -- there has been a blizzard of emails in this thread and I
> don't know what the current state is any more.
> 
> As I understand it, the idea is that you submit your patches one at a time,
> against the current git master.  Which patch runs afoul of the RAW_DECL_*
> change, and why?

The patch in question here is this:
/usr/local/bin/diff -EBbu ./lib/getcwd.c.orig ./lib/getcwd.c
--- ./lib/getcwd.c.orig	2012-01-06 03:14:31 -0600
+++ ./lib/getcwd.c	2012-07-19 11:34:01 -0500
@@ -135,7 +135,7 @@
   size_t allocated = size;
   size_t used;
 
-#if HAVE_RAW_DECL_GETCWD && HAVE_MINIMALLY_WORKING_GETCWD
+#if (HAVE_RAW_DECL_GETCWD && HAVE_MINIMALLY_WORKING_GETCWD) || __TANDEM
   /* If AT_FDCWD is not defined, the algorithm below is O(N**2) and
      this is much slower than the system getcwd (at least on
      GNU/Linux).  So trust the system getcwd's results unless they

And the fact that somewhere between corutils-8.15 and 8.17 these HAVE_RAW_DECL_* have disappeared from config.hin.
Without the above patch we run into an endless recursion loop: getcwd(), openat(), rpl_open(), get_name(), getcwd() ....
until we hit the max. stack limit and abort.

While the above patch seems to fix this for use, Nagendra's concern is whether there is more to the removal of these HAVE_RAW_DECL_* stuff, whether there are other problems with these

Bye, Jojo






This bug report was last modified 12 years and 110 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.