Opened 8 years ago

Closed 8 years ago

#7276 closed bug (duplicate)

gettext-tools/configure from gettext-0.18.1.1 triggers BFS corruption

Reported by: mmadia Owned by: axeld
Priority: normal Milestone: R1
Component: System/Kernel Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

gettext-0.18.1.1's gettext-tools/configure script can reliably generate BFS issues, through testing "rmdir"

The issue seems to be rmdir <dirname>/./ . Both <dirname>/ and <dirname>/. do not trigger the BFS issues (judging by syslog output).

To reproduce, simply cd gettext-0.18.1.1/gettext-tools ; ./configure

gettext-tools/configure snippet

(line 38205)

    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
$as_echo_n "checking whether rmdir works... " >&6; }
if test "${gl_cv_func_rmdir_works+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  mkdir conftest.dir
     touch conftest.file
     if test "$cross_compiling" = yes; then :
  gl_cv_func_rmdir_works="guessing no"
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <stdio.h>
           #include <errno.h>
           #include <unistd.h>

int
main ()
{
return !rmdir ("conftest.file/") || errno != ENOTDIR
       || !rmdir ("conftest.dir/./");
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  gl_cv_func_rmdir_works=yes
else
  gl_cv_func_rmdir_works=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi

     rm -rf conftest.dir conftest.file
fi

syslog output

KERN: bfs: Remove:1741: No such file or directory
KERN: bfs: Could not find value in index "name"!
KERN: bfs: Update:278: No such file or directory
KERN: bfs: InitCheck:311: Bad data
KERN: bfs: inode at 4728676 is already deleted!
KERN: bfs: InitCheck:311: Bad data
KERN: bfs: KERN: inode at 4728676 is already deleted!
KERN: bfs: Remove:2487: Bad data

checkfs

gettext-0.18.1.1/gettext-tools> checkfs -c /boot
sub (inode = 1574266), has blocks already set
conftest.dir (inode = 4728676), could not be opened
        51521 nodes checked,
        0 blocks not allocated,
        3 blocks already set,
        0 blocks could be freed

        files           42955
        directories     8171
        attributes      213
        attr. dirs      168
        indices         14

Change History (1)

comment:1 Changed 8 years ago by mmadia

Resolution: duplicate
Status: newclosed

Duplicate of #6817. This information will be entered as a comment in that ticket. Sorry for the noise.

Note: See TracTickets for help on using tickets.