Subject: bug#10305: coreutils-8.14, "rm -r" fails with EBADF

From: "Joachim Schmitz" <[email-masked]>
Date: Fri, 20 Jul 2012 16:17:46 +0200

> From: Joachim Schmitz [mailto:[email-masked]]
> Sent: Thursday, July 19, 2012 7:54 PM
<snip>
> After quite a few iterations and with integrating the things you already fixed for
> the next releases of gnulib, coreuitls and tar, we finally got it running fine for
> coreutils-8.15. Doing the equivalent changes (not 100% identical, the coreutils
> resp. gnulib code had changed and reshuffled quite a bit) lead us into an
> endless recursion (well as endless as the stack could grow without aborting).
> After quite some effort in debugging, Nagendra finally found the culprit: in 8.15
> configure checks for several functions to be declared without a macro, one of
> them is getcwd(), and then puts a #define HAVE_RAW_DECL_GETCWD into
> config.h. Coreutils-8.17 doesn't have that check anymore, hence doesn't set
> that define and then in getcwd.c enters that endless recursion loop: getcwd(),
> openat(), rpl_open(), get_name(), getcwd() ....
> 
> Our (temp.?) fix is to add an "|| __TANDEM" to lib/getcwd.c, line 138.

Nagandra had another concern, but couldn't email, it got filtered apparently?
----snip---
Was doing more code study on the getcwd problem,

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?

Thanks & Regards
Nagendra.V.S
---snip---

Bye, Jojo