commit 5ccf88c235e060c2c61c69011161a31c3873e690 Author: Jim Meyering Date: Fri May 15 16:47:36 2009 +0200 rename each .cvsignore file to .gitignore (cherry picked from commit 2e180a26222caf478f29e272c9d1b5d9c6299752) diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index 213609f..0000000 --- a/.cvsignore +++ /dev/null @@ -1,29 +0,0 @@ -*.d *.o *.so *.po *.go *.bo stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz *.bz2 -=* -TODO AUTHORS copyr-* copying.* -glibc-* - -configparms - -sun[43]* i[345]86* hp300* - -ieeetest hppa-sysdeps regex - -gpl2lgpl.sed -distinfo -distinfo - -test-include -analysis -docs -releases - -libc.prj .libc.prcs_aux -libc.proj .snprj - -TODO.html - -autom4te*.cache - -rtkaio diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..213609f --- /dev/null +++ b/.gitignore @@ -0,0 +1,29 @@ +*.d *.o *.so *.po *.go *.bo stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz *.bz2 +=* +TODO AUTHORS copyr-* copying.* +glibc-* + +configparms + +sun[43]* i[345]86* hp300* + +ieeetest hppa-sysdeps regex + +gpl2lgpl.sed +distinfo +distinfo + +test-include +analysis +docs +releases + +libc.prj .libc.prcs_aux +libc.proj .snprj + +TODO.html + +autom4te*.cache + +rtkaio diff --git a/assert/.cvsignore b/assert/.cvsignore deleted file mode 100644 index 3fc9f4c..0000000 --- a/assert/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/assert/.gitignore b/assert/.gitignore new file mode 100644 index 0000000..3fc9f4c --- /dev/null +++ b/assert/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/csu/.cvsignore b/csu/.cvsignore deleted file mode 100644 index da6e41b..0000000 --- a/csu/.cvsignore +++ /dev/null @@ -1,7 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo -specs diff --git a/csu/.gitignore b/csu/.gitignore new file mode 100644 index 0000000..da6e41b --- /dev/null +++ b/csu/.gitignore @@ -0,0 +1,7 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo +specs diff --git a/ctype/.cvsignore b/ctype/.cvsignore deleted file mode 100644 index 3fc9f4c..0000000 --- a/ctype/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/ctype/.gitignore b/ctype/.gitignore new file mode 100644 index 0000000..3fc9f4c --- /dev/null +++ b/ctype/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/dirent/.cvsignore b/dirent/.cvsignore deleted file mode 100644 index 3fc9f4c..0000000 --- a/dirent/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/dirent/.gitignore b/dirent/.gitignore new file mode 100644 index 0000000..3fc9f4c --- /dev/null +++ b/dirent/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/elf/.cvsignore b/elf/.cvsignore deleted file mode 100644 index 3fc9f4c..0000000 --- a/elf/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/elf/.gitignore b/elf/.gitignore new file mode 100644 index 0000000..3fc9f4c --- /dev/null +++ b/elf/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/gmon/.cvsignore b/gmon/.cvsignore deleted file mode 100644 index 3fc9f4c..0000000 --- a/gmon/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/gmon/.gitignore b/gmon/.gitignore new file mode 100644 index 0000000..3fc9f4c --- /dev/null +++ b/gmon/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/gnulib/.cvsignore b/gnulib/.cvsignore deleted file mode 100644 index 3fc9f4c..0000000 --- a/gnulib/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/gnulib/.gitignore b/gnulib/.gitignore new file mode 100644 index 0000000..3fc9f4c --- /dev/null +++ b/gnulib/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/grp/.cvsignore b/grp/.cvsignore deleted file mode 100644 index 3fc9f4c..0000000 --- a/grp/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/grp/.gitignore b/grp/.gitignore new file mode 100644 index 0000000..3fc9f4c --- /dev/null +++ b/grp/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/hurd/.cvsignore b/hurd/.cvsignore deleted file mode 100644 index 3fc9f4c..0000000 --- a/hurd/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/hurd/.gitignore b/hurd/.gitignore new file mode 100644 index 0000000..3fc9f4c --- /dev/null +++ b/hurd/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/inet/.cvsignore b/inet/.cvsignore deleted file mode 100644 index 3fc9f4c..0000000 --- a/inet/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/inet/.gitignore b/inet/.gitignore new file mode 100644 index 0000000..3fc9f4c --- /dev/null +++ b/inet/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/intl/.cvsignore b/intl/.cvsignore deleted file mode 100644 index 3fc9f4c..0000000 --- a/intl/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/intl/.gitignore b/intl/.gitignore new file mode 100644 index 0000000..3fc9f4c --- /dev/null +++ b/intl/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/io/.cvsignore b/io/.cvsignore deleted file mode 100644 index 3fc9f4c..0000000 --- a/io/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/io/.gitignore b/io/.gitignore new file mode 100644 index 0000000..3fc9f4c --- /dev/null +++ b/io/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/libio/.cvsignore b/libio/.cvsignore deleted file mode 100644 index 602b74c..0000000 --- a/libio/.cvsignore +++ /dev/null @@ -1,8 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* - -mpn-copy.mk -distinfo diff --git a/libio/.gitignore b/libio/.gitignore new file mode 100644 index 0000000..602b74c --- /dev/null +++ b/libio/.gitignore @@ -0,0 +1,8 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* + +mpn-copy.mk +distinfo diff --git a/locale/.cvsignore b/locale/.cvsignore deleted file mode 100644 index 3fc9f4c..0000000 --- a/locale/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/locale/.gitignore b/locale/.gitignore new file mode 100644 index 0000000..3fc9f4c --- /dev/null +++ b/locale/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/mach/.cvsignore b/mach/.cvsignore deleted file mode 100644 index 3fc9f4c..0000000 --- a/mach/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/mach/.gitignore b/mach/.gitignore new file mode 100644 index 0000000..3fc9f4c --- /dev/null +++ b/mach/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/manual/.cvsignore b/manual/.cvsignore deleted file mode 100644 index 54abbbb..0000000 --- a/manual/.cvsignore +++ /dev/null @@ -1,14 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz *.bz2 -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* - -*.dvi* *.info* *.c.texi *.ps *.pdf -*.toc *.aux *.log *.tmp -*.cp *.cps *.fn *.fns *.vr *.vrs *.tp *.tps *.ky *.kys *.pg *.pgs - -texis top-menu.texi chapters.texi summary.texi stamp-* -distinfo dir-add.texinfo dir-add.texi - -libm-err.texi diff --git a/manual/.gitignore b/manual/.gitignore new file mode 100644 index 0000000..54abbbb --- /dev/null +++ b/manual/.gitignore @@ -0,0 +1,14 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz *.bz2 +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* + +*.dvi* *.info* *.c.texi *.ps *.pdf +*.toc *.aux *.log *.tmp +*.cp *.cps *.fn *.fns *.vr *.vrs *.tp *.tps *.ky *.kys *.pg *.pgs + +texis top-menu.texi chapters.texi summary.texi stamp-* +distinfo dir-add.texinfo dir-add.texi + +libm-err.texi diff --git a/math/.cvsignore b/math/.cvsignore deleted file mode 100644 index 3fc9f4c..0000000 --- a/math/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/math/.gitignore b/math/.gitignore new file mode 100644 index 0000000..3fc9f4c --- /dev/null +++ b/math/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/misc/.cvsignore b/misc/.cvsignore deleted file mode 100644 index 3fc9f4c..0000000 --- a/misc/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/misc/.gitignore b/misc/.gitignore new file mode 100644 index 0000000..3fc9f4c --- /dev/null +++ b/misc/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/po/.cvsignore b/po/.cvsignore deleted file mode 100644 index 37752e3..0000000 --- a/po/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -*.mo -libc.pot.files diff --git a/po/.gitignore b/po/.gitignore new file mode 100644 index 0000000..37752e3 --- /dev/null +++ b/po/.gitignore @@ -0,0 +1,2 @@ +*.mo +libc.pot.files diff --git a/posix/.cvsignore b/posix/.cvsignore deleted file mode 100644 index 3fc9f4c..0000000 --- a/posix/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/posix/.gitignore b/posix/.gitignore new file mode 100644 index 0000000..3fc9f4c --- /dev/null +++ b/posix/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/pwd/.cvsignore b/pwd/.cvsignore deleted file mode 100644 index 3fc9f4c..0000000 --- a/pwd/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/pwd/.gitignore b/pwd/.gitignore new file mode 100644 index 0000000..3fc9f4c --- /dev/null +++ b/pwd/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/resolv/.cvsignore b/resolv/.cvsignore deleted file mode 100644 index 3fc9f4c..0000000 --- a/resolv/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/resolv/.gitignore b/resolv/.gitignore new file mode 100644 index 0000000..3fc9f4c --- /dev/null +++ b/resolv/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/resource/.cvsignore b/resource/.cvsignore deleted file mode 100644 index 3fc9f4c..0000000 --- a/resource/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/resource/.gitignore b/resource/.gitignore new file mode 100644 index 0000000..3fc9f4c --- /dev/null +++ b/resource/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/setjmp/.cvsignore b/setjmp/.cvsignore deleted file mode 100644 index 3fc9f4c..0000000 --- a/setjmp/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/setjmp/.gitignore b/setjmp/.gitignore new file mode 100644 index 0000000..3fc9f4c --- /dev/null +++ b/setjmp/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/signal/.cvsignore b/signal/.cvsignore deleted file mode 100644 index 3fc9f4c..0000000 --- a/signal/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/signal/.gitignore b/signal/.gitignore new file mode 100644 index 0000000..3fc9f4c --- /dev/null +++ b/signal/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/socket/.cvsignore b/socket/.cvsignore deleted file mode 100644 index 3fc9f4c..0000000 --- a/socket/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/socket/.gitignore b/socket/.gitignore new file mode 100644 index 0000000..3fc9f4c --- /dev/null +++ b/socket/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/stdio-common/.cvsignore b/stdio-common/.cvsignore deleted file mode 100644 index 602b74c..0000000 --- a/stdio-common/.cvsignore +++ /dev/null @@ -1,8 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* - -mpn-copy.mk -distinfo diff --git a/stdio-common/.gitignore b/stdio-common/.gitignore new file mode 100644 index 0000000..602b74c --- /dev/null +++ b/stdio-common/.gitignore @@ -0,0 +1,8 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* + +mpn-copy.mk +distinfo diff --git a/stdlib/.cvsignore b/stdlib/.cvsignore deleted file mode 100644 index 602b74c..0000000 --- a/stdlib/.cvsignore +++ /dev/null @@ -1,8 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* - -mpn-copy.mk -distinfo diff --git a/stdlib/.gitignore b/stdlib/.gitignore new file mode 100644 index 0000000..602b74c --- /dev/null +++ b/stdlib/.gitignore @@ -0,0 +1,8 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* + +mpn-copy.mk +distinfo diff --git a/string/.cvsignore b/string/.cvsignore deleted file mode 100644 index 3fc9f4c..0000000 --- a/string/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/string/.gitignore b/string/.gitignore new file mode 100644 index 0000000..3fc9f4c --- /dev/null +++ b/string/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/sunrpc/.cvsignore b/sunrpc/.cvsignore deleted file mode 100644 index b2e79b5..0000000 --- a/sunrpc/.cvsignore +++ /dev/null @@ -1,8 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* - -rpcsrc-4.0 -distinfo diff --git a/sunrpc/.gitignore b/sunrpc/.gitignore new file mode 100644 index 0000000..b2e79b5 --- /dev/null +++ b/sunrpc/.gitignore @@ -0,0 +1,8 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* + +rpcsrc-4.0 +distinfo diff --git a/sysdeps/mach/hurd/.cvsignore b/sysdeps/mach/hurd/.cvsignore deleted file mode 100644 index 1f69fd9..0000000 --- a/sysdeps/mach/hurd/.cvsignore +++ /dev/null @@ -1,4 +0,0 @@ -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* diff --git a/sysdeps/mach/hurd/.gitignore b/sysdeps/mach/hurd/.gitignore new file mode 100644 index 0000000..1f69fd9 --- /dev/null +++ b/sysdeps/mach/hurd/.gitignore @@ -0,0 +1,4 @@ +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* diff --git a/sysdeps/unix/common/.cvsignore b/sysdeps/unix/common/.cvsignore deleted file mode 100644 index 1f69fd9..0000000 --- a/sysdeps/unix/common/.cvsignore +++ /dev/null @@ -1,4 +0,0 @@ -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* diff --git a/sysdeps/unix/common/.gitignore b/sysdeps/unix/common/.gitignore new file mode 100644 index 0000000..1f69fd9 --- /dev/null +++ b/sysdeps/unix/common/.gitignore @@ -0,0 +1,4 @@ +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* diff --git a/sysvipc/.cvsignore b/sysvipc/.cvsignore deleted file mode 100644 index 3fc9f4c..0000000 --- a/sysvipc/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/sysvipc/.gitignore b/sysvipc/.gitignore new file mode 100644 index 0000000..3fc9f4c --- /dev/null +++ b/sysvipc/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/termios/.cvsignore b/termios/.cvsignore deleted file mode 100644 index 3fc9f4c..0000000 --- a/termios/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/termios/.gitignore b/termios/.gitignore new file mode 100644 index 0000000..3fc9f4c --- /dev/null +++ b/termios/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/time/.cvsignore b/time/.cvsignore deleted file mode 100644 index 3fc9f4c..0000000 --- a/time/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/time/.gitignore b/time/.gitignore new file mode 100644 index 0000000..3fc9f4c --- /dev/null +++ b/time/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/wcsmbs/.cvsignore b/wcsmbs/.cvsignore deleted file mode 100644 index 3fc9f4c..0000000 --- a/wcsmbs/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/wcsmbs/.gitignore b/wcsmbs/.gitignore new file mode 100644 index 0000000..3fc9f4c --- /dev/null +++ b/wcsmbs/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo diff --git a/wctype/.cvsignore b/wctype/.cvsignore deleted file mode 100644 index 3fc9f4c..0000000 --- a/wctype/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* -distinfo diff --git a/wctype/.gitignore b/wctype/.gitignore new file mode 100644 index 0000000..3fc9f4c --- /dev/null +++ b/wctype/.gitignore @@ -0,0 +1,6 @@ +*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps +*.gz *.Z *.tar *.tgz +=* +TODO COPYING* AUTHORS copyr-* copying.* +glibc-* +distinfo commit b0a411e5ddb4d0e7e9eca017fd6e8c3c060071cb Author: Ulrich Drepper Date: Fri May 15 13:02:02 2009 -0700 Ignore Emacs backup files. (cherry picked from commit f1342e0be8e222dbca077beca94b5937564e8c4b) diff --git a/.gitignore b/.gitignore index 213609f..1518b6a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +*~ *.d *.o *.so *.po *.go *.bo stamp.* *.stamp *.ustamp *.udeps *.gz *.Z *.tar *.tgz *.bz2 =* commit 85734801890201249fcf5270ca50ae0dbac77c94 Author: Ulrich Drepper Date: Fri May 15 19:47:10 2009 -0700 Cleanup some .gitignore files. (cherry picked from commit 9a1fbe861d8ae41976f926a211d59098a030878f) diff --git a/.gitignore b/.gitignore index 1518b6a..d903bc6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1,35 @@ *~ -*.d *.o *.so *.po *.go *.bo stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz *.bz2 +*.d +*.o +*.so +*.po +*.go +*.bo +stamp.* +*.stamp +*.ustamp +*.udeps +*.gz +*.Z +*.tar +*.tgz +*.bz2 =* -TODO AUTHORS copyr-* copying.* +TODO +AUTHORS +copyr-* +copying.* glibc-* configparms -sun[43]* i[345]86* hp300* +sun[43]* +i[345]86* +hp300* -ieeetest hppa-sysdeps regex +ieeetest +hppa-sysdeps +regex gpl2lgpl.sed distinfo @@ -20,8 +40,10 @@ analysis docs releases -libc.prj .libc.prcs_aux -libc.proj .snprj +libc.prj +.libc.prcs_aux +libc.proj +.snprj TODO.html diff --git a/manual/.gitignore b/manual/.gitignore index 54abbbb..27f045c 100644 --- a/manual/.gitignore +++ b/manual/.gitignore @@ -1,14 +1,32 @@ -*.d *.o *.so *.po *.go stamp.* *.stamp *.ustamp *.udeps -*.gz *.Z *.tar *.tgz *.bz2 -=* -TODO COPYING* AUTHORS copyr-* copying.* -glibc-* +*.dvi* +*.info* +*.c.texi +*.ps +*.pdf +*.toc +*.aux +*.log +*.tmp +*.cp +*.cps +*.fn +*.fns +*.vr +*.vrs +*.tp +*.tps +*.ky +*.kys +*.pg +*.pgs -*.dvi* *.info* *.c.texi *.ps *.pdf -*.toc *.aux *.log *.tmp -*.cp *.cps *.fn *.fns *.vr *.vrs *.tp *.tps *.ky *.kys *.pg *.pgs - -texis top-menu.texi chapters.texi summary.texi stamp-* -distinfo dir-add.texinfo dir-add.texi +texis +top-menu.texi +chapters.texi +summary.texi +stamp-* +distinfo +dir-add.texinfo +dir-add.texi libm-err.texi commit f84a1e419017b86b4745ae983854b3d57e8c55f1 Author: Ulrich Drepper Date: Fri May 15 10:12:35 2009 -0700 No cancel signal in unsafe places. When disabling async cancellation we cannot return from the function call if the thread is canceled. This happens when the cancel bits have been set before async cancel is disabled but the signal hasn't been sent/received yet. Delay for as long as necessary since otherwise the signal might be received in an unsafe context. (cherry picked from commit 1a7f254b4b0590bfab1baa1400705265b1b23b97) diff --git a/nptl/ChangeLog b/nptl/ChangeLog index b83dfd0..74a2a73 100644 diff --git a/nptl/cancellation.c b/nptl/cancellation.c index 81134a6..4d528cf 100644 --- a/nptl/cancellation.c +++ b/nptl/cancellation.c @@ -70,15 +70,17 @@ __pthread_disable_asynccancel (int oldtype) return; struct pthread *self = THREAD_SELF; + int newval; #ifdef THREAD_ATOMIC_AND THREAD_ATOMIC_AND (self, cancelhandling, ~CANCELTYPE_BITMASK); + newval = THREAD_GETMEM (self, cancelhandling); #else int oldval = THREAD_GETMEM (self, cancelhandling); while (1) { - int newval = oldval & ~CANCELTYPE_BITMASK; + newval = oldval & ~CANCELTYPE_BITMASK; if (newval == oldval) break; @@ -92,4 +94,14 @@ __pthread_disable_asynccancel (int oldtype) oldval = curval; } #endif + + /* We cannot return when we are being canceled. Upon return the + thread might be things which would have to be undone. The + following loop should loop until the cancellation signal is + delivered. */ + while (__builtin_expect (newval & CANCELED_BITMASK, 0)) + { + lll_futex_wait (&self->cancelhandling, newval, LLL_PRIVATE); + newval = THREAD_GETMEM (self, cancelhandling); + } } diff --git a/nptl/libc-cancellation.c b/nptl/libc-cancellation.c index cf24f1c..35ac82b 100644 --- a/nptl/libc-cancellation.c +++ b/nptl/libc-cancellation.c @@ -86,15 +86,17 @@ __libc_disable_asynccancel (int oldtype) return; struct pthread *self = THREAD_SELF; + int newval; #ifdef THREAD_ATOMIC_AND THREAD_ATOMIC_AND (self, cancelhandling, ~CANCELTYPE_BITMASK); + newval = THREAD_GETMEM (self, cancelhandling); #else int oldval = THREAD_GETMEM (self, cancelhandling); while (1) { - int newval = oldval & ~CANCELTYPE_BITMASK; + newval = oldval & ~CANCELTYPE_BITMASK; if (newval == oldval) break; @@ -108,6 +110,16 @@ __libc_disable_asynccancel (int oldtype) oldval = curval; } #endif + + /* We cannot return when we are being canceled. Upon return the + thread might be things which would have to be undone. The + following loop should loop until the cancellation signal is + delivered. */ + while (__builtin_expect (newval & CANCELED_BITMASK, 0)) + { + lll_futex_wait (&self->cancelhandling, newval, LLL_PRIVATE); + newval = THREAD_GETMEM (self, cancelhandling); + } } commit 6b23316e66ec3d2f1417896e1fa25c24a8ae32d3 Author: Ulrich Drepper Date: Fri May 15 20:42:36 2009 -0700 Fix change to prevent cancel signal in unsafe places. The bits tested to decide when to delay the return when switching off async cancel mode were wrong. Fix that. Also close a race condition in pthread_cancel where the bit indicating the cancellation is unconditionally set even if the cancel type might have changed. (cherry picked from commit 9437b427cec6266abd303983848549a5c4ba0d0a) diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 74a2a73..f3bd32f 100644 diff --git a/nptl/cancellation.c b/nptl/cancellation.c index 4d528cf..2a6f83d 100644 --- a/nptl/cancellation.c +++ b/nptl/cancellation.c @@ -72,10 +72,6 @@ __pthread_disable_asynccancel (int oldtype) struct pthread *self = THREAD_SELF; int newval; -#ifdef THREAD_ATOMIC_AND - THREAD_ATOMIC_AND (self, cancelhandling, ~CANCELTYPE_BITMASK); - newval = THREAD_GETMEM (self, cancelhandling); -#else int oldval = THREAD_GETMEM (self, cancelhandling); while (1) @@ -93,13 +89,13 @@ __pthread_disable_asynccancel (int oldtype) /* Prepare the next round. */ oldval = curval; } -#endif /* We cannot return when we are being canceled. Upon return the thread might be things which would have to be undone. The following loop should loop until the cancellation signal is delivered. */ - while (__builtin_expect (newval & CANCELED_BITMASK, 0)) + while (__builtin_expect ((newval & (CANCELING_BITMASK | CANCELED_BITMASK)) + == CANCELING_BITMASK, 0)) { lll_futex_wait (&self->cancelhandling, newval, LLL_PRIVATE); newval = THREAD_GETMEM (self, cancelhandling); diff --git a/nptl/libc-cancellation.c b/nptl/libc-cancellation.c index 35ac82b..cada464 100644 --- a/nptl/libc-cancellation.c +++ b/nptl/libc-cancellation.c @@ -88,10 +88,6 @@ __libc_disable_asynccancel (int oldtype) struct pthread *self = THREAD_SELF; int newval; -#ifdef THREAD_ATOMIC_AND - THREAD_ATOMIC_AND (self, cancelhandling, ~CANCELTYPE_BITMASK); - newval = THREAD_GETMEM (self, cancelhandling); -#else int oldval = THREAD_GETMEM (self, cancelhandling); while (1) @@ -109,13 +105,13 @@ __libc_disable_asynccancel (int oldtype) /* Prepare the next round. */ oldval = curval; } -#endif /* We cannot return when we are being canceled. Upon return the thread might be things which would have to be undone. The following loop should loop until the cancellation signal is delivered. */ - while (__builtin_expect (newval & CANCELED_BITMASK, 0)) + while (__builtin_expect ((newval & (CANCELING_BITMASK | CANCELED_BITMASK)) + == CANCELING_BITMASK, 0)) { lll_futex_wait (&self->cancelhandling, newval, LLL_PRIVATE); newval = THREAD_GETMEM (self, cancelhandling); diff --git a/nptl/pthread_cancel.c b/nptl/pthread_cancel.c index a13af56..55bb0da 100644 --- a/nptl/pthread_cancel.c +++ b/nptl/pthread_cancel.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2004, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2002. @@ -44,6 +44,7 @@ pthread_cancel (th) int newval; do { + again: oldval = pd->cancelhandling; newval = oldval | CANCELING_BITMASK | CANCELED_BITMASK; @@ -59,7 +60,10 @@ pthread_cancel (th) if (CANCEL_ENABLED_AND_CANCELED_AND_ASYNCHRONOUS (newval)) { /* Mark the cancellation as "in progress". */ - atomic_bit_set (&pd->cancelhandling, CANCELING_BIT); + if (atomic_compare_and_exchange_bool_acq (&pd->cancelhandling, + oldval | CANCELING_BITMASK, + oldval)) + goto again; /* The cancellation handler will take care of marking the thread as canceled. */ commit 6dca80c9c771c5c4728a8c335861300bce93f8a0 Author: Jakub Jelinek Date: Fri May 15 20:48:08 2009 -0700 Don't try to cleanup libselinux and libaudit. Because we are not shutting down the other threads first another thread might work on a query before the process shuts down. In this case the now uninitialized libselinux and libaudit might be used. Just don't free the resources. It's not necessary anyway because the process is about to terminate. (cherry picked from commit 9e471dad8e173806cbbfb704875d5ae40e36fa34) (fixed ChangeLog entry by pasky) diff --git a/ChangeLog b/ChangeLog index e3afa85..3f41c66 100644 diff --git a/nscd/nscd.c b/nscd/nscd.c index 3265ea8..b9035f2 100644 --- a/nscd/nscd.c +++ b/nscd/nscd.c @@ -488,10 +488,6 @@ termination_handler (int signum) msync (dbs[cnt].head, dbs[cnt].memsize, MS_ASYNC); } - /* Shutdown the SELinux AVC. */ - if (selinux_enabled) - nscd_avc_destroy (); - _exit (EXIT_SUCCESS); } diff --git a/nscd/selinux.c b/nscd/selinux.c index 9a167ec..e07a454 100644 --- a/nscd/selinux.c +++ b/nscd/selinux.c @@ -1,5 +1,5 @@ /* SELinux access controls for nscd. - Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc. + Copyright (C) 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Matthew Rickard , 2004. @@ -418,15 +418,4 @@ nscd_avc_print_stats (struct avc_cache_stats *cstats) cstats->cav_probes, cstats->cav_misses); } - -/* Clean up the AVC before exiting. */ -void -nscd_avc_destroy (void) -{ - avc_destroy (); -#ifdef HAVE_LIBAUDIT - audit_close (audit_fd); -#endif -} - #endif /* HAVE_SELINUX */ diff --git a/nscd/selinux.h b/nscd/selinux.h index 27afcd6..67d981b 100644 --- a/nscd/selinux.h +++ b/nscd/selinux.h @@ -1,5 +1,5 @@ /* Header for nscd SELinux access controls. - Copyright (C) 2004, 2006, 2007 Free Software Foundation, Inc. + Copyright (C) 2004, 2006, 2007, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Matthew Rickard , 2004. @@ -35,8 +35,6 @@ struct avc_cache_stats; /* Initialize the userspace AVC. */ extern void nscd_avc_init (void); -/* Destroy the userspace AVC. */ -extern void nscd_avc_destroy (void); /* Determine if we are running on an SELinux kernel. */ extern void nscd_selinux_enabled (int *selinux_enabled); /* Check if the client has permission for the request type. */ @@ -55,7 +53,6 @@ extern void install_real_capabilities (cap_t new_caps); #else # define selinux_enabled 0 # define nscd_avc_init() (void) 0 -# define nscd_avc_destroy() (void) 0 # define nscd_selinux_enabled(selinux_enabled) (void) 0 # define nscd_request_avc_has_perm(fd, req) 0 # define nscd_avc_cache_stats(cstats) (void) 0 commit f27dc66bb946b74df6817768758b1de49d4be887 Author: Jakub Jelinek Date: Fri May 15 21:08:55 2009 -0700 Avoid double definition of catomic_compare_and_exchange_val_acq. (cherry picked from commit 3b1b533bc3239ef6df1e40e0088e7270ac060be6) diff --git a/ChangeLog b/ChangeLog index 3f41c66..b584ec6 100644 diff --git a/include/atomic.h b/include/atomic.h index 7c0548b..9366f78 100644 --- a/include/atomic.h +++ b/include/atomic.h @@ -95,14 +95,15 @@ #endif -#if !defined catomic_compare_and_exchange_val_acq \ - && defined __arch_c_compare_and_exchange_val_32_acq -# define catomic_compare_and_exchange_val_acq(mem, newval, oldval) \ +#ifndef catomic_compare_and_exchange_val_acq +# ifdef __arch_c_compare_and_exchange_val_32_acq +# define catomic_compare_and_exchange_val_acq(mem, newval, oldval) \ __atomic_val_bysize (__arch_c_compare_and_exchange_val,acq, \ mem, newval, oldval) -#else -# define catomic_compare_and_exchange_val_acq(mem, newval, oldval) \ +# else +# define catomic_compare_and_exchange_val_acq(mem, newval, oldval) \ atomic_compare_and_exchange_val_acq (mem, newval, oldval) +# endif #endif @@ -125,8 +126,8 @@ # define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \ __atomic_bool_bysize (__arch_compare_and_exchange_bool,acq, \ mem, newval, oldval) -# else -# define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \ +# else +# define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \ ({ /* Cannot use __oldval here, because macros later in this file might \ call this macro with __oldval argument. */ \ __typeof (oldval) __atg3_old = (oldval); \ @@ -142,8 +143,8 @@ # define catomic_compare_and_exchange_bool_acq(mem, newval, oldval) \ __atomic_bool_bysize (__arch_c_compare_and_exchange_bool,acq, \ mem, newval, oldval) -# else -# define catomic_compare_and_exchange_bool_acq(mem, newval, oldval) \ +# else +# define catomic_compare_and_exchange_bool_acq(mem, newval, oldval) \ ({ /* Cannot use __oldval here, because macros later in this file might \ call this macro with __oldval argument. */ \ __typeof (oldval) __atg4_old = (oldval); \ commit b9e0df9847f3460c67e27e631af8662e7906ed6b Author: Jakub Jelinek Date: Fri May 15 21:17:08 2009 -0700 Robustify libc-side nscd database reader. The nscd database mapped in processes can change at any time. We have to be more vigilant when it comes to using that memory. Test the data entries are valid in their entire size, don't read data again from memory once we verified it, and make sure the trailing pointer is not going off the deep end. (cherry picked from commit cfe1fc1013d0e7e4863c974fa0e78891cc0a2ed2) diff --git a/ChangeLog b/ChangeLog index b584ec6..a672e15 100644 diff --git a/nscd/nscd-client.h b/nscd/nscd-client.h index 3c9688f..f66a658 100644 --- a/nscd/nscd-client.h +++ b/nscd/nscd-client.h @@ -1,4 +1,4 @@ -/* Copyright (c) 1998, 1999, 2000, 2003, 2004, 2005, 2006, 2007 +/* Copyright (c) 1998, 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1998. @@ -329,7 +329,8 @@ static inline int __nscd_drop_map_ref (struct mapped_database *map, extern struct datahead *__nscd_cache_search (request_type type, const char *key, size_t keylen, - const struct mapped_database *mapped); + const struct mapped_database *mapped, + size_t datalen); /* Wrappers around read, readv and write that only read/write less than LEN bytes on error or EOF. */ diff --git a/nscd/nscd_getai.c b/nscd/nscd_getai.c index 674a5e7..d1c5cd1 100644 --- a/nscd/nscd_getai.c +++ b/nscd/nscd_getai.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2004. @@ -75,7 +76,7 @@ __nscd_getai (const char *key, struct nscd_ai_result **result, int *h_errnop) if (mapped != NO_MAPPING) { struct datahead *found = __nscd_cache_search (GETAI, key, keylen, - mapped); + mapped, sizeof ai_resp); if (found != NULL) { respdata = (char *) (&found->data[0].aidata + 1); diff --git a/nscd/nscd_getgr_r.c b/nscd/nscd_getgr_r.c index b84b06b..c2d204c 100644 --- a/nscd/nscd_getgr_r.c +++ b/nscd/nscd_getgr_r.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-2000, 2002-2005, 2006, 2007 +/* Copyright (C) 1998-2000, 2002-2005, 2006, 2007, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1998. @@ -107,7 +107,8 @@ nscd_getgr_r (const char *key, size_t keylen, request_type type, if (mapped != NO_MAPPING) { - struct datahead *found = __nscd_cache_search (type, key, keylen, mapped); + struct datahead *found = __nscd_cache_search (type, key, keylen, mapped, + sizeof gr_resp); if (found != NULL) { len = (const uint32_t *) (&found->data[0].grdata + 1); diff --git a/nscd/nscd_gethst_r.c b/nscd/nscd_gethst_r.c index aea8288..70631fa 100644 --- a/nscd/nscd_gethst_r.c +++ b/nscd/nscd_gethst_r.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1998-2005, 2006, 2007, 2008 Free Software Foundation, Inc. +/* Copyright (C) 1998-2005, 2006, 2007, 2008, 2009 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1998. @@ -137,7 +138,8 @@ nscd_gethst_r (const char *key, size_t keylen, request_type type, if (mapped != NO_MAPPING) { /* No const qualifier, as it can change during garbage collection. */ - struct datahead *found = __nscd_cache_search (type, key, keylen, mapped); + struct datahead *found = __nscd_cache_search (type, key, keylen, mapped, + sizeof hst_resp); if (found != NULL) { h_name = (char *) (&found->data[0].hstdata + 1); diff --git a/nscd/nscd_getpw_r.c b/nscd/nscd_getpw_r.c index 21f792b..8a4449d 100644 --- a/nscd/nscd_getpw_r.c +++ b/nscd/nscd_getpw_r.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2003, 2004, 2005, 2007 +/* Copyright (C) 1998, 1999, 2003, 2004, 2005, 2007, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1998. @@ -104,7 +104,8 @@ nscd_getpw_r (const char *key, size_t keylen, request_type type, if (mapped != NO_MAPPING) { - struct datahead *found = __nscd_cache_search (type, key, keylen, mapped); + struct datahead *found = __nscd_cache_search (type, key, keylen, mapped, + sizeof pw_resp); if (found != NULL) { pw_name = (const char *) (&found->data[0].pwdata + 1); diff --git a/nscd/nscd_getserv_r.c b/nscd/nscd_getserv_r.c index b1ad7e2..dce4165 100644 --- a/nscd/nscd_getserv_r.c +++ b/nscd/nscd_getserv_r.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2007 Free Software Foundation, Inc. +/* Copyright (C) 2007, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2007. @@ -104,7 +104,8 @@ nscd_getserv_r (const char *crit, size_t critlen, const char *proto, if (mapped != NO_MAPPING) { - struct datahead *found = __nscd_cache_search (type, key, keylen, mapped); + struct datahead *found = __nscd_cache_search (type, key, keylen, mapped, + sizeof serv_resp); if (found != NULL) { diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c index cd3fa24..db24796 100644 --- a/nscd/nscd_helper.c +++ b/nscd/nscd_helper.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -472,18 +473,20 @@ __nscd_get_map_ref (request_type type, const char *name, garbage collection. */ struct datahead * __nscd_cache_search (request_type type, const char *key, size_t keylen, - const struct mapped_database *mapped) + const struct mapped_database *mapped, size_t datalen) { unsigned long int hash = __nis_hash (key, keylen) % mapped->head->module; size_t datasize = mapped->datasize; ref_t trail = mapped->head->array[hash]; + trail = atomic_forced_read (trail); ref_t work = trail; int tick = 0; while (work != ENDREF && work + sizeof (struct hashentry) <= datasize) { struct hashentry *here = (struct hashentry *) (mapped->data + work); + ref_t here_key, here_packet; #ifndef _STRING_ARCH_unaligned /* Although during garbage collection when moving struct hashentry @@ -498,13 +501,14 @@ __nscd_cache_search (request_type type, const char *key, size_t keylen, if (type == here->type && keylen == here->len - && here->key + keylen <= datasize - && memcmp (key, mapped->data + here->key, keylen) == 0 - && here->packet + sizeof (struct datahead) <= datasize) + && (here_key = atomic_forced_read (here->key)) + keylen <= datasize + && memcmp (key, mapped->data + here_key, keylen) == 0 + && ((here_packet = atomic_forced_read (here->packet)) + + sizeof (struct datahead) <= datasize)) { /* We found the entry. Increment the appropriate counter. */ struct datahead *dh - = (struct datahead *) (mapped->data + here->packet); + = (struct datahead *) (mapped->data + here_packet); #ifndef _STRING_ARCH_unaligned if ((uintptr_t) dh & (__alignof__ (*dh) - 1)) @@ -513,11 +517,14 @@ __nscd_cache_search (request_type type, const char *key, size_t keylen, /* See whether we must ignore the entry or whether something is wrong because garbage collection is in progress. */ - if (dh->usable && here->packet + dh->allocsize <= datasize) + if (dh->usable + && here_packet + dh->allocsize <= datasize + && (here_packet + offsetof (struct datahead, data) + datalen + <= datasize)) return dh; } - work = here->next; + work = atomic_forced_read (here->next); /* Prevent endless loops. This should never happen but perhaps the database got corrupted, accidentally or deliberately. */ if (work == trail) @@ -532,7 +539,11 @@ __nscd_cache_search (request_type type, const char *key, size_t keylen, if ((uintptr_t) trailelem & (__alignof__ (*trailelem) - 1)) return NULL; #endif - trail = trailelem->next; + + if (trail + sizeof (struct hashentry) > datasize) + return NULL; + + trail = atomic_forced_read (trailelem->next); } tick = 1 - tick; } diff --git a/nscd/nscd_initgroups.c b/nscd/nscd_initgroups.c index 866455a..5ff60c0 100644 --- a/nscd/nscd_initgroups.c +++ b/nscd/nscd_initgroups.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2004. @@ -55,7 +55,8 @@ __nscd_getgrouplist (const char *user, gid_t group, long int *size, if (mapped != NO_MAPPING) { struct datahead *found = __nscd_cache_search (INITGROUPS, user, - userlen, mapped); + userlen, mapped, + sizeof initgr_resp); if (found != NULL) { respdata = (char *) (&found->data[0].initgrdata + 1); commit 4c7cb20430af51ddebf270b423d5c4aec3b9f770 Author: Ulrich Drepper Date: Fri May 15 21:33:43 2009 -0700 Further robustify nscd database lookup. We can compute an absolute maximum for the number of elements which can fit into the currently mapped database. Stop after that many iterations. (cherry picked from commit 831a40494d44045c0caaf8085ab1d35c0da23140) diff --git a/ChangeLog b/ChangeLog index a672e15..9001fb7 100644 diff --git a/nscd/nscd-client.h b/nscd/nscd-client.h index f66a658..81ca3d5 100644 --- a/nscd/nscd-client.h +++ b/nscd/nscd-client.h @@ -44,9 +44,14 @@ /* Path for the configuration file. */ #define _PATH_NSCDCONF "/etc/nscd.conf" -/* Maximu allowed length for the key. */ +/* Maximum allowed length for the key. */ #define MAXKEYLEN 1024 +/* Maximum alignment requirement we will encounter. */ +#define BLOCK_ALIGN_LOG 3 +#define BLOCK_ALIGN (1 << BLOCK_ALIGN_LOG) +#define BLOCK_ALIGN_M1 (BLOCK_ALIGN - 1) + /* Available services. */ typedef enum diff --git a/nscd/nscd.h b/nscd/nscd.h index 3279b85..632bf58 100644 --- a/nscd/nscd.h +++ b/nscd/nscd.h @@ -111,11 +111,6 @@ struct database_dyn /* Path used when not using persistent storage. */ #define _PATH_NSCD_XYZ_DB_TMP "/var/run/nscd/dbXXXXXX" -/* Maximum alignment requirement we will encounter. */ -#define BLOCK_ALIGN_LOG 3 -#define BLOCK_ALIGN (1 << BLOCK_ALIGN_LOG) -#define BLOCK_ALIGN_M1 (BLOCK_ALIGN - 1) - /* Default value for the maximum size of the database files. */ #define DEFAULT_MAX_DB_SIZE (32 * 1024 * 1024) diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c index db24796..80ee3e1 100644 --- a/nscd/nscd_helper.c +++ b/nscd/nscd_helper.c @@ -481,6 +481,7 @@ __nscd_cache_search (request_type type, const char *key, size_t keylen, ref_t trail = mapped->head->array[hash]; trail = atomic_forced_read (trail); ref_t work = trail; + size_t loop_cnt = datasize / (offsetof (struct datahead, data) + datalen); int tick = 0; while (work != ENDREF && work + sizeof (struct hashentry) <= datasize) @@ -527,7 +528,7 @@ __nscd_cache_search (request_type type, const char *key, size_t keylen, work = atomic_forced_read (here->next); /* Prevent endless loops. This should never happen but perhaps the database got corrupted, accidentally or deliberately. */ - if (work == trail) + if (work == trail || loop_cnt-- > 0) break; if (tick) { commit 223e614dafc55a14889355e95367e216d2fd320e Author: Ulrich Drepper Date: Sat May 16 10:10:32 2009 -0700 Fix exit condition. The patch to bound the search in the nscd caches used a wrong exit condition. Fixed now. (cherry picked from commit 95410b7ba23c44f6a038285d9c38ee84129e4cd6) diff --git a/ChangeLog b/ChangeLog index 9001fb7..7d55188 100644 diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c index 80ee3e1..c09f008 100644 --- a/nscd/nscd_helper.c +++ b/nscd/nscd_helper.c @@ -528,7 +528,7 @@ __nscd_cache_search (request_type type, const char *key, size_t keylen, work = atomic_forced_read (here->next); /* Prevent endless loops. This should never happen but perhaps the database got corrupted, accidentally or deliberately. */ - if (work == trail || loop_cnt-- > 0) + if (work == trail || loop_cnt-- == 0) break; if (tick) { commit e856702a047ee2cf4e7d3153d6adc8b740803770 Author: Ulrich Drepper Date: Sat May 16 10:29:43 2009 -0700 Move BLOCK_ALIGN* macros back. The move to nscd-client.h was only needed for some interim version of the patch. The final version doesn't need it. Undo the change. (cherry picked from commit fa546abe9d0346d5d87b8fe19884993408476d77) diff --git a/ChangeLog b/ChangeLog index 7d55188..eceae0b 100644 diff --git a/nscd/nscd-client.h b/nscd/nscd-client.h index 81ca3d5..c6c09cb 100644 --- a/nscd/nscd-client.h +++ b/nscd/nscd-client.h @@ -47,11 +47,6 @@ /* Maximum allowed length for the key. */ #define MAXKEYLEN 1024 -/* Maximum alignment requirement we will encounter. */ -#define BLOCK_ALIGN_LOG 3 -#define BLOCK_ALIGN (1 << BLOCK_ALIGN_LOG) -#define BLOCK_ALIGN_M1 (BLOCK_ALIGN - 1) - /* Available services. */ typedef enum diff --git a/nscd/nscd.h b/nscd/nscd.h index 632bf58..3279b85 100644 --- a/nscd/nscd.h +++ b/nscd/nscd.h @@ -111,6 +111,11 @@ struct database_dyn /* Path used when not using persistent storage. */ #define _PATH_NSCD_XYZ_DB_TMP "/var/run/nscd/dbXXXXXX" +/* Maximum alignment requirement we will encounter. */ +#define BLOCK_ALIGN_LOG 3 +#define BLOCK_ALIGN (1 << BLOCK_ALIGN_LOG) +#define BLOCK_ALIGN_M1 (BLOCK_ALIGN - 1) + /* Default value for the maximum size of the database files. */ #define DEFAULT_MAX_DB_SIZE (32 * 1024 * 1024) commit 94c11628f5d077da7ce5372019ab3af73efb67f3 Author: Ulrich Drepper Date: Sat May 16 11:39:39 2009 -0700 Unify __WAIT_INT definition in stdlib.h and sys/wait.h. This fixes BZ #10159. The stdlib.h definition was out of date. (cherry picked from commit a64039b084ae3faca3336b7d95f2e40c497d20e1) diff --git a/ChangeLog b/ChangeLog index eceae0b..772438d 100644 diff --git a/stdlib/stdlib.h b/stdlib/stdlib.h index 77bb860..5b084ef 100644 --- a/stdlib/stdlib.h +++ b/stdlib/stdlib.h @@ -48,9 +48,9 @@ __BEGIN_DECLS as well as POSIX.1 use of `int' for the status word. */ # if defined __GNUC__ && !defined __cplusplus -# define __WAIT_INT(status) \ - (__extension__ ({ union { __typeof(status) __in; int __i; } __u; \ - __u.__in = (status); __u.__i; })) +# define __WAIT_INT(status) \ + (__extension__ (((union { __typeof(status) __in; int __i; }) \ + { .__in = (status) }).__i)) # else # define __WAIT_INT(status) (*(int *) &(status)) # endif commit cd816bef9505a03a9c0cfebbedb75bbfd779c147 Author: Jakub Jelinek Date: Mon May 18 10:19:50 2009 -0700 Fix forced loop termination in nscd database lookup. There are two issues with the forced loop exit in the nscd lookup: 1. the estimate of the entry size isn't pessimistic enough for all databases, resulting potentially is too early exits 2. the combination of 64-bit process and 32-bit nscd would lead to rejecting valid records in the database. (cherry picked from commit 5078fff6c4bc1c71c5d558ff7ec4775aa48b0c11) diff --git a/ChangeLog b/ChangeLog index 772438d..356b9fb 100644 diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c index c09f008..fe63f9a 100644 --- a/nscd/nscd_helper.c +++ b/nscd/nscd_helper.c @@ -468,6 +468,15 @@ __nscd_get_map_ref (request_type type, const char *name, } +/* Using sizeof (hashentry) is not always correct to determine the size of + the data structure as found in the nscd cache. The program could be + a 64-bit process and nscd could be a 32-bit process. In this case + sizeof (hashentry) would overestimate the size. The following is + the minimum size of such an entry, good enough for our tests here. */ +#define MINIMUM_HASHENTRY_SIZE \ + (offsetof (struct hashentry, dellist) + sizeof (int32_t)) + + /* Don't return const struct datahead *, as eventhough the record is normally constant, it can change arbitrarily during nscd garbage collection. */ @@ -481,10 +490,11 @@ __nscd_cache_search (request_type type, const char *key, size_t keylen, ref_t trail = mapped->head->array[hash]; trail = atomic_forced_read (trail); ref_t work = trail; - size_t loop_cnt = datasize / (offsetof (struct datahead, data) + datalen); + size_t loop_cnt = datasize / (MINIMUM_HASHENTRY_SIZE + + offsetof (struct datahead, data) / 2); int tick = 0; - while (work != ENDREF && work + sizeof (struct hashentry) <= datasize) + while (work != ENDREF && work + MINIMUM_HASHENTRY_SIZE <= datasize) { struct hashentry *here = (struct hashentry *) (mapped->data + work); ref_t here_key, here_packet; @@ -541,7 +551,7 @@ __nscd_cache_search (request_type type, const char *key, size_t keylen, return NULL; #endif - if (trail + sizeof (struct hashentry) > datasize) + if (trail + MINIMUM_HASHENTRY_SIZE > datasize) return NULL; trail = atomic_forced_read (trailelem->next); commit 917dc587df5b051e5a13647f11e8ca824cb30cd7 Author: Jakub Jelinek Date: Thu May 21 18:15:26 2009 -0700 Correct socketcall argument for accept4. The header had the old name (paccept). (cherry picked from commit a2292378d0d629c26edfae6b197efbdb362a7094) diff --git a/ChangeLog b/ChangeLog index 356b9fb..16f3e53 100644 diff --git a/sysdeps/unix/sysv/linux/socketcall.h b/sysdeps/unix/sysv/linux/socketcall.h index 24ec9ee..adf01b6 100644 --- a/sysdeps/unix/sysv/linux/socketcall.h +++ b/sysdeps/unix/sysv/linux/socketcall.h @@ -1,5 +1,5 @@ /* ID for functions called via socketcall system call. - Copyright (C) 1995, 1996, 2008 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 2008, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -43,6 +43,6 @@ #define SOCKOP_getsockopt 15 #define SOCKOP_sendmsg 16 #define SOCKOP_recvmsg 17 -#define SOCKOP_paccept 18 +#define SOCKOP_accept4 18 #endif /* sys/socketcall.h */ commit a1223d660444de94f267d77512ea1a93a2dd9a14 Author: Jakub Jelinek Date: Thu May 21 18:16:59 2009 -0700 Remove __NR_accept4 definition. This definition was meant to be removed before the checkin. It was used in the development. (cherry picked from commit d14eda9310125ddf8fe66df01bbe46ab7d226a5e) diff --git a/ChangeLog b/ChangeLog index 16f3e53..dd4e672 100644 diff --git a/sysdeps/unix/sysv/linux/accept4.c b/sysdeps/unix/sysv/linux/accept4.c index 97f7b8c..4be710f 100644 --- a/sysdeps/unix/sysv/linux/accept4.c +++ b/sysdeps/unix/sysv/linux/accept4.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2008 Free Software Foundation, Inc. +/* Copyright (C) 2008, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 2008. @@ -24,8 +24,6 @@ #include #include -#define __NR_accept4 288 - #ifdef __NR_accept4 int commit 127bcb269a4f04f571c038c1cda8551c87a73500 Author: Ulrich Drepper Date: Thu May 21 18:23:57 2009 -0700 Don't define __ASSUME_ACCEPT4 for IA-64. (cherry picked from commit 3533b1a6a6a6b7e350b7a9459f8152b1f9f0364a) diff --git a/ChangeLog b/ChangeLog index dd4e672..c527543 100644 diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h index 473360a..4562515 100644 --- a/sysdeps/unix/sysv/linux/kernel-features.h +++ b/sysdeps/unix/sysv/linux/kernel-features.h @@ -521,7 +521,7 @@ /* Support for the accept4 syscall was added in 2.6.28. */ #if __LINUX_KERNEL_VERSION >= 0x02061c \ && (defined __i386__ || defined __x86_64__ || defined __powerpc__ \ - || defined __ia64__ || defined __sparc__ || defined __s390__) + || defined __sparc__ || defined __s390__) # define __ASSUME_ACCEPT4 1 #endif commit 5d45e59ea6c702ffbd15476e121a4feca7bc93d0 Author: Ulrich Drepper Date: Thu May 21 18:47:59 2009 -0700 Fix IA-64 memchr read-ahead. The latest stratcliff extension exposed a bug in the IA-64 memchr which uses non-speculative loads to prefetch data. Change the code to use speculative loads with appropriate fixup. Fixes BZ 10162. (cherry picked from commit fa64b7f76b97930cd2aaf7bfd305cac3d925cd8f) diff --git a/ChangeLog b/ChangeLog index c527543..6ad9ad8 100644 diff --git a/sysdeps/ia64/memchr.S b/sysdeps/ia64/memchr.S index e9a7ba8..cd062b2 100644 --- a/sysdeps/ia64/memchr.S +++ b/sysdeps/ia64/memchr.S @@ -96,7 +96,8 @@ ENTRY(__memchr) mov pr.rot = 1 << 16 ;; .l2: (p[0]) mov addr[0] = ret0 -(p[0]) ld8 value[0] = [ret0], 8 +(p[0]) ld8.s value[0] = [ret0], 8 // speculative load +(p[MEMLAT]) chk.s value[MEMLAT], .recovery // check and recovery (p[MEMLAT]) xor aux[0] = value[MEMLAT], chrx8 (p[MEMLAT+1]) czx1.r poschr[0] = aux[1] (p[MEMLAT+2]) cmp.ne p7, p0 = 8, poschr[1] @@ -124,6 +125,20 @@ ENTRY(__memchr) mov ar.lc = saved_lc br.ret.sptk.many b0 +.recovery: + adds ret0 = -((MEMLAT + 1) * 8), ret0;; +(p[MEMLAT+1]) add ret0 = -8, ret0;; +(p[MEMLAT+2]) add ret0 = -8, ret0;; +.l4: + mov addr[MEMLAT+2] = ret0 + ld8 tmp = [ret0];; // load the first unchecked 8byte + xor aux[1] = tmp, chrx8;; + czx1.r poschr[1] = aux[1];; + cmp.ne p7, p0 = 8, poschr[1] +(p7) br.cond.spnt .foundit;; + adds ret0 = 8, ret0 // load the next unchecked 8byte + br.sptk .l4;; + END(__memchr) weak_alias (__memchr, memchr) commit 297676350b6683bb5daa41cfc77c2a745383a882 Author: Andreas Schwab Date: Fri May 22 08:35:15 2009 -0700 Fix errno for IBM long double. After the last addition to the math test suite PPC routines haven't been adjusted so far. (cherry picked from commit 38ae768d88c47dd06030104eb3376212b0d8d164) diff --git a/ChangeLog b/ChangeLog index 6ad9ad8..10ac72d 100644 diff --git a/sysdeps/ieee754/ldbl-128ibm/s_cosl.c b/sysdeps/ieee754/ldbl-128ibm/s_cosl.c index 59a8196..8470850 100644 --- a/sysdeps/ieee754/ldbl-128ibm/s_cosl.c +++ b/sysdeps/ieee754/ldbl-128ibm/s_cosl.c @@ -44,6 +44,7 @@ * TRIG(x) returns trig(x) nearly rounded */ +#include #include "math.h" #include "math_private.h" #include @@ -67,9 +68,11 @@ return __kernel_cosl(x,z); /* cos(Inf or NaN) is NaN */ - else if (ix>=0x7ff0000000000000LL) + else if (ix>=0x7ff0000000000000LL) { + if (ix == 0x7ff0000000000000LL) + __set_errno (EDOM); return x-x; - + } /* argument reduction needed */ else { n = __ieee754_rem_pio2l(x,y); diff --git a/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c b/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c index 7350065..f631edd 100644 --- a/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c +++ b/sysdeps/ieee754/ldbl-128ibm/s_expm1l.c @@ -51,6 +51,7 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include "math.h" #include "math_private.h" #include @@ -120,7 +121,10 @@ __expm1l (long double x) /* Overflow. */ if (x > maxlog) - return (big * big); + { + __set_errno (ERANGE); + return (big * big); + } /* Minimum value. */ if (x < minarg) diff --git a/sysdeps/ieee754/ldbl-128ibm/s_sinl.c b/sysdeps/ieee754/ldbl-128ibm/s_sinl.c index 8cc592c..bd72225 100644 --- a/sysdeps/ieee754/ldbl-128ibm/s_sinl.c +++ b/sysdeps/ieee754/ldbl-128ibm/s_sinl.c @@ -44,6 +44,7 @@ * TRIG(x) returns trig(x) nearly rounded */ +#include #include "math.h" #include "math_private.h" #include @@ -67,8 +68,11 @@ return __kernel_sinl(x,z,0); /* sin(Inf or NaN) is NaN */ - else if (ix>=0x7ff0000000000000LL) return x-x; - + else if (ix>=0x7ff0000000000000LL) { + if (ix == 0x7ff0000000000000LL) + __set_errno (EDOM); + return x-x; + } /* argument reduction needed */ else { n = __ieee754_rem_pio2l(x,y); diff --git a/sysdeps/ieee754/ldbl-128ibm/s_tanl.c b/sysdeps/ieee754/ldbl-128ibm/s_tanl.c index ea5a7f0..913f38f 100644 --- a/sysdeps/ieee754/ldbl-128ibm/s_tanl.c +++ b/sysdeps/ieee754/ldbl-128ibm/s_tanl.c @@ -44,6 +44,7 @@ * TRIG(x) returns trig(x) nearly rounded */ +#include #include "math.h" #include "math_private.h" #include @@ -66,8 +67,11 @@ if(ix <= 0x3fe921fb54442d10LL) return __kernel_tanl(x,z,1); /* tanl(Inf or NaN) is NaN */ - else if (ix>=0x7ff0000000000000LL) return x-x; /* NaN */ - + else if (ix>=0x7ff0000000000000LL) { + if (ix == 0x7ff0000000000000LL) + __set_errno (EDOM); + return x-x; /* NaN */ + } /* argument reduction needed */ else { n = __ieee754_rem_pio2l(x,y); commit e38af591a8dd3377926543044c5ddb39b156f903 Author: Ulrich Drepper Date: Fri May 22 09:07:00 2009 -0700 Describe nss_dns parallel lookup workaround in 2.10 NEWS. (cherry picked from commit 57be3fd79a418b14e417e9a6b96f05dcb99932ee) diff --git a/NEWS b/NEWS index 411c2c3..89f06dd 100644 --- a/NEWS +++ b/NEWS @@ -47,6 +47,13 @@ Version 2.10 * Handling for group shadow files has been added. Implemented by Ulrich Drepper. +* DNS IPv4-IPv6 parallel lookup now deals better with broken DNS + servers (the case, e.g., for some people using the built-in DNS + server in ADSL modems/routers). There is a once-per-process timeout + in case of a broken server. To avoid it, users can run nscd or put + 'options single-request' in /etc/resolv.conf. + Implemented by Ulrich Drepper. + Version 2.9 commit ffbb82ecfee3854d5571683fbe4d2d5cd26c8748 Author: Aurelien Jarno Date: Wed May 27 16:41:00 2009 -0700 [BZ #10200] * db-symbols.awk: Use the last field for the symbol name instead of the 8th one. (cherry picked from commit 8ee84bd01f85b5ab1430750270b7e51a967d03eb) diff --git a/nptl_db/ChangeLog b/nptl_db/ChangeLog index 8c07d9f..1ade196 100644 diff --git a/nptl_db/db-symbols.awk b/nptl_db/db-symbols.awk index 3327213..f9a91b9 100644 --- a/nptl_db/db-symbols.awk +++ b/nptl_db/db-symbols.awk @@ -14,7 +14,7 @@ NF == 0 { in_symtab=0; next } !in_symtab { next } -NF >= 8 && $7 != "UND" { seen[$8] = 1 } +NF >= 8 && $7 != "UND" { seen[$NF] = 1 } END { status = 0; commit 6e1f9be792b03fe122dbb0984d97eb1c6b731e69 Author: Ulrich Drepper Date: Fri May 29 12:00:22 2009 -0700 Fix errno for boundary conditions in 128-bit long double. Similar to the changes which went already in for the other formats, follow POSIX rules for errno. (cherry picked from commit 7f3394bdf34e28b374e5569a7a74ddac734fb172) diff --git a/ChangeLog b/ChangeLog index 10ac72d..7f28993 100644 diff --git a/sysdeps/ieee754/ldbl-128/s_cosl.c b/sysdeps/ieee754/ldbl-128/s_cosl.c index d1258b2..ef61c3a 100644 --- a/sysdeps/ieee754/ldbl-128/s_cosl.c +++ b/sysdeps/ieee754/ldbl-128/s_cosl.c @@ -44,6 +44,7 @@ * TRIG(x) returns trig(x) nearly rounded */ +#include #include "math.h" #include "math_private.h" @@ -66,7 +67,14 @@ return __kernel_cosl(x,z); /* cos(Inf or NaN) is NaN */ - else if (ix>=0x7fff000000000000LL) return x-x; + else if (ix>=0x7fff000000000000LL) { + if (ix == 0x7fff000000000000LL) { + GET_LDOUBLE_LSW64(n,x); + if (n == 0) + __set_errno (EDOM); + } + return x-x; + } /* argument reduction needed */ else { diff --git a/sysdeps/ieee754/ldbl-128/s_expm1l.c b/sysdeps/ieee754/ldbl-128/s_expm1l.c index 78bbe65..a82489b 100644 --- a/sysdeps/ieee754/ldbl-128/s_expm1l.c +++ b/sysdeps/ieee754/ldbl-128/s_expm1l.c @@ -53,6 +53,7 @@ +#include #include "math.h" #include "math_private.h" @@ -121,7 +122,10 @@ __expm1l (long double x) /* Overflow. */ if (x > maxlog) - return (big * big); + { + __set_errno (ERANGE); + return (big * big); + } /* Minimum value. */ if (x < minarg) diff --git a/sysdeps/ieee754/ldbl-128/s_sinl.c b/sysdeps/ieee754/ldbl-128/s_sinl.c index 446a75f..dc509e7 100644 --- a/sysdeps/ieee754/ldbl-128/s_sinl.c +++ b/sysdeps/ieee754/ldbl-128/s_sinl.c @@ -44,6 +44,7 @@ * TRIG(x) returns trig(x) nearly rounded */ +#include #include "math.h" #include "math_private.h" @@ -66,7 +67,14 @@ return __kernel_sinl(x,z,0); /* sin(Inf or NaN) is NaN */ - else if (ix>=0x7fff000000000000LL) return x-x; + else if (ix>=0x7fff000000000000LL) { + if (ix == 0x7fff000000000000LL) { + GET_LDOUBLE_LSW64(n,x); + if (n == 0) + __set_errno (EDOM); + } + return x-x; + } /* argument reduction needed */ else { diff --git a/sysdeps/ieee754/ldbl-128/s_tanl.c b/sysdeps/ieee754/ldbl-128/s_tanl.c index ea9d053..2349da6 100644 --- a/sysdeps/ieee754/ldbl-128/s_tanl.c +++ b/sysdeps/ieee754/ldbl-128/s_tanl.c @@ -44,6 +44,7 @@ * TRIG(x) returns trig(x) nearly rounded */ +#include #include "math.h" #include "math_private.h" @@ -65,7 +66,14 @@ if(ix <= 0x3ffe921fb54442d1LL) return __kernel_tanl(x,z,1); /* tanl(Inf or NaN) is NaN */ - else if (ix>=0x7fff000000000000LL) return x-x; /* NaN */ + else if (ix>=0x7fff000000000000LL) { + if (ix == 0x7fff000000000000LL) { + GET_LDOUBLE_LSW64(n,x); + if (n == 0) + __set_errno (EDOM); + } + return x-x; /* NaN */ + } /* argument reduction needed */ else { commit 8eccea8011d27503c02b1dcd00aef80185e1b89a Author: Roland McGrath Date: Sat May 30 15:06:51 2009 -0700 Remove arch directory names from .gitignore. (cherry picked from commit cc3ae2461cf5ced13ab7c7787543f4dd3eabe88c) diff --git a/.gitignore b/.gitignore index d903bc6..befca38 100644 --- a/.gitignore +++ b/.gitignore @@ -23,12 +23,7 @@ glibc-* configparms -sun[43]* -i[345]86* -hp300* - ieeetest -hppa-sysdeps regex gpl2lgpl.sed commit 10bf3b765521cf6f8bc30efcfbf6f16debcbce8e Author: Andreas Schwab Date: Sun May 31 16:54:28 2009 -0700 Move AC_CANONICAL_HOST before first use of $host and $build. (cherry picked from commit c16a054d5e20e4da6ccc528b690910a777d69a8b) diff --git a/ChangeLog b/ChangeLog index 7f28993..6d9cc29 100644 diff --git a/configure b/configure index 7555891..88cf4fd 100755 --- a/configure +++ b/configure @@ -726,14 +726,6 @@ base_machine add_on_subdirs add_ons subdirs -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build libc_cv_nss_crypt experimental_malloc multi_arch @@ -756,6 +748,14 @@ CPPFLAGS LDFLAGS CFLAGS CC +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build target_alias host_alias build_alias @@ -2011,6 +2011,90 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} + { (exit 1); exit 1; }; } + +{ $as_echo "$as_me:$LINENO: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if test "${ac_cv_build+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +$as_echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:$LINENO: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if test "${ac_cv_host+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +$as_echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3844,90 +3928,6 @@ else fi -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} - { (exit 1); exit 1; }; } - -{ $as_echo "$as_me:$LINENO: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -$as_echo "$as_me: error: invalid value of canonical build" >&2;} - { (exit 1); exit 1; }; };; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:$LINENO: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} - { (exit 1); exit 1; }; } -fi - -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -$as_echo "$as_me: error: invalid value of canonical host" >&2;} - { (exit 1); exit 1; }; };; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - - # The way shlib-versions is used to generate soversions.mk uses a # fairly simplistic model for name recognition that can't distinguish # i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os diff --git a/configure.in b/configure.in index d54e952..6a92bd8 100644 --- a/configure.in +++ b/configure.in @@ -6,6 +6,8 @@ AC_CONFIG_SRCDIR([include/features.h]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_AUX_DIR([scripts]) +AC_CANONICAL_HOST + AC_PROG_CC if test $host != $build; then AC_CHECK_PROGS(BUILD_CC, gcc cc) @@ -316,8 +318,6 @@ else fi AC_SUBST(libc_cv_nss_crypt) -AC_CANONICAL_HOST - # The way shlib-versions is used to generate soversions.mk uses a # fairly simplistic model for name recognition that can't distinguish # i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a $host_os commit a447f6830f9f2a9543247790b1f9b90a465e6079 Author: Ulrich Drepper Date: Sun May 31 17:46:55 2009 -0700 Add missing file from accept4 commit. Hidden by previous .gitignore content. (cherry picked from commit fd469aac31dc09f1328c8c4b976f887ebd592c56) diff --git a/sysdeps/unix/sysv/linux/i386/internal_accept4.S b/sysdeps/unix/sysv/linux/i386/internal_accept4.S new file mode 100644 index 0000000..c3f1630 --- /dev/null +++ b/sysdeps/unix/sysv/linux/i386/internal_accept4.S @@ -0,0 +1 @@ +/* Not needed, accept4.S has everything. */ commit 1e639628d118eb75a2e0de99debbba6e949cdbae Author: André Goddard Rosa Date: Mon Jun 1 11:43:26 2009 -0700 Fix mbrtowc example. The remaining bytes were not copied correctly. (cherry picked from commit 21e66bc528edcbe18d434eb33a601e0f796904c9) diff --git a/manual/charset.texi b/manual/charset.texi index 8b2c09c..79854e5 100644 --- a/manual/charset.texi +++ b/manual/charset.texi @@ -1234,7 +1234,7 @@ file_mbsrtowcs (int input, int output) /* @r{If any characters must be carried forward,} @r{put them at the beginning of @code{buffer}.} */ if (filled > 0) - memmove (inp, buffer, filled); + memmove (buffer, inp, filled); @} return 1; commit e926cb177490407dfea3fc6c181a272b7b8a2a20 Author: Ulrich Drepper Date: Wed Jun 3 08:30:35 2009 -0700 Terminate correct buffer. Little typo could cause additional characters to be printed. (cherry picked from commit fbb04b35e7997070feec74e0fd46953faef71f9e) diff --git a/ChangeLog b/ChangeLog index 6d9cc29..1211e1d 100644 diff --git a/elf/dl-sysdep.c b/elf/dl-sysdep.c index db10012..5700272 100644 --- a/elf/dl-sysdep.c +++ b/elf/dl-sysdep.c @@ -335,7 +335,7 @@ _dl_show_auxv (void) /* Unknown value: print a generic line. */ char buf2[17]; - buf[sizeof (buf2) - 1] = '\0'; + buf2[sizeof (buf2) - 1] = '\0'; const char *val2 = _itoa ((unsigned long int) av->a_un.a_val, buf2 + sizeof buf2 - 1, 16, 0); const char *val = _itoa ((unsigned long int) av->a_type, commit e40d82c4ee736936290827c8297c2c58e2181932 Author: Ulrich Drepper Date: Tue Jun 9 06:59:02 2009 -0700 (_IO_new_file_fopen): Don't prematurely stop parsing mode string. (cherry picked from commits 0d74e0436195a051d69e78bef10d23879788cb7e, d360a0da2b42b2b79e9ce9c2d7984c234e840b7a) diff --git a/ChangeLog b/ChangeLog index 1211e1d..3063dc8 100644 diff --git a/libio/fileops.c b/libio/fileops.c index cf47c91..4698953 100644 --- a/libio/fileops.c +++ b/libio/fileops.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1997-2005, 2006, 2007, 2008 +/* Copyright (C) 1993, 1995, 1997-2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Per Bothner . @@ -319,11 +319,11 @@ _IO_new_file_fopen (fp, filename, mode, is32not64) continue; case 'c': fp->_flags2 |= _IO_FLAGS2_NOTCANCEL; - break; + continue; #ifdef O_CLOEXEC case 'e': oflags |= O_CLOEXEC; - break; + continue; #endif default: /* Ignore. */ commit ac37d9836e2967b9d5cd5b260910db53fbab1858 Author: J.H.M. Dassen Date: Tue Jun 9 07:58:02 2009 -0700 Remove comma at end of enum. (cherry picked from commit 88ea382fda5af7717f85bb19837c9c99094f3df4) diff --git a/ChangeLog b/ChangeLog index 3063dc8..c6c3553 100644 diff --git a/dlfcn/dlfcn.h b/dlfcn/dlfcn.h index 7e373ed..3e461df 100644 --- a/dlfcn/dlfcn.h +++ b/dlfcn/dlfcn.h @@ -1,6 +1,5 @@ /* User functions for run-time dynamic loading. - Copyright (C) 1995-1999,2000,2001,2003,2004,2006 - Free Software Foundation, Inc. + Copyright (C) 1995-2001,2003,2004,2006,2009 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -164,7 +163,7 @@ enum segment, or if the calling thread has not allocated a block for it. */ RTLD_DI_TLS_DATA = 10, - RTLD_DI_MAX = 10, + RTLD_DI_MAX = 10 }; commit 53f32b044fff54341c426a9ba16753b881d32f91 Author: Ulrich Drepper Date: Thu Jun 11 10:07:33 2009 -0700 Remember we switched to single-request mode. This change prevents repetition in most later calls of the resolver in case the DNS server or the network connection is broken. (cherry picked from commit 310647e9809986986650994d036af18ca9b17fb2) diff --git a/ChangeLog b/ChangeLog index c6c3553..ecf7c10 100644 diff --git a/resolv/res_send.c b/resolv/res_send.c index 25a854f..39c69da 100644 --- a/resolv/res_send.c +++ b/resolv/res_send.c @@ -1008,7 +1008,7 @@ send_dg(res_state statp, seconds /= statp->nscount; if (seconds <= 0) seconds = 1; - bool single_request = ((statp->options) & RES_SNGLKUP) != 0;// XXX + bool single_request = (statp->options & RES_SNGLKUP) != 0;// XXX int save_gotsomewhere = *gotsomewhere; retry: evNowTime(&now); @@ -1059,6 +1059,7 @@ send_dg(res_state statp, have received the first answer. */ if (!single_request) { + statp->options |= RES_SNGLKUP; single_request = true; *gotsomewhere = save_gotsomewhere; goto retry; commit 9cf557216cbd0fe6e5ca235114c27260622d049b Author: Bryan Kadzban Date: Thu Jun 11 11:32:51 2009 -0700 Fix futex syscall parameter for x86 absolute timeout waits. This affects only installations compiled for kernels older than 2.6.18. (cherry picked from commit 1828530f09bcc321cfb84c27110bbce804605ec4) diff --git a/nptl/ChangeLog b/nptl/ChangeLog index f3bd32f..d97efa0 100644 diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S index 056b729..7578c7e 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S @@ -60,7 +60,7 @@ # define LOAD_FUTEX_WAIT_ABS(reg) \ xorl $FUTEX_PRIVATE_FLAG, reg ; \ andl %gs:PRIVATE_FUTEX, reg ; \ - orl $FUTEX_WAIT | FUTEX_CLOCK_REALTIME, reg + orl $FUTEX_WAIT_BITSET | FUTEX_CLOCK_REALTIME, reg # define LOAD_FUTEX_WAKE(reg) \ xorl $FUTEX_PRIVATE_FLAG, reg ; \ andl %gs:PRIVATE_FUTEX, reg ; \ commit 0f1ea04f8ab3ad481089fd705f4bda2df0fd8078 Author: Akinori Hattori Date: Mon Jun 15 10:54:26 2009 -0700 Handle leap seconds even if no DST rule exists. This fixes BZ #10211. (cherry picked from commit 29143408ae6d474a115768e809691635f507b1fd) diff --git a/ChangeLog b/ChangeLog index ecf7c10..b79f020 100644 diff --git a/time/tzfile.c b/time/tzfile.c index 9700223..4e20b25 100644 --- a/time/tzfile.c +++ b/time/tzfile.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1993,1995-2001,2003,2004,2006, 2007 +/* Copyright (C) 1991-1993,1995-2001,2003,2004,2006,2007,2009 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -659,9 +659,7 @@ __tzfile_compute (time_t timer, int use_localtime, __tzname[1] = __tzstring (&zone_names[strlen (zone_names) + 1]); } - *leap_correct = 0L; - *leap_hit = 0; - return; + goto leap; } else { @@ -762,6 +760,7 @@ __tzfile_compute (time_t timer, int use_localtime, tp->tm_gmtoff = info->offset; } + leap: *leap_correct = 0L; *leap_hit = 0; commit e80cfa694185fc970ca3804660a903b28173cd52 Author: Ulrich Drepper Date: Mon Jun 15 11:00:08 2009 -0700 Fix computation of tzspec_len. Without this it should never have worked that we can use the embedded envvar in the timezone data files for dates after the last matching rule. (cherry picked from commit 6355c99740c91ed5a7fa14e378f74950e09f5f48) diff --git a/ChangeLog b/ChangeLog index b79f020..c77ed82 100644 diff --git a/time/tzfile.c b/time/tzfile.c index 4e20b25..d8bd55a 100644 --- a/time/tzfile.c +++ b/time/tzfile.c @@ -248,7 +248,7 @@ __tzfile_read (const char *file, size_t extra, char **extrap) + num_transitions * (8 + 1) + num_types * 6 + chars - + num_leaps * 8 + + num_leaps * 12 + num_isstd + num_isgmt) - 1 : 0); commit 4da50f4b075b4ed9c75f072e1e26deee720fb8bf Author: Bruce Dubbs Date: Mon Jun 15 17:27:48 2009 -0700 (do_test): Use de_DE.UTF-8 as locale name. (cherry picked from commit 4155d926336ba38428a98359bf0908453ff83625) diff --git a/ChangeLog b/ChangeLog index c77ed82..f7ac9ec 100644 diff --git a/libio/tst-fgetwc.c b/libio/tst-fgetwc.c index 9ccfeb1..06e4a42 100644 --- a/libio/tst-fgetwc.c +++ b/libio/tst-fgetwc.c @@ -6,7 +6,7 @@ static int do_test (void) { - if (setlocale (LC_ALL, "de_DE.utf8") == NULL) + if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL) { puts ("setlocale failed"); return 1; commit 26330c1c489a2cb2ea775390c9a7a6302954f64c Author: Joe Landers Date: Mon Jun 15 17:37:40 2009 -0700 Fix memory leak when batch-reading large NIS password maps. Not the whole was traversed in the function to free all buffers. BZ #10203 (cherry picked from commit 233a182b9ee2a48eddbb15f70af8bc24add24af3) diff --git a/ChangeLog b/ChangeLog index f7ac9ec..c999607 100644 diff --git a/nis/nss_nis/nis-pwd.c b/nis/nss_nis/nis-pwd.c index 1b5206a..fdc7dc9 100644 --- a/nis/nss_nis/nis-pwd.c +++ b/nis/nss_nis/nis-pwd.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-1998,2001,2002,2003,2006 Free Software Foundation, Inc. +/* Copyright (C) 1996-1998,2001-2003,2006,2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1996. @@ -116,7 +116,7 @@ internal_nis_endpwent (void) oldkeylen = 0; } - struct response_t *curr = intern.next; + struct response_t *curr = intern.start; while (curr != NULL) { commit 3ff6565150bef32e4cfc565b1463df84dd8c6d7a Author: Arnaud Ebalard Date: Mon Jun 15 20:33:39 2009 -0700 Fix type of nd_opt_home_agent_info_preference. (cherry picked from commit 7ed520bd8504700cf4aaf3b06deb10575bfc546a) diff --git a/ChangeLog b/ChangeLog index c999607..d0912cc 100644 diff --git a/inet/netinet/icmp6.h b/inet/netinet/icmp6.h index 0cb1aa6..82893da 100644 --- a/inet/netinet/icmp6.h +++ b/inet/netinet/icmp6.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1997,2000,2006 Free Software Foundation, Inc. +/* Copyright (C) 1991-1997,2000,2006,2009 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -339,7 +339,7 @@ struct nd_opt_home_agent_info uint8_t nd_opt_home_agent_info_type; uint8_t nd_opt_home_agent_info_len; uint16_t nd_opt_home_agent_info_reserved; - int16_t nd_opt_home_agent_info_preference; + uint16_t nd_opt_home_agent_info_preference; uint16_t nd_opt_home_agent_info_lifetime; }; commit 2a31410e40b61c47ab4c5283c25cea2c5405d757 Author: Ulrich Drepper Date: Mon Jun 15 21:12:57 2009 -0700 When iterating over CPU bitmask, don't try more than CPU_SETSIZE. (cherry picked from commit 395a37e379bf900b2b6a25e17c44cde2d1c46c44) diff --git a/ChangeLog b/ChangeLog index d0912cc..b1ba145 100644 diff --git a/posix/tst-cpucount.c b/posix/tst-cpucount.c index fe3cded..b3691a1 100644 --- a/posix/tst-cpucount.c +++ b/posix/tst-cpucount.c @@ -1,5 +1,6 @@ #include #include +#include static int do_test (void) @@ -8,7 +9,7 @@ do_test (void) CPU_ZERO (&c); - for (int cnt = 0; cnt < 130; ++cnt) + for (int cnt = 0; cnt < MIN (CPU_SETSIZE, 130); ++cnt) { int n = CPU_COUNT (&c); if (n != cnt) commit c8bfc696298620bc1199996f5d836ce837248b0b Author: Ulrich Drepper Date: Mon Jun 15 22:56:51 2009 -0700 Fix permission of slave device on devpts if necessary. If devptr is misconfigured the slave device permission after grantpt might not be 0620. BZ #10166 (cherry picked from commit 292e3abebff9f94ca47c1a725a691cb6ed6cff5f) diff --git a/ChangeLog b/ChangeLog index b1ba145..7bec39a 100644 diff --git a/sysdeps/unix/sysv/linux/grantpt.c b/sysdeps/unix/sysv/linux/grantpt.c index b894b8b..c858f89 100644 --- a/sysdeps/unix/sysv/linux/grantpt.c +++ b/sysdeps/unix/sysv/linux/grantpt.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998, 1999, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2001, 2002, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -70,9 +70,16 @@ grantpt (int fd) return -1; /* If the slave pseudo terminal lives on a `devpts' filesystem, the - ownership and access permission are already set. */ + ownership is already set and the access permission might already + be set. */ if (fsbuf.f_type == DEVPTS_SUPER_MAGIC || fsbuf.f_type == DEVFS_SUPER_MAGIC) - return 0; + { + struct stat64 st; + + if (fstat (fd, &st) == 0 + && (st.st_mode & ACCESSPERMS) == (S_IRUSR|S_IWUSR|S_IWGRP)) + return 0; + } return __unix_grantpt (fd); } commit c9dab1b7acf11a334c9494eca160ad841b5f05e2 Author: Ulrich Drepper Date: Tue Jun 16 07:48:27 2009 -0700 Run tst-fgetwc with necessary envvar. (cherry picked from commit eae3208e249edda25548fa7680d01193d7515e0c) diff --git a/ChangeLog b/ChangeLog index 7bec39a..e6f4565 100644 diff --git a/libio/Makefile b/libio/Makefile index b94d047..501e80c 100644 --- a/libio/Makefile +++ b/libio/Makefile @@ -153,6 +153,7 @@ tst-ungetwc2-ENV = LOCPATH=$(common-objpfx)localedata bug-ungetwc2-ENV = LOCPATH=$(common-objpfx)localedata tst-swscanf-ENV = LOCPATH=$(common-objpfx)localedata bug-ftell-ENV = LOCPATH=$(common-objpfx)localedata +tst-fgetwc-ENV = LOCPATH=$(common-objpfx)localedata generated = tst-fopenloc.mtrace tst-fopenloc.check commit 1f3ae5ae370802ab2bd4f4fc15acd09f381bfa52 Author: Ulrich Drepper Date: Tue Jun 16 08:25:01 2009 -0700 Define week, first_weekday, first_workday in de_AT locale. BZ #10011 (cherry picked from commit b23964c6207124341b89cefc316dc512a669c17b) diff --git a/localedata/ChangeLog b/localedata/ChangeLog index b3db076..fbe5bc6 100644 diff --git a/localedata/locales/de_AT b/localedata/locales/de_AT index 4ec42f4..4e0b7fb 100644 --- a/localedata/locales/de_AT +++ b/localedata/locales/de_AT @@ -121,6 +121,9 @@ t_fmt_ampm "" date_fmt "/ / " +week 7;19971130;4 +first_weekday 2 +first_workday 2 END LC_TIME LC_PAPER commit 626b1576643ecb869c1a685a7dc59e5df09bbf1d Author: Ryan S. Arnold Date: Tue Jun 16 08:29:04 2009 -0700 Fix incorrect use of cmpldi in 32-bit PPC code. The 32-bit PowerPC POWER6 memcpy uses the cmpldi insn when it should use a cmplwi. BZ #10107 (cherry picked from commit 25bfbb9e0e610afaf6b67e5ee1a1a5338018c42e) diff --git a/ChangeLog b/ChangeLog index e6f4565..7b39200 100644 diff --git a/sysdeps/powerpc/powerpc32/power6/memcpy.S b/sysdeps/powerpc/powerpc32/power6/memcpy.S index ba45fd2..156b0bd 100644 --- a/sysdeps/powerpc/powerpc32/power6/memcpy.S +++ b/sysdeps/powerpc/powerpc32/power6/memcpy.S @@ -1,5 +1,5 @@ /* Optimized memcpy implementation for PowerPC32 on POWER6. - Copyright (C) 2003, 2006 Free Software Foundation, Inc. + Copyright (C) 2003, 2006, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -25,9 +25,9 @@ Returns 'dst'. Memcpy handles short copies (< 32-bytes) using a binary move blocks - (no loops) of lwz/stw. The tail (remaining 1-3) bytes is handled - with the appropriate combination of byte and halfword load/stores. - There is minimal effort to optimize the alignment of short moves. + (no loops) of lwz/stw. The tail (remaining 1-3) bytes is handled + with the appropriate combination of byte and halfword load/stores. + There is minimal effort to optimize the alignment of short moves. Longer moves (>= 32-bytes) justify the effort to get at least the destination word (4-byte) aligned. Further optimization is @@ -80,11 +80,11 @@ EALIGN (BP_SYM (memcpy), 5, 0) bne- cr6,L(wdu) /* If source is not word aligned. .L6 */ clrlwi 11,31,30 /* calculate the number of tail bytes */ b L(word_aligned) - /* Copy words from source to destination, assuming the destination is + /* Copy words from source to destination, assuming the destination is aligned on a word boundary. At this point we know there are at least 29 bytes left (32-3) to copy. - The next step is to determine if the source is also word aligned. + The next step is to determine if the source is also word aligned. If not branch to the unaligned move code at .L6. which uses a load, shift, store strategy. @@ -100,9 +100,9 @@ EALIGN (BP_SYM (memcpy), 5, 0) /* Move words where destination and source are word aligned. Use an unrolled loop to copy 4 words (16-bytes) per iteration. - If the the copy is not an exact multiple of 16 bytes, 1-3 + If the the copy is not an exact multiple of 16 bytes, 1-3 words are copied as needed to set up the main loop. After - the main loop exits there may be a tail of 1-3 bytes. These bytes are + the main loop exits there may be a tail of 1-3 bytes. These bytes are copied a halfword/byte at a time as needed to preserve alignment. */ L(word_aligned): mtcrf 0x01,9 @@ -121,7 +121,7 @@ L(word_aligned): addi 10,3,8 bf 31,4f lwz 0,8(12) - stw 0,8(3) + stw 0,8(3) blt cr1,3f addi 11,12,12 addi 10,3,12 @@ -135,7 +135,7 @@ L(word_aligned): addi 11,12,4 stw 6,0(3) addi 10,3,4 - + .align 4 4: lwz 6,0(11) @@ -149,14 +149,14 @@ L(word_aligned): addi 11,11,16 addi 10,10,16 bdnz 4b -3: +3: clrrwi 0,31,2 mtcrf 0x01,31 beq cr6,0f .L9: add 3,3,0 add 12,12,0 - + /* At this point we have a tail of 0-3 bytes and we know that the destination is word aligned. */ 2: bf 30,1f @@ -175,7 +175,7 @@ L(word_aligned): addi 1,1,32 blr -/* Copy up to 31 bytes. This divided into two cases 0-8 bytes and 9-31 +/* Copy up to 31 bytes. This divided into two cases 0-8 bytes and 9-31 bytes. Each case is handled without loops, using binary (1,2,4,8) tests. @@ -208,7 +208,7 @@ L(word_unaligned_short): andi. 0,8,3 beq cr6,L(wus_8) /* Handle moves of 8 bytes. */ /* At least 9 bytes left. Get the source word aligned. */ - cmpldi cr1,5,16 + cmplwi cr1,5,16 mr 12,4 ble cr6,L(wus_4) /* Handle moves of 0-8 bytes. */ mr 11,3 @@ -241,7 +241,7 @@ L(wus_tail): /* At least 6 bytes left and the source is word aligned. This allows some speculative loads up front. */ /* We need to special case the fall-through because the biggest delays - are due to address computation not being ready in time for the + are due to address computation not being ready in time for the AGEN. */ lwz 6,0(12) lwz 7,4(12) @@ -336,7 +336,7 @@ L(wus_tail4): /* Move 4 bytes. */ L(wus_tail2): /* Move 2-3 bytes. */ bf 30,L(wus_tail1) lhz 6,0(12) - sth 6,0(11) + sth 6,0(11) bf 31,L(wus_tailX) lbz 7,2(12) stb 7,2(11) @@ -368,7 +368,7 @@ L(wus_4): stw 6,0(3) bf 30,L(wus_5) lhz 7,4(4) - sth 7,4(3) + sth 7,4(3) bf 31,L(wus_0) lbz 8,6(4) stb 8,6(3) @@ -386,7 +386,7 @@ L(wus_5): L(wus_2): /* Move 2-3 bytes. */ bf 30,L(wus_1) lhz 6,0(4) - sth 6,0(3) + sth 6,0(3) bf 31,L(wus_0) lbz 7,2(4) stb 7,2(3) @@ -410,13 +410,13 @@ L(wdu): /* Copy words where the destination is aligned but the source is not. For power4, power5 and power6 machines there is penalty for - unaligned loads (src) that cross 32-byte, cacheline, or page + unaligned loads (src) that cross 32-byte, cacheline, or page boundaries. So we want to use simple (unaligned) loads where posible but avoid them where we know the load would span a 32-byte - boundary. + boundary. At this point we know we have at least 29 (32-3) bytes to copy - the src is unaligned. and we may cross at least one 32-byte + the src is unaligned. and we may cross at least one 32-byte boundary. Also we have the following regester values: r3 == adjusted dst, word aligned r4 == unadjusted src @@ -427,7 +427,7 @@ L(wdu): r31 == adjusted len First we need to copy word upto but not crossing the next 32-byte - boundary. Then perform aligned loads just before and just after + boundary. Then perform aligned loads just before and just after the boundary and use shifts and or to gernerate the next aligned word for dst. If more then 32 bytes remain we copy (unaligned src) the next 7 words and repeat the loop until less then 32-bytes @@ -442,7 +442,7 @@ L(wdu): mr 4,12 /* restore unaligned adjusted src ptr */ clrlwi 0,12,27 /* Find dist from previous 32-byte boundary. */ slwi 10,10,3 /* calculate number of bits to shift 1st word left */ - cmplwi cr5,0,16 + cmplwi cr5,0,16 subfic 8,0,32 /* Number of bytes to next 32-byte boundary. */ mtcrf 0x01,8 @@ -532,7 +532,7 @@ L(wdu_32): lwz 6,0(12) cmplwi cr6,31,4 srwi 8,31,5 /* calculate the 32 byte loop count */ - slw 0,6,10 + slw 0,6,10 clrlwi 31,31,27 /* The remaining bytes, < 32. */ blt cr5,L(wdu_32tail) mtctr 8 @@ -543,7 +543,7 @@ L(wdu_loop32): lwz 8,4(12) addi 12,12,32 lwz 7,4(4) - srw 8,8,9 + srw 8,8,9 or 0,0,8 stw 0,0(3) stw 7,4(3) @@ -562,7 +562,7 @@ L(wdu_loop32): stw 6,24(3) stw 7,28(3) addi 3,3,32 - slw 0,8,10 + slw 0,8,10 bdnz+ L(wdu_loop32) L(wdu_32tail): @@ -571,7 +571,7 @@ L(wdu_32tail): blt cr6,L(wdu_4tail) /* calculate and store the final word */ lwz 8,4(12) - srw 8,8,9 + srw 8,8,9 or 6,0,8 b L(wdu_32tailx) #endif @@ -816,7 +816,7 @@ L(wdu_4tail): beq cr6,L(wdus_0) /* If the tail is 0 bytes we are done! */ bf 30,L(wdus_3) lhz 7,0(4) - sth 7,0(3) + sth 7,0(3) bf 31,L(wdus_0) lbz 8,2(4) stb 8,2(3) diff --git a/sysdeps/powerpc/powerpc32/power6/memset.S b/sysdeps/powerpc/powerpc32/power6/memset.S index 10fb7b9..cc65b7b 100644 --- a/sysdeps/powerpc/powerpc32/power6/memset.S +++ b/sysdeps/powerpc/powerpc32/power6/memset.S @@ -1,5 +1,5 @@ /* Optimized 32-bit memset implementation for POWER6. - Copyright (C) 1997,99, 2000,02,03,06,2007 Free Software Foundation, Inc. + Copyright (C) 1997,99,2000,02,03,06,2007,2009 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -240,7 +240,7 @@ L(nzCacheAligned256): cmplwi cr1,rLEN,256 addi rMEMP3,rMEMP,64 #ifdef NOT_IN_libc -/* When we are not in libc we should use only GPRs to avoid the FPU lock +/* When we are not in libc we should use only GPRs to avoid the FPU lock interrupt. */ stw rCHR,0(rMEMP) stw rCHR,4(rMEMP) @@ -381,7 +381,7 @@ L(cacheAligned): blt cr1,L(cacheAligned1) li rMEMP2,128 L(cacheAlignedx): - cmpldi cr5,rLEN,640 + cmplwi cr5,rLEN,640 blt cr6,L(cacheAligned128) bgt cr5,L(cacheAligned512) cmplwi cr6,rLEN,512 commit d0f6ed789f460357fca11f8ffcffcb968d8d7434 Author: Jakub Jelinek Date: Tue Jun 16 10:23:31 2009 -0700 Fix x86-64 memchr for large lengths. (cherry picked from commit fab8238de69de67637d21923b3ec1c26e4ce8450) diff --git a/ChangeLog b/ChangeLog index 7b39200..b3808c5 100644 diff --git a/string/test-memchr.c b/string/test-memchr.c index c233ead..cd9a01e 100644 --- a/string/test-memchr.c +++ b/string/test-memchr.c @@ -1,5 +1,5 @@ /* Test and measure memchr functions. - Copyright (C) 1999, 2002, 2003, 2005 Free Software Foundation, Inc. + Copyright (C) 1999, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Jakub Jelinek , 1999. @@ -144,7 +144,12 @@ do_random_tests (void) } if (pos < len) - result = (char *) (p + pos + align); + { + size_t r = random (); + if ((r & 31) == 0) + len = ~(uintptr_t) (p + align) - ((r >> 5) & 31); + result = (char *) (p + pos + align); + } else result = NULL; diff --git a/sysdeps/x86_64/memchr.S b/sysdeps/x86_64/memchr.S index 54b7af5..6082aa7 100644 --- a/sysdeps/x86_64/memchr.S +++ b/sysdeps/x86_64/memchr.S @@ -41,7 +41,7 @@ ENTRY (memchr) movl $16, %esi jnz 1f cmpq %rsi, %rdx - jle 3f + jbe 3f 2: movdqa (%rdi,%rsi), %xmm0 leaq 16(%rsi), %rsi @@ -50,7 +50,7 @@ ENTRY (memchr) testl %ecx, %ecx jnz 1f cmpq %rsi, %rdx - jg 2b + ja 2b 3: xorl %eax, %eax ret @@ -60,7 +60,7 @@ ENTRY (memchr) addq %rcx, %rax leaq -16(%rsi,%rcx), %rsi cmpq %rsi, %rdx - jle 3b + jbe 3b ret END (memchr) commit 137028b4d7e50f71906c1656c27079eac5a1d085 Author: Petr Baudis Date: Thu Jul 16 10:10:10 2009 -0700 Fix lock handling in memory hander of nscd. The commit 20e498bd removes the pthread_mutex_rdlock() calls, but not the corresponding pthread_mutex_unlock() calls. Also, the database lock is never unlocked in one branch of the mempool_alloc() if. I think unreproducible random assert(dh->usable) crashes in prune_cache() were caused by this. But an easy way to make nscd threads hang with the broken locking was. diff --git a/ChangeLog b/ChangeLog index a81c5b4..37f20a4 100644 diff --git a/nscd/aicache.c b/nscd/aicache.c index 524c0a6..8dac48e 100644 --- a/nscd/aicache.c +++ b/nscd/aicache.c @@ -543,8 +543,6 @@ next_nip: (void) cache_add (req->type, key_copy, req->key_len, &dataset->head, true, db, uid, he == NULL); - pthread_rwlock_unlock (&db->lock); - /* Mark the old entry as obsolete. */ if (dh != NULL) dh->usable = false; diff --git a/nscd/grpcache.c b/nscd/grpcache.c index 184d538..fc20084 100644 --- a/nscd/grpcache.c +++ b/nscd/grpcache.c @@ -146,8 +146,6 @@ cache_addgr (struct database_dyn *db, int fd, request_header *req, (void) cache_add (req->type, &dataset->strdata, req->key_len, &dataset->head, true, db, owner, he == NULL); - pthread_rwlock_unlock (&db->lock); - /* Mark the old entry as obsolete. */ if (dh != NULL) dh->usable = false; @@ -367,12 +365,10 @@ cache_addgr (struct database_dyn *db, int fd, request_header *req, (void) cache_add (GETGRBYGID, cp, key_offset, &dataset->head, false, db, owner, false); } - - out: - pthread_rwlock_unlock (&db->lock); } } +out: if (__builtin_expect (written != total, 0) && debug_level > 0) { char buf[256]; diff --git a/nscd/hstcache.c b/nscd/hstcache.c index 51e2273..77ffcdf 100644 --- a/nscd/hstcache.c +++ b/nscd/hstcache.c @@ -153,8 +153,6 @@ cache_addhst (struct database_dyn *db, int fd, request_header *req, (void) cache_add (req->type, &dataset->strdata, req->key_len, &dataset->head, true, db, owner, he == NULL); - pthread_rwlock_unlock (&db->lock); - /* Mark the old entry as obsolete. */ if (dh != NULL) dh->usable = false; @@ -404,8 +402,6 @@ cache_addhst (struct database_dyn *db, int fd, request_header *req, (void) cache_add (req->type, key_copy, req->key_len, &dataset->head, true, db, owner, he == NULL); - - pthread_rwlock_unlock (&db->lock); } } diff --git a/nscd/initgrcache.c b/nscd/initgrcache.c index c33aaf3..f8d4742 100644 --- a/nscd/initgrcache.c +++ b/nscd/initgrcache.c @@ -230,8 +230,6 @@ addinitgroupsX (struct database_dyn *db, int fd, request_header *req, (void) cache_add (req->type, key_copy, req->key_len, &dataset->head, true, db, uid, he == NULL); - pthread_rwlock_unlock (&db->lock); - /* Mark the old entry as obsolete. */ if (dh != NULL) dh->usable = false; @@ -388,8 +386,6 @@ addinitgroupsX (struct database_dyn *db, int fd, request_header *req, (void) cache_add (INITGROUPS, cp, req->key_len, &dataset->head, true, db, uid, he == NULL); - - pthread_rwlock_unlock (&db->lock); } } diff --git a/nscd/mem.c b/nscd/mem.c index fcea6db..80ea951 100644 --- a/nscd/mem.c +++ b/nscd/mem.c @@ -566,9 +566,6 @@ mempool_alloc (struct database_dyn *db, size_t len, int data_alloc) } } - if (data_alloc) - pthread_rwlock_unlock (&db->lock); - if (! db->last_alloc_failed) { dbg_log (_("no more memory for database '%s'"), dbnames[db - dbs]); @@ -591,5 +588,8 @@ mempool_alloc (struct database_dyn *db, size_t len, int data_alloc) pthread_mutex_unlock (&db->memlock); + if (data_alloc) + pthread_rwlock_unlock (&db->lock); + return res; } diff --git a/nscd/pwdcache.c b/nscd/pwdcache.c index 2338e7e..fc5b44e 100644 --- a/nscd/pwdcache.c +++ b/nscd/pwdcache.c @@ -153,8 +153,6 @@ cache_addpw (struct database_dyn *db, int fd, request_header *req, (void) cache_add (req->type, key_copy, req->key_len, &dataset->head, true, db, owner, he == NULL); - pthread_rwlock_unlock (&db->lock); - /* Mark the old entry as obsolete. */ if (dh != NULL) dh->usable = false; @@ -362,12 +360,10 @@ cache_addpw (struct database_dyn *db, int fd, request_header *req, (void) cache_add (GETPWBYUID, cp, key_offset, &dataset->head, false, db, owner, false); } - - out: - pthread_rwlock_unlock (&db->lock); } } +out: if (__builtin_expect (written != total, 0) && debug_level > 0) { char buf[256]; diff --git a/nscd/servicescache.c b/nscd/servicescache.c index dc98d30..c965c97 100644 --- a/nscd/servicescache.c +++ b/nscd/servicescache.c @@ -136,8 +136,6 @@ cache_addserv (struct database_dyn *db, int fd, request_header *req, (void) cache_add (req->type, &dataset->strdata, req->key_len, &dataset->head, true, db, owner, he == NULL); - pthread_rwlock_unlock (&db->lock); - /* Mark the old entry as obsolete. */ if (dh != NULL) dh->usable = false; @@ -317,8 +315,6 @@ cache_addserv (struct database_dyn *db, int fd, request_header *req, (void) cache_add (req->type, key_copy, req->key_len, &dataset->head, true, db, owner, he == NULL); - - pthread_rwlock_unlock (&db->lock); } } commit 6cbbaa50aac809ad6e0692247876c82d58e466bf Author: Ulrich Drepper Date: Thu Jul 2 03:30:55 2009 -0700 Fix possible race when freeing object in fast bin list. diff --git a/ChangeLog b/ChangeLog index 0c6c36f..4700e7d 100644 diff --git a/malloc/malloc.c b/malloc/malloc.c index 516d401..70e4e58 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -4822,6 +4822,7 @@ _int_free(mstate av, mchunkptr p) goto errout; } p->fd = fd = old; + atomic_full_barrier (); } while ((old = catomic_compare_and_exchange_val_acq (fb, p, fd)) != fd); #else commit bec466d922ee22b94ac0d00415fb605e136efe6e Author: Ulrich Drepper Date: Thu Jul 16 09:54:34 2009 -0700 Fix race in corruption check. With atomic fastbins the checks performed can race with concurrent modifications of the arena. If we detect a problem re-do the test after getting the lock. diff --git a/ChangeLog b/ChangeLog index 1e9df42..6ddf9a1 100644 diff --git a/malloc/malloc.c b/malloc/malloc.c index 0c0182e..a459a2b 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -4799,8 +4799,29 @@ _int_free(mstate av, mchunkptr p) || __builtin_expect (chunksize (chunk_at_offset (p, size)) >= av->system_mem, 0)) { - errstr = "free(): invalid next size (fast)"; - goto errout; +#ifdef ATOMIC_FASTBINS + /* We might not have a lock at this point and concurrent modifications + of system_mem might have let to a false positive. Redo the test + after getting the lock. */ + if (have_lock + || ({ assert (locked == 0); + mutex_lock(&av->mutex); + locked = 1; + chunk_at_offset (p, size)->size <= 2 * SIZE_SZ + || chunksize (chunk_at_offset (p, size)) >= av->system_mem; + })) +#endif + { + errstr = "free(): invalid next size (fast)"; + goto errout; + } +#ifdef ATOMIC_FASTBINS + if (! have_lock) + { + (void)mutex_unlock(&av->mutex); + locked = 0; + } +#endif } if (__builtin_expect (perturb_byte, 0))