Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
2c235100f3 | ||
|
161bfd6554 | ||
|
bedea83172 | ||
|
666dd833b0 | ||
|
0012625a87 | ||
|
43ae7c1164 | ||
|
dd8f12575c |
10
.gitignore
vendored
10
.gitignore
vendored
@ -1,6 +1,4 @@
|
||||
# Release tarballs.
|
||||
/glibc-*.tar.[gx]z
|
||||
# Generated (source) RPMs.
|
||||
/*.rpm
|
||||
# Expanded source trees.
|
||||
/glibc-*/
|
||||
/glibc-ports-2.14-25-gd3d9bde.tar.xz
|
||||
/glibc-2.14-394-g8f3b1ff-fedora.tar.xz
|
||||
/glibc-2.14-394-g8f3b1ff.tar.xz
|
||||
glibc-2.14-394-g8f3b1ff
|
||||
|
6058
ChangeLog.old
6058
ChangeLog.old
File diff suppressed because it is too large
Load Diff
34
README.quilt
34
README.quilt
@ -1,34 +0,0 @@
|
||||
This package supports working with patch files using quilt.
|
||||
|
||||
To regenerate the quilt series file run:
|
||||
./gen-quilt-series.sh
|
||||
|
||||
Setup environment:
|
||||
export QUILT_PATCHES=$PWD
|
||||
|
||||
Setup the source:
|
||||
./quilt-patch.sh [-f]
|
||||
|
||||
Use `-f` if you want to have quilt-patch always remove the existing
|
||||
source directory before starting. Otherwise you'll be patching on top of
|
||||
an already patched tree generated perhaps by `*pkg prep`.
|
||||
|
||||
Create a new patch:
|
||||
cd glibc-2.17-c758a686/
|
||||
quilt new glibc-rh1234622.patch
|
||||
quilt add ports/sysdeps/unix/sysv/linux/aarch64/nptl/libpthread.abilist
|
||||
vi ports/sysdeps/unix/sysv/linux/aarch64/nptl/libpthread.abilist
|
||||
quilt refresh
|
||||
cd ..
|
||||
git add glibc-rh1234622.patch
|
||||
<Then edit the glibc.spec file to build with the new patch>
|
||||
e.g.
|
||||
...
|
||||
PatchXXXX: glibc-rh1234622.patch
|
||||
...
|
||||
%patchXXXX -p1
|
||||
...
|
||||
git add glibc.spec
|
||||
git commit
|
||||
|
||||
You're done!
|
@ -1,2 +0,0 @@
|
||||
All of the useful glibc maintainer scripts are located at:
|
||||
https://pagure.io/glibc-maintainer-scripts
|
97
STAGE1-glibc
97
STAGE1-glibc
@ -1,97 +0,0 @@
|
||||
srpm glibc
|
||||
|
||||
# setup glibc
|
||||
# This path MUST be relative, not absolute
|
||||
GV=$(cd $SRC; echo glibc-2*)
|
||||
|
||||
if [ "$TARGET_ARCH" == "armv7hl" ]; then
|
||||
# rtkaio not supported on ARM
|
||||
rm -rf $SRC/$GV/rtkaio
|
||||
fi
|
||||
|
||||
GLIBCARGS="--prefix=/usr
|
||||
--with-headers=$ROOTFS/usr/include
|
||||
--enable-kernel=2.6.32
|
||||
--enable-bind-now
|
||||
--build $BUILD
|
||||
--host $TARGET
|
||||
--disable-profile
|
||||
--cache-file=config.cache
|
||||
--without-cvs
|
||||
--with-elf
|
||||
--without-gd
|
||||
--disable-sanity-checks
|
||||
--with-tls
|
||||
--with-__thread
|
||||
--enable-obsolete-rpc
|
||||
"
|
||||
|
||||
mcd $BUILDDIR/glibc
|
||||
|
||||
# prefill glibc cache
|
||||
echo libc_cv_forced_unwind=yes > config.cache
|
||||
echo libc_cv_c_cleanup=yes >> config.cache
|
||||
#echo libc_cv_ctors_header=yes >> config.cache
|
||||
echo ac_cv_header_cpuid_h=yes >> config.cache
|
||||
echo libc_cv_gcc_builtin_expect=yes >> config.cache
|
||||
|
||||
$SRC/$GV/configure $GLIBCARGS
|
||||
notparallel
|
||||
make $J ARCH=${KARCH} BUILD_CC=gcc cross-compiling=yes
|
||||
make DESTDIR=$ROOTFS $J ARCH=${KARCH} BUILD_CC=gcc cross-compiling=yes install
|
||||
|
||||
( cd $ROOTFS/usr/include/bits
|
||||
sed '/ifndef.*NO_LONG_DOUBLE/,/#endif/d' < mathdef.h > mathdef.h.new
|
||||
mv mathdef.h.new mathdef.h
|
||||
)
|
||||
|
||||
# 32-bit multilib libgcc needs 32-bit headers
|
||||
if [ ! "$TARGET32" = "" ]; then
|
||||
|
||||
old_CC=$CC
|
||||
old_CXX=$CC
|
||||
export CC="$TARGET-gcc -m32"
|
||||
export CXX="$TARGET-g++ -m32"
|
||||
|
||||
GLIBCARGS="--prefix=/usr
|
||||
--with-headers=$ROOTFS/usr/include
|
||||
--enable-kernel=2.6.32
|
||||
--enable-bind-now
|
||||
--build $BUILD
|
||||
--host $TARGET32
|
||||
--disable-profile
|
||||
--cache-file=config.cache
|
||||
--without-cvs
|
||||
--with-elf
|
||||
--without-gd
|
||||
--disable-sanity-checks
|
||||
--with-tls
|
||||
--with-__thread
|
||||
--enable-obsolete-rpc
|
||||
"
|
||||
|
||||
mcd $BUILDDIR/glibc32
|
||||
|
||||
# prefill glibc cache
|
||||
echo libc_cv_forced_unwind=yes > config.cache
|
||||
echo libc_cv_c_cleanup=yes >> config.cache
|
||||
echo libc_cv_ctors_header=yes >> config.cache
|
||||
echo ac_cv_header_cpuid_h=yes >> config.cache
|
||||
echo libc_cv_gcc_builtin_expect=yes >> config.cache
|
||||
|
||||
$SRC/$GV/configure $GLIBCARGS
|
||||
notparallel
|
||||
make $J ARCH=${KARCH} BUILD_CC=gcc cross-compiling=yes
|
||||
make DESTDIR=$ROOTFS $J ARCH=${KARCH} BUILD_CC=gcc cross-compiling=yes install
|
||||
|
||||
( cd $ROOTFS/usr/include/bits
|
||||
sed '/ifndef.*NO_LONG_DOUBLE/,/#endif/d' < mathdef.h > mathdef.h.new
|
||||
mv mathdef.h.new mathdef.h
|
||||
)
|
||||
|
||||
CC=$old_CC
|
||||
CXX=$old_CXX
|
||||
export $CC
|
||||
export $CXX
|
||||
|
||||
fi
|
@ -1,117 +0,0 @@
|
||||
set -vx
|
||||
srpm glibc
|
||||
|
||||
# setup glibc
|
||||
# This path MUST be relative, not absolute
|
||||
GV=$(cd $SRC; echo glibc-2*)
|
||||
GLIBCARGS="--prefix=/usr
|
||||
--with-headers=$ROOTFS/usr/include
|
||||
--enable-kernel=2.6.32
|
||||
--enable-bind-now
|
||||
--build $BUILD
|
||||
--host $TARGET
|
||||
--disable-profile
|
||||
--cache-file=config.cache
|
||||
--without-cvs
|
||||
--with-elf
|
||||
--without-gd
|
||||
--disable-sanity-checks
|
||||
--with-tls
|
||||
--with-__thread
|
||||
--enable-obsolete-rpc
|
||||
"
|
||||
|
||||
mcd $BUILDDIR/glibc-stage1
|
||||
|
||||
# prefill glibc cache
|
||||
echo libc_cv_forced_unwind=yes > config.cache
|
||||
echo libc_cv_c_cleanup=yes >> config.cache
|
||||
#echo libc_cv_ctors_header=yes >> config.cache
|
||||
echo ac_cv_header_cpuid_h=yes >> config.cache
|
||||
echo libc_cv_gcc_builtin_expect=yes >> config.cache
|
||||
|
||||
$SRC/$GV/configure $GLIBCARGS
|
||||
notparallel
|
||||
make DESTDIR=$ROOTFS $J ARCH=${KARCH} BUILD_CC=gcc cross-compiling=yes install-headers
|
||||
touch $ROOTFS/usr/include/gnu/stubs.h
|
||||
touch $ROOTFS/usr/include/bits/stdio_lim.h
|
||||
|
||||
( cd $ROOTFS/usr/include/bits
|
||||
sed '/ifndef.*NO_LONG_DOUBLE/,/#endif/d' < mathdef.h > mathdef.h.new
|
||||
mv mathdef.h.new mathdef.h
|
||||
)
|
||||
|
||||
# We also build just enough files to link libgcc.so. The fake
|
||||
# libc.so will never actually get used, but simplifies the boostrap.
|
||||
make $J ARCH=${KARCH} BUILD_CC=gcc cross-compiling=yes csu/subdir_lib
|
||||
|
||||
mkdirp $ROOTFS/usr/lib${SUFFIX}
|
||||
for file in `cd csu; echo crt*.o`; do
|
||||
echo "" | $TARGET-as -o $ROOTFS/usr/lib${SUFFIX}/$file
|
||||
done
|
||||
$TARGET-gcc -nostdlib -nostartfiles -shared -x c /dev/null\
|
||||
-o $ROOTFS/usr/lib${SUFFIX}/libc.so
|
||||
|
||||
|
||||
# 32-bit multilib libgcc needs stub 32-bit libraries
|
||||
if [ ! "$TARGET32" = "" ]; then
|
||||
|
||||
old_CC=$CC
|
||||
old_CXX=$CC
|
||||
export CC="$TARGET-gcc -m32"
|
||||
export CXX="$TARGET-g++ -m32"
|
||||
|
||||
# setup 32-bit glibc headers
|
||||
GLIBCARGS="--prefix=/usr
|
||||
--with-headers=$ROOTFS/usr/include
|
||||
--enable-kernel=2.6.32
|
||||
--enable-bind-now
|
||||
--build $BUILD
|
||||
--host $TARGET32
|
||||
--disable-profile
|
||||
--cache-file=config.cache
|
||||
--without-cvs
|
||||
--with-elf
|
||||
--without-gd
|
||||
--disable-sanity-checks
|
||||
--with-tls
|
||||
--with-__thread
|
||||
--enable-obsolete-rpc
|
||||
"
|
||||
|
||||
mcd $BUILDDIR/glibc32-stage1
|
||||
|
||||
# prefill glibc cache
|
||||
echo libc_cv_forced_unwind=yes > config.cache
|
||||
echo libc_cv_c_cleanup=yes >> config.cache
|
||||
#echo libc_cv_ctors_header=yes >> config.cache
|
||||
echo ac_cv_header_cpuid_h=yes >> config.cache
|
||||
echo libc_cv_gcc_builtin_expect=yes >> config.cache
|
||||
|
||||
$SRC/$GV/configure $GLIBCARGS
|
||||
notparallel
|
||||
make DESTDIR=$ROOTFS $J ARCH=${KARCH} BUILD_CC=gcc cross-compiling=yes install-headers
|
||||
touch $ROOTFS/usr/include/gnu/stubs.h
|
||||
touch $ROOTFS/usr/include/bits/stdio_lim.h
|
||||
|
||||
( cd $ROOTFS/usr/include/bits
|
||||
sed '/ifndef.*NO_LONG_DOUBLE/,/#endif/d' < mathdef.h > mathdef.h.new
|
||||
mv mathdef.h.new mathdef.h
|
||||
)
|
||||
|
||||
# We also build just enough files to link libgcc.so. The fake
|
||||
# libc.so will never actually get used, but simplifies the boostrap.
|
||||
make $J ARCH=${KARCH} BUILD_CC=gcc cross-compiling=yes csu/subdir_lib
|
||||
|
||||
mkdirp $ROOTFS/usr/lib
|
||||
for file in `cd csu; echo crt*.o`; do
|
||||
echo "" | $TARGET-as --32 -o $ROOTFS/usr/lib/$file
|
||||
done
|
||||
$CC -m32 -nostdlib -nostartfiles -shared -x c /dev/null\
|
||||
-o $ROOTFS/usr/lib/libc.so
|
||||
|
||||
CC=$old_CC
|
||||
CXX=$old_CXX
|
||||
export $CC
|
||||
export $CXX
|
||||
fi
|
494
SUPPORTED
494
SUPPORTED
@ -1,494 +0,0 @@
|
||||
# This file names the currently supported and somewhat tested locales.
|
||||
# If you have any additions please file a glibc bug report.
|
||||
SUPPORTED-LOCALES=\
|
||||
C.UTF-8/UTF-8 \
|
||||
aa_DJ.UTF-8/UTF-8 \
|
||||
aa_DJ/ISO-8859-1 \
|
||||
aa_ER/UTF-8 \
|
||||
aa_ER@saaho/UTF-8 \
|
||||
aa_ET/UTF-8 \
|
||||
af_ZA.UTF-8/UTF-8 \
|
||||
af_ZA/ISO-8859-1 \
|
||||
agr_PE/UTF-8 \
|
||||
ak_GH/UTF-8 \
|
||||
am_ET/UTF-8 \
|
||||
an_ES.UTF-8/UTF-8 \
|
||||
an_ES/ISO-8859-15 \
|
||||
anp_IN/UTF-8 \
|
||||
ar_AE.UTF-8/UTF-8 \
|
||||
ar_AE/ISO-8859-6 \
|
||||
ar_BH.UTF-8/UTF-8 \
|
||||
ar_BH/ISO-8859-6 \
|
||||
ar_DZ.UTF-8/UTF-8 \
|
||||
ar_DZ/ISO-8859-6 \
|
||||
ar_EG.UTF-8/UTF-8 \
|
||||
ar_EG/ISO-8859-6 \
|
||||
ar_IN/UTF-8 \
|
||||
ar_IQ.UTF-8/UTF-8 \
|
||||
ar_IQ/ISO-8859-6 \
|
||||
ar_JO.UTF-8/UTF-8 \
|
||||
ar_JO/ISO-8859-6 \
|
||||
ar_KW.UTF-8/UTF-8 \
|
||||
ar_KW/ISO-8859-6 \
|
||||
ar_LB.UTF-8/UTF-8 \
|
||||
ar_LB/ISO-8859-6 \
|
||||
ar_LY.UTF-8/UTF-8 \
|
||||
ar_LY/ISO-8859-6 \
|
||||
ar_MA.UTF-8/UTF-8 \
|
||||
ar_MA/ISO-8859-6 \
|
||||
ar_OM.UTF-8/UTF-8 \
|
||||
ar_OM/ISO-8859-6 \
|
||||
ar_QA.UTF-8/UTF-8 \
|
||||
ar_QA/ISO-8859-6 \
|
||||
ar_SA.UTF-8/UTF-8 \
|
||||
ar_SA/ISO-8859-6 \
|
||||
ar_SD.UTF-8/UTF-8 \
|
||||
ar_SD/ISO-8859-6 \
|
||||
ar_SS/UTF-8 \
|
||||
ar_SY.UTF-8/UTF-8 \
|
||||
ar_SY/ISO-8859-6 \
|
||||
ar_TN.UTF-8/UTF-8 \
|
||||
ar_TN/ISO-8859-6 \
|
||||
ar_YE.UTF-8/UTF-8 \
|
||||
ar_YE/ISO-8859-6 \
|
||||
ayc_PE/UTF-8 \
|
||||
az_AZ/UTF-8 \
|
||||
az_IR/UTF-8 \
|
||||
as_IN/UTF-8 \
|
||||
ast_ES.UTF-8/UTF-8 \
|
||||
ast_ES/ISO-8859-15 \
|
||||
be_BY.UTF-8/UTF-8 \
|
||||
be_BY/CP1251 \
|
||||
be_BY@latin/UTF-8 \
|
||||
bem_ZM/UTF-8 \
|
||||
ber_DZ/UTF-8 \
|
||||
ber_MA/UTF-8 \
|
||||
bg_BG.UTF-8/UTF-8 \
|
||||
bg_BG/CP1251 \
|
||||
bhb_IN.UTF-8/UTF-8 \
|
||||
bho_IN/UTF-8 \
|
||||
bho_NP/UTF-8 \
|
||||
bi_VU/UTF-8 \
|
||||
bn_BD/UTF-8 \
|
||||
bn_IN/UTF-8 \
|
||||
bo_CN/UTF-8 \
|
||||
bo_IN/UTF-8 \
|
||||
br_FR.UTF-8/UTF-8 \
|
||||
br_FR/ISO-8859-1 \
|
||||
br_FR@euro/ISO-8859-15 \
|
||||
brx_IN/UTF-8 \
|
||||
bs_BA.UTF-8/UTF-8 \
|
||||
bs_BA/ISO-8859-2 \
|
||||
byn_ER/UTF-8 \
|
||||
ca_AD.UTF-8/UTF-8 \
|
||||
ca_AD/ISO-8859-15 \
|
||||
ca_ES.UTF-8/UTF-8 \
|
||||
ca_ES/ISO-8859-1 \
|
||||
ca_ES@euro/ISO-8859-15 \
|
||||
ca_ES@valencia/UTF-8 \
|
||||
ca_FR.UTF-8/UTF-8 \
|
||||
ca_FR/ISO-8859-15 \
|
||||
ca_IT.UTF-8/UTF-8 \
|
||||
ca_IT/ISO-8859-15 \
|
||||
ce_RU/UTF-8 \
|
||||
chr_US/UTF-8 \
|
||||
cmn_TW/UTF-8 \
|
||||
crh_UA/UTF-8 \
|
||||
cs_CZ.UTF-8/UTF-8 \
|
||||
cs_CZ/ISO-8859-2 \
|
||||
csb_PL/UTF-8 \
|
||||
cv_RU/UTF-8 \
|
||||
cy_GB.UTF-8/UTF-8 \
|
||||
cy_GB/ISO-8859-14 \
|
||||
da_DK.UTF-8/UTF-8 \
|
||||
da_DK/ISO-8859-1 \
|
||||
da_DK.ISO-8859-15/ISO-8859-15 \
|
||||
de_AT.UTF-8/UTF-8 \
|
||||
de_AT/ISO-8859-1 \
|
||||
de_AT@euro/ISO-8859-15 \
|
||||
de_BE.UTF-8/UTF-8 \
|
||||
de_BE/ISO-8859-1 \
|
||||
de_BE@euro/ISO-8859-15 \
|
||||
de_CH.UTF-8/UTF-8 \
|
||||
de_CH/ISO-8859-1 \
|
||||
de_DE.UTF-8/UTF-8 \
|
||||
de_DE/ISO-8859-1 \
|
||||
de_DE@euro/ISO-8859-15 \
|
||||
de_IT.UTF-8/UTF-8 \
|
||||
de_IT/ISO-8859-1 \
|
||||
de_LI.UTF-8/UTF-8 \
|
||||
de_LU.UTF-8/UTF-8 \
|
||||
de_LU/ISO-8859-1 \
|
||||
de_LU@euro/ISO-8859-15 \
|
||||
doi_IN/UTF-8 \
|
||||
dsb_DE/UTF-8 \
|
||||
dv_MV/UTF-8 \
|
||||
dz_BT/UTF-8 \
|
||||
el_GR.UTF-8/UTF-8 \
|
||||
el_GR/ISO-8859-7 \
|
||||
el_GR@euro/ISO-8859-7 \
|
||||
el_CY.UTF-8/UTF-8 \
|
||||
el_CY/ISO-8859-7 \
|
||||
en_AG/UTF-8 \
|
||||
en_AU.UTF-8/UTF-8 \
|
||||
en_AU/ISO-8859-1 \
|
||||
en_BW.UTF-8/UTF-8 \
|
||||
en_BW/ISO-8859-1 \
|
||||
en_CA.UTF-8/UTF-8 \
|
||||
en_CA/ISO-8859-1 \
|
||||
en_DK.UTF-8/UTF-8 \
|
||||
en_DK/ISO-8859-1 \
|
||||
en_GB.UTF-8/UTF-8 \
|
||||
en_GB/ISO-8859-1 \
|
||||
en_GB.ISO-8859-15/ISO-8859-15 \
|
||||
en_HK.UTF-8/UTF-8 \
|
||||
en_HK/ISO-8859-1 \
|
||||
en_IE.UTF-8/UTF-8 \
|
||||
en_IE/ISO-8859-1 \
|
||||
en_IE@euro/ISO-8859-15 \
|
||||
en_IL/UTF-8 \
|
||||
en_IN/UTF-8 \
|
||||
en_NG/UTF-8 \
|
||||
en_NZ.UTF-8/UTF-8 \
|
||||
en_NZ/ISO-8859-1 \
|
||||
en_PH.UTF-8/UTF-8 \
|
||||
en_PH/ISO-8859-1 \
|
||||
en_SC.UTF-8/UTF-8 \
|
||||
en_SG.UTF-8/UTF-8 \
|
||||
en_SG/ISO-8859-1 \
|
||||
en_US.UTF-8/UTF-8 \
|
||||
en_US/ISO-8859-1 \
|
||||
en_US.ISO-8859-15/ISO-8859-15 \
|
||||
en_ZA.UTF-8/UTF-8 \
|
||||
en_ZA/ISO-8859-1 \
|
||||
en_ZM/UTF-8 \
|
||||
en_ZW.UTF-8/UTF-8 \
|
||||
en_ZW/ISO-8859-1 \
|
||||
eo/UTF-8 \
|
||||
es_AR.UTF-8/UTF-8 \
|
||||
es_AR/ISO-8859-1 \
|
||||
es_BO.UTF-8/UTF-8 \
|
||||
es_BO/ISO-8859-1 \
|
||||
es_CL.UTF-8/UTF-8 \
|
||||
es_CL/ISO-8859-1 \
|
||||
es_CO.UTF-8/UTF-8 \
|
||||
es_CO/ISO-8859-1 \
|
||||
es_CR.UTF-8/UTF-8 \
|
||||
es_CR/ISO-8859-1 \
|
||||
es_CU/UTF-8 \
|
||||
es_DO.UTF-8/UTF-8 \
|
||||
es_DO/ISO-8859-1 \
|
||||
es_EC.UTF-8/UTF-8 \
|
||||
es_EC/ISO-8859-1 \
|
||||
es_ES.UTF-8/UTF-8 \
|
||||
es_ES/ISO-8859-1 \
|
||||
es_ES@euro/ISO-8859-15 \
|
||||
es_GT.UTF-8/UTF-8 \
|
||||
es_GT/ISO-8859-1 \
|
||||
es_HN.UTF-8/UTF-8 \
|
||||
es_HN/ISO-8859-1 \
|
||||
es_MX.UTF-8/UTF-8 \
|
||||
es_MX/ISO-8859-1 \
|
||||
es_NI.UTF-8/UTF-8 \
|
||||
es_NI/ISO-8859-1 \
|
||||
es_PA.UTF-8/UTF-8 \
|
||||
es_PA/ISO-8859-1 \
|
||||
es_PE.UTF-8/UTF-8 \
|
||||
es_PE/ISO-8859-1 \
|
||||
es_PR.UTF-8/UTF-8 \
|
||||
es_PR/ISO-8859-1 \
|
||||
es_PY.UTF-8/UTF-8 \
|
||||
es_PY/ISO-8859-1 \
|
||||
es_SV.UTF-8/UTF-8 \
|
||||
es_SV/ISO-8859-1 \
|
||||
es_US.UTF-8/UTF-8 \
|
||||
es_US/ISO-8859-1 \
|
||||
es_UY.UTF-8/UTF-8 \
|
||||
es_UY/ISO-8859-1 \
|
||||
es_VE.UTF-8/UTF-8 \
|
||||
es_VE/ISO-8859-1 \
|
||||
et_EE.UTF-8/UTF-8 \
|
||||
et_EE/ISO-8859-1 \
|
||||
et_EE.ISO-8859-15/ISO-8859-15 \
|
||||
eu_ES.UTF-8/UTF-8 \
|
||||
eu_ES/ISO-8859-1 \
|
||||
eu_ES@euro/ISO-8859-15 \
|
||||
fa_IR/UTF-8 \
|
||||
ff_SN/UTF-8 \
|
||||
fi_FI.UTF-8/UTF-8 \
|
||||
fi_FI/ISO-8859-1 \
|
||||
fi_FI@euro/ISO-8859-15 \
|
||||
fil_PH/UTF-8 \
|
||||
fo_FO.UTF-8/UTF-8 \
|
||||
fo_FO/ISO-8859-1 \
|
||||
fr_BE.UTF-8/UTF-8 \
|
||||
fr_BE/ISO-8859-1 \
|
||||
fr_BE@euro/ISO-8859-15 \
|
||||
fr_CA.UTF-8/UTF-8 \
|
||||
fr_CA/ISO-8859-1 \
|
||||
fr_CH.UTF-8/UTF-8 \
|
||||
fr_CH/ISO-8859-1 \
|
||||
fr_FR.UTF-8/UTF-8 \
|
||||
fr_FR/ISO-8859-1 \
|
||||
fr_FR@euro/ISO-8859-15 \
|
||||
fr_LU.UTF-8/UTF-8 \
|
||||
fr_LU/ISO-8859-1 \
|
||||
fr_LU@euro/ISO-8859-15 \
|
||||
fur_IT/UTF-8 \
|
||||
fy_NL/UTF-8 \
|
||||
fy_DE/UTF-8 \
|
||||
ga_IE.UTF-8/UTF-8 \
|
||||
ga_IE/ISO-8859-1 \
|
||||
ga_IE@euro/ISO-8859-15 \
|
||||
gd_GB.UTF-8/UTF-8 \
|
||||
gd_GB/ISO-8859-15 \
|
||||
gez_ER/UTF-8 \
|
||||
gez_ER@abegede/UTF-8 \
|
||||
gez_ET/UTF-8 \
|
||||
gez_ET@abegede/UTF-8 \
|
||||
gl_ES.UTF-8/UTF-8 \
|
||||
gl_ES/ISO-8859-1 \
|
||||
gl_ES@euro/ISO-8859-15 \
|
||||
gu_IN/UTF-8 \
|
||||
gv_GB.UTF-8/UTF-8 \
|
||||
gv_GB/ISO-8859-1 \
|
||||
ha_NG/UTF-8 \
|
||||
hak_TW/UTF-8 \
|
||||
he_IL.UTF-8/UTF-8 \
|
||||
he_IL/ISO-8859-8 \
|
||||
hi_IN/UTF-8 \
|
||||
hif_FJ/UTF-8 \
|
||||
hne_IN/UTF-8 \
|
||||
hr_HR.UTF-8/UTF-8 \
|
||||
hr_HR/ISO-8859-2 \
|
||||
hsb_DE/ISO-8859-2 \
|
||||
hsb_DE.UTF-8/UTF-8 \
|
||||
ht_HT/UTF-8 \
|
||||
hu_HU.UTF-8/UTF-8 \
|
||||
hu_HU/ISO-8859-2 \
|
||||
hy_AM/UTF-8 \
|
||||
hy_AM.ARMSCII-8/ARMSCII-8 \
|
||||
ia_FR/UTF-8 \
|
||||
id_ID.UTF-8/UTF-8 \
|
||||
id_ID/ISO-8859-1 \
|
||||
ig_NG/UTF-8 \
|
||||
ik_CA/UTF-8 \
|
||||
is_IS.UTF-8/UTF-8 \
|
||||
is_IS/ISO-8859-1 \
|
||||
it_CH.UTF-8/UTF-8 \
|
||||
it_CH/ISO-8859-1 \
|
||||
it_IT.UTF-8/UTF-8 \
|
||||
it_IT/ISO-8859-1 \
|
||||
it_IT@euro/ISO-8859-15 \
|
||||
iu_CA/UTF-8 \
|
||||
ja_JP.EUC-JP/EUC-JP \
|
||||
ja_JP.UTF-8/UTF-8 \
|
||||
ka_GE.UTF-8/UTF-8 \
|
||||
ka_GE/GEORGIAN-PS \
|
||||
kab_DZ/UTF-8 \
|
||||
kk_KZ.UTF-8/UTF-8 \
|
||||
kk_KZ/PT154 \
|
||||
kl_GL.UTF-8/UTF-8 \
|
||||
kl_GL/ISO-8859-1 \
|
||||
km_KH/UTF-8 \
|
||||
kn_IN/UTF-8 \
|
||||
ko_KR.EUC-KR/EUC-KR \
|
||||
ko_KR.UTF-8/UTF-8 \
|
||||
kok_IN/UTF-8 \
|
||||
ks_IN/UTF-8 \
|
||||
ks_IN@devanagari/UTF-8 \
|
||||
ku_TR.UTF-8/UTF-8 \
|
||||
ku_TR/ISO-8859-9 \
|
||||
kw_GB.UTF-8/UTF-8 \
|
||||
kw_GB/ISO-8859-1 \
|
||||
ky_KG/UTF-8 \
|
||||
lb_LU/UTF-8 \
|
||||
lg_UG.UTF-8/UTF-8 \
|
||||
lg_UG/ISO-8859-10 \
|
||||
li_BE/UTF-8 \
|
||||
li_NL/UTF-8 \
|
||||
lij_IT/UTF-8 \
|
||||
ln_CD/UTF-8 \
|
||||
lo_LA/UTF-8 \
|
||||
lt_LT.UTF-8/UTF-8 \
|
||||
lt_LT/ISO-8859-13 \
|
||||
lv_LV.UTF-8/UTF-8 \
|
||||
lv_LV/ISO-8859-13 \
|
||||
lzh_TW/UTF-8 \
|
||||
mag_IN/UTF-8 \
|
||||
mai_IN/UTF-8 \
|
||||
mai_NP/UTF-8 \
|
||||
mfe_MU/UTF-8 \
|
||||
mg_MG.UTF-8/UTF-8 \
|
||||
mg_MG/ISO-8859-15 \
|
||||
mhr_RU/UTF-8 \
|
||||
mi_NZ.UTF-8/UTF-8 \
|
||||
mi_NZ/ISO-8859-13 \
|
||||
miq_NI/UTF-8 \
|
||||
mjw_IN/UTF-8 \
|
||||
mk_MK.UTF-8/UTF-8 \
|
||||
mk_MK/ISO-8859-5 \
|
||||
ml_IN/UTF-8 \
|
||||
mn_MN/UTF-8 \
|
||||
mni_IN/UTF-8 \
|
||||
mr_IN/UTF-8 \
|
||||
ms_MY.UTF-8/UTF-8 \
|
||||
ms_MY/ISO-8859-1 \
|
||||
mt_MT.UTF-8/UTF-8 \
|
||||
mt_MT/ISO-8859-3 \
|
||||
my_MM/UTF-8 \
|
||||
nan_TW/UTF-8 \
|
||||
nan_TW@latin/UTF-8 \
|
||||
nb_NO.UTF-8/UTF-8 \
|
||||
nb_NO/ISO-8859-1 \
|
||||
nds_DE/UTF-8 \
|
||||
nds_NL/UTF-8 \
|
||||
ne_NP/UTF-8 \
|
||||
nhn_MX/UTF-8 \
|
||||
niu_NU/UTF-8 \
|
||||
niu_NZ/UTF-8 \
|
||||
nl_AW/UTF-8 \
|
||||
nl_BE.UTF-8/UTF-8 \
|
||||
nl_BE/ISO-8859-1 \
|
||||
nl_BE@euro/ISO-8859-15 \
|
||||
nl_NL.UTF-8/UTF-8 \
|
||||
nl_NL/ISO-8859-1 \
|
||||
nl_NL@euro/ISO-8859-15 \
|
||||
nn_NO.UTF-8/UTF-8 \
|
||||
nn_NO/ISO-8859-1 \
|
||||
nr_ZA/UTF-8 \
|
||||
nso_ZA/UTF-8 \
|
||||
oc_FR.UTF-8/UTF-8 \
|
||||
oc_FR/ISO-8859-1 \
|
||||
om_ET/UTF-8 \
|
||||
om_KE.UTF-8/UTF-8 \
|
||||
om_KE/ISO-8859-1 \
|
||||
or_IN/UTF-8 \
|
||||
os_RU/UTF-8 \
|
||||
pa_IN/UTF-8 \
|
||||
pa_PK/UTF-8 \
|
||||
pap_AW/UTF-8 \
|
||||
pap_CW/UTF-8 \
|
||||
pl_PL.UTF-8/UTF-8 \
|
||||
pl_PL/ISO-8859-2 \
|
||||
ps_AF/UTF-8 \
|
||||
pt_BR.UTF-8/UTF-8 \
|
||||
pt_BR/ISO-8859-1 \
|
||||
pt_PT.UTF-8/UTF-8 \
|
||||
pt_PT/ISO-8859-1 \
|
||||
pt_PT@euro/ISO-8859-15 \
|
||||
quz_PE/UTF-8 \
|
||||
raj_IN/UTF-8 \
|
||||
ro_RO.UTF-8/UTF-8 \
|
||||
ro_RO/ISO-8859-2 \
|
||||
ru_RU.KOI8-R/KOI8-R \
|
||||
ru_RU.UTF-8/UTF-8 \
|
||||
ru_RU/ISO-8859-5 \
|
||||
ru_UA.UTF-8/UTF-8 \
|
||||
ru_UA/KOI8-U \
|
||||
rw_RW/UTF-8 \
|
||||
sa_IN/UTF-8 \
|
||||
sah_RU/UTF-8 \
|
||||
sat_IN/UTF-8 \
|
||||
sc_IT/UTF-8 \
|
||||
sd_IN/UTF-8 \
|
||||
sd_IN@devanagari/UTF-8 \
|
||||
se_NO/UTF-8 \
|
||||
sgs_LT/UTF-8 \
|
||||
shn_MM/UTF-8 \
|
||||
shs_CA/UTF-8 \
|
||||
si_LK/UTF-8 \
|
||||
sid_ET/UTF-8 \
|
||||
sk_SK.UTF-8/UTF-8 \
|
||||
sk_SK/ISO-8859-2 \
|
||||
sl_SI.UTF-8/UTF-8 \
|
||||
sl_SI/ISO-8859-2 \
|
||||
sm_WS/UTF-8 \
|
||||
so_DJ.UTF-8/UTF-8 \
|
||||
so_DJ/ISO-8859-1 \
|
||||
so_ET/UTF-8 \
|
||||
so_KE.UTF-8/UTF-8 \
|
||||
so_KE/ISO-8859-1 \
|
||||
so_SO.UTF-8/UTF-8 \
|
||||
so_SO/ISO-8859-1 \
|
||||
sq_AL.UTF-8/UTF-8 \
|
||||
sq_AL/ISO-8859-1 \
|
||||
sq_MK/UTF-8 \
|
||||
sr_ME/UTF-8 \
|
||||
sr_RS/UTF-8 \
|
||||
sr_RS@latin/UTF-8 \
|
||||
ss_ZA/UTF-8 \
|
||||
st_ZA.UTF-8/UTF-8 \
|
||||
st_ZA/ISO-8859-1 \
|
||||
sv_FI.UTF-8/UTF-8 \
|
||||
sv_FI/ISO-8859-1 \
|
||||
sv_FI@euro/ISO-8859-15 \
|
||||
sv_SE.UTF-8/UTF-8 \
|
||||
sv_SE/ISO-8859-1 \
|
||||
sv_SE.ISO-8859-15/ISO-8859-15 \
|
||||
sw_KE/UTF-8 \
|
||||
sw_TZ/UTF-8 \
|
||||
szl_PL/UTF-8 \
|
||||
ta_IN/UTF-8 \
|
||||
ta_LK/UTF-8 \
|
||||
tcy_IN.UTF-8/UTF-8 \
|
||||
te_IN/UTF-8 \
|
||||
tg_TJ.UTF-8/UTF-8 \
|
||||
tg_TJ/KOI8-T \
|
||||
th_TH.UTF-8/UTF-8 \
|
||||
th_TH/TIS-620 \
|
||||
the_NP/UTF-8 \
|
||||
ti_ER/UTF-8 \
|
||||
ti_ET/UTF-8 \
|
||||
tig_ER/UTF-8 \
|
||||
tk_TM/UTF-8 \
|
||||
tl_PH.UTF-8/UTF-8 \
|
||||
tl_PH/ISO-8859-1 \
|
||||
tn_ZA/UTF-8 \
|
||||
to_TO/UTF-8 \
|
||||
tpi_PG/UTF-8 \
|
||||
tr_CY.UTF-8/UTF-8 \
|
||||
tr_CY/ISO-8859-9 \
|
||||
tr_TR.UTF-8/UTF-8 \
|
||||
tr_TR/ISO-8859-9 \
|
||||
ts_ZA/UTF-8 \
|
||||
tt_RU/UTF-8 \
|
||||
tt_RU@iqtelif/UTF-8 \
|
||||
ug_CN/UTF-8 \
|
||||
uk_UA.UTF-8/UTF-8 \
|
||||
uk_UA/KOI8-U \
|
||||
unm_US/UTF-8 \
|
||||
ur_IN/UTF-8 \
|
||||
ur_PK/UTF-8 \
|
||||
uz_UZ.UTF-8/UTF-8 \
|
||||
uz_UZ/ISO-8859-1 \
|
||||
uz_UZ@cyrillic/UTF-8 \
|
||||
ve_ZA/UTF-8 \
|
||||
vi_VN/UTF-8 \
|
||||
wa_BE/ISO-8859-1 \
|
||||
wa_BE@euro/ISO-8859-15 \
|
||||
wa_BE.UTF-8/UTF-8 \
|
||||
wae_CH/UTF-8 \
|
||||
wal_ET/UTF-8 \
|
||||
wo_SN/UTF-8 \
|
||||
xh_ZA.UTF-8/UTF-8 \
|
||||
xh_ZA/ISO-8859-1 \
|
||||
yi_US.UTF-8/UTF-8 \
|
||||
yi_US/CP1255 \
|
||||
yo_NG/UTF-8 \
|
||||
yue_HK/UTF-8 \
|
||||
yuw_PG/UTF-8 \
|
||||
zh_CN.GB18030/GB18030 \
|
||||
zh_CN.GBK/GBK \
|
||||
zh_CN.UTF-8/UTF-8 \
|
||||
zh_CN/GB2312 \
|
||||
zh_HK.UTF-8/UTF-8 \
|
||||
zh_HK/BIG5-HKSCS \
|
||||
zh_SG.UTF-8/UTF-8 \
|
||||
zh_SG.GBK/GBK \
|
||||
zh_SG/GB2312 \
|
||||
zh_TW.EUC-TW/EUC-TW \
|
||||
zh_TW.UTF-8/UTF-8 \
|
||||
zh_TW/BIG5 \
|
||||
zu_ZA.UTF-8/UTF-8 \
|
||||
zu_ZA/ISO-8859-1 \
|
77
bench.mk
77
bench.mk
@ -1,77 +0,0 @@
|
||||
objpfx = $(prefix)/$(ver)/usr/libexec/glibc-benchtests/
|
||||
|
||||
bench-math := acos acosh asin asinh atan atanh cos cosh exp exp2 ffs ffsll \
|
||||
log log2 modf pow rint sin sincos sinh sqrt tan tanh
|
||||
|
||||
bench-pthread := pthread_once
|
||||
|
||||
bench := $(bench-math) $(bench-pthread)
|
||||
|
||||
run-bench := $(prefix)/$(ver)/lib64/ld-linux-x86-64.so.2 --library-path $(prefix)/$(ver)/lib64 $${run}
|
||||
|
||||
# String function benchmarks.
|
||||
string-bench := bcopy bzero memccpy memchr memcmp memcpy memmem memmove \
|
||||
mempcpy memset rawmemchr stpcpy stpncpy strcasecmp strcasestr \
|
||||
strcat strchr strchrnul strcmp strcpy strcspn strlen \
|
||||
strncasecmp strncat strncmp strncpy strnlen strpbrk strrchr \
|
||||
strspn strstr strcpy_chk stpcpy_chk memrchr strsep strtok
|
||||
string-bench-all := $(string-bench)
|
||||
|
||||
stdlib-bench := strtod
|
||||
|
||||
benchset := $(string-bench-all) $(stdlib-bench)
|
||||
|
||||
bench-malloc := malloc-thread
|
||||
|
||||
binaries-bench := $(addprefix $(objpfx)bench-,$(bench))
|
||||
binaries-benchset := $(addprefix $(objpfx)bench-,$(benchset))
|
||||
binaries-bench-malloc := $(addprefix $(objpfx)bench-,$(bench-malloc))
|
||||
|
||||
DETAILED_OPT :=
|
||||
|
||||
ifdef DETAILED
|
||||
DETAILED_OPT := -d
|
||||
endif
|
||||
|
||||
bench: bench-set bench-func bench-malloc
|
||||
|
||||
bench-set: $(binaries-benchset)
|
||||
for run in $^; do \
|
||||
outfile=$(prefix)/$$(basename $${run}.$(ver).out); \
|
||||
echo "Running $${run}"; \
|
||||
$(run-bench) > $${outfile}.tmp; \
|
||||
mv $${outfile}{.tmp,}; \
|
||||
done
|
||||
|
||||
bench-malloc: $(binaries-bench-malloc)
|
||||
run=$(objpfx)bench-malloc-thread; \
|
||||
outfile=$(prefix)/$$(basename $${run}.$(ver).out); \
|
||||
for thr in 1 8 16 32; do \
|
||||
echo "Running $${run} $${thr}"; \
|
||||
$(run-bench) $${thr} > $${outfile}.tmp; \
|
||||
mv $${outfile}{.tmp,}; \
|
||||
done
|
||||
|
||||
# Build and execute the benchmark functions. This target generates JSON
|
||||
# formatted bench.out. Each of the programs produce independent JSON output,
|
||||
# so one could even execute them individually and process it using any JSON
|
||||
# capable language or tool.
|
||||
bench-func: $(binaries-bench)
|
||||
{ echo "{\"timing_type\": \"hp-timing\","; \
|
||||
echo " \"functions\": {"; \
|
||||
for run in $^; do \
|
||||
if ! [ "x$${run}" = "x$<" ]; then \
|
||||
echo ","; \
|
||||
fi; \
|
||||
echo "Running $${run}" >&2; \
|
||||
$(run-bench) $(DETAILED_OPT); \
|
||||
done; \
|
||||
echo; \
|
||||
echo " }"; \
|
||||
echo "}"; } > $(prefix)/bench.$(ver).out-tmp; \
|
||||
if [ -f $(prefix)/bench.$(ver).out ]; then \
|
||||
mv -f $(prefix)/bench.$(ver).out{,.old}; \
|
||||
fi; \
|
||||
mv -f $(prefix)/bench.$(ver).out{-tmp,}
|
||||
# scripts/validate_benchout.py bench.out \
|
||||
# scripts/benchout.schema.json
|
@ -1,14 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Autogeneries the quilt `series` from the patch order in the spec file.
|
||||
# We don't use `quilt setup` because it makes a huge mess and doesn't work.
|
||||
component="glibc"
|
||||
rm -f series.new
|
||||
extra_args="--fuzz=0"
|
||||
count=0
|
||||
# Transform patches into series file.
|
||||
grep '^Patch.*:' glibc.spec | sed -e 's,Patch.*: ,,g' > series.new
|
||||
count=`wc -l series.new | sed -e 's, .*$,,g'`
|
||||
echo "Processed $count patches."
|
||||
mv series.new series
|
||||
echo "Generated quilt ./series file. Please do not commit."
|
||||
exit 0
|
146
glibc-arenalock.patch
Normal file
146
glibc-arenalock.patch
Normal file
@ -0,0 +1,146 @@
|
||||
commit 77cdc054e02069d72dcf54a9ad7d7df3a24bcb01
|
||||
Author: Andreas Schwab <schwab@redhat.com>
|
||||
Date: Wed Nov 9 17:14:39 2011 +0100
|
||||
|
||||
Check malloc arana limit atomically
|
||||
|
||||
diff --git a/ChangeLog b/ChangeLog
|
||||
index bf09161..edd7dd8 100644
|
||||
--- a/ChangeLog
|
||||
+++ b/ChangeLog
|
||||
@@ -1,3 +1,14 @@
|
||||
+2011-11-14 Andreas Schwab <schwab@redhat.com>
|
||||
+
|
||||
+ * malloc/arena.c (arena_get2): Don't call reused_arena when
|
||||
+ _int_new_arena failed.
|
||||
+
|
||||
+2011-11-10 Andreas Schwab <schwab@redhat.com>
|
||||
+
|
||||
+ * malloc/arena.c (_int_new_arena): Don't increment narenas.
|
||||
+ (reused_arena): Don't check arena limit.
|
||||
+ (arena_get2): Atomically check arena limit.
|
||||
+
|
||||
2011-10-19 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* sysdeps/x86_64/fpu/math_private.h (libc_feupdateenv): Use
|
||||
diff --git a/malloc/arena.c b/malloc/arena.c
|
||||
index 9114fd2..042cac8 100644
|
||||
--- a/malloc/arena.c
|
||||
+++ b/malloc/arena.c
|
||||
@@ -747,8 +747,6 @@ _int_new_arena(size_t size)
|
||||
main_arena.next = a;
|
||||
|
||||
#ifdef PER_THREAD
|
||||
- ++narenas;
|
||||
-
|
||||
(void)mutex_unlock(&list_lock);
|
||||
#endif
|
||||
|
||||
@@ -786,30 +784,6 @@ get_free_list (void)
|
||||
static mstate
|
||||
reused_arena (void)
|
||||
{
|
||||
- if (narenas <= mp_.arena_test)
|
||||
- return NULL;
|
||||
-
|
||||
- static int narenas_limit;
|
||||
- if (narenas_limit == 0)
|
||||
- {
|
||||
- if (mp_.arena_max != 0)
|
||||
- narenas_limit = mp_.arena_max;
|
||||
- else
|
||||
- {
|
||||
- int n = __get_nprocs ();
|
||||
-
|
||||
- if (n >= 1)
|
||||
- narenas_limit = NARENAS_FROM_NCORES (n);
|
||||
- else
|
||||
- /* We have no information about the system. Assume two
|
||||
- cores. */
|
||||
- narenas_limit = NARENAS_FROM_NCORES (2);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if (narenas < narenas_limit)
|
||||
- return NULL;
|
||||
-
|
||||
mstate result;
|
||||
static mstate next_to_use;
|
||||
if (next_to_use == NULL)
|
||||
@@ -844,10 +818,41 @@ arena_get2(mstate a_tsd, size_t size)
|
||||
mstate a;
|
||||
|
||||
#ifdef PER_THREAD
|
||||
- if ((a = get_free_list ()) == NULL
|
||||
- && (a = reused_arena ()) == NULL)
|
||||
- /* Nothing immediately available, so generate a new arena. */
|
||||
- a = _int_new_arena(size);
|
||||
+ static size_t narenas_limit;
|
||||
+
|
||||
+ a = get_free_list ();
|
||||
+ if (a == NULL)
|
||||
+ {
|
||||
+ /* Nothing immediately available, so generate a new arena. */
|
||||
+ if (narenas_limit == 0)
|
||||
+ {
|
||||
+ if (mp_.arena_max != 0)
|
||||
+ narenas_limit = mp_.arena_max;
|
||||
+ else
|
||||
+ {
|
||||
+ int n = __get_nprocs ();
|
||||
+
|
||||
+ if (n >= 1)
|
||||
+ narenas_limit = NARENAS_FROM_NCORES (n);
|
||||
+ else
|
||||
+ /* We have no information about the system. Assume two
|
||||
+ cores. */
|
||||
+ narenas_limit = NARENAS_FROM_NCORES (2);
|
||||
+ }
|
||||
+ }
|
||||
+ repeat:;
|
||||
+ size_t n = narenas;
|
||||
+ if (__builtin_expect (n <= mp_.arena_test || n < narenas_limit, 0))
|
||||
+ {
|
||||
+ if (catomic_compare_and_exchange_bool_acq(&narenas, n + 1, n))
|
||||
+ goto repeat;
|
||||
+ a = _int_new_arena (size);
|
||||
+ if (__builtin_expect (a != NULL, 1))
|
||||
+ return a;
|
||||
+ catomic_decrement(&narenas);
|
||||
+ }
|
||||
+ a = reused_arena ();
|
||||
+ }
|
||||
#else
|
||||
if(!a_tsd)
|
||||
a = a_tsd = &main_arena;
|
||||
|
||||
commit a5fb313cb7b7e692fd4684916aaa98e03ec7e8b6
|
||||
Author: Andreas Schwab <schwab@redhat.com>
|
||||
Date: Mon Nov 14 11:41:52 2011 +0100
|
||||
|
||||
Don't call reused_arena when _int_new_arena failed
|
||||
|
||||
diff --git a/malloc/arena.c b/malloc/arena.c
|
||||
index 042cac8..cb8548b 100644
|
||||
--- a/malloc/arena.c
|
||||
+++ b/malloc/arena.c
|
||||
@@ -844,14 +844,14 @@ arena_get2(mstate a_tsd, size_t size)
|
||||
size_t n = narenas;
|
||||
if (__builtin_expect (n <= mp_.arena_test || n < narenas_limit, 0))
|
||||
{
|
||||
- if (catomic_compare_and_exchange_bool_acq(&narenas, n + 1, n))
|
||||
+ if (catomic_compare_and_exchange_bool_acq (&narenas, n + 1, n))
|
||||
goto repeat;
|
||||
a = _int_new_arena (size);
|
||||
- if (__builtin_expect (a != NULL, 1))
|
||||
- return a;
|
||||
- catomic_decrement(&narenas);
|
||||
+ if (__builtin_expect (a == NULL, 0))
|
||||
+ catomic_decrement (&narenas);
|
||||
}
|
||||
- a = reused_arena ();
|
||||
+ else
|
||||
+ a = reused_arena ();
|
||||
}
|
||||
#else
|
||||
if(!a_tsd)
|
@ -1,153 +0,0 @@
|
||||
#!/usr/bin/bash
|
||||
# This script can be invoked as follows:
|
||||
#
|
||||
# glibc-bench-compare [options] <BUILD> [BUILD]
|
||||
#
|
||||
# Options may be one of the following:
|
||||
#
|
||||
# -t The BUILD arguments are task ids and not a version-release string
|
||||
# -a ARCH Do comparison for ARCH architecture
|
||||
#
|
||||
# If any of the above options are given, both BUILD arguments must be given.
|
||||
# Otherwise, if only one BUILD is specified, then it is compared against the
|
||||
# installed glibc.
|
||||
|
||||
# Silence the pushd/popd messages
|
||||
pushd() {
|
||||
command pushd "$@" > /dev/null 2>&1
|
||||
}
|
||||
|
||||
popd() {
|
||||
command popd "$@" > /dev/null 2>&1
|
||||
}
|
||||
|
||||
# Clean up any downloaded files before we exit
|
||||
trap "rm -rf /tmp/glibc-bench-compare.$BASHPID.*" EXIT
|
||||
|
||||
task=0
|
||||
arch=$(uname -i)
|
||||
options=0
|
||||
path=0
|
||||
installed=
|
||||
|
||||
# Look for any commandline options
|
||||
while getopts ":tpa:" opt; do
|
||||
case $opt in
|
||||
p)
|
||||
path=1
|
||||
;;
|
||||
t)
|
||||
task=1
|
||||
options=1
|
||||
echo "Not implemented."
|
||||
exit 1
|
||||
;;
|
||||
a)
|
||||
arch=$OPTARG
|
||||
options=1
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Done, now shift all option arguments out.
|
||||
shift $((OPTIND-1))
|
||||
|
||||
if [ $# -gt 2 ] || [ $# -eq 0 ] || [ $# -lt 2 -a $options -eq 1 ]; then
|
||||
echo "Usage: $0 [OPTIONS] <old> [new]"
|
||||
echo
|
||||
echo "OPTIONS:"
|
||||
echo -e "\t-t\tCompare two brew tasks"
|
||||
echo -e "\t-a ARCH\tGet rpms for the ARCH architecture"
|
||||
echo -e "\t-p\tCompare built rpms in two paths."
|
||||
echo -e "\t\tThis minimally needs glibc, glibc-common and glibc-benchtests"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z $2 ]; then
|
||||
new="$1"
|
||||
old=$(rpm --queryformat "%{VERSION}-%{RELEASE}\n" -q glibc | head -1)
|
||||
installed=$old
|
||||
else
|
||||
new="$2"
|
||||
old="$1"
|
||||
fi
|
||||
|
||||
decompress_rpms() {
|
||||
# We were given a path to the rpms. Figure out the version-release and
|
||||
# decompress the rpms.
|
||||
if [ -n $1 ]; then
|
||||
vr=$(rpm --queryformat="%{VERSION}-%{RELEASE}" -qp $1/glibc-2*.rpm | head -1)
|
||||
mkdir $vr && pushd $vr
|
||||
fi
|
||||
|
||||
for r in $1*.rpm; do
|
||||
( rpm2cpio $r | cpio -di ) > /dev/null
|
||||
done
|
||||
|
||||
if [ -n $1 ]; then
|
||||
popd
|
||||
echo $vr
|
||||
fi
|
||||
}
|
||||
|
||||
# Get rpms for a build and decompress them
|
||||
get_build() {
|
||||
echo "Processing build $1"
|
||||
mkdir $1 && pushd $1
|
||||
brew buildinfo "glibc-$1" |
|
||||
sed -n -e "s|/mnt/koji\(.\+$arch.\+\)|http://kojipkgs.fedoraproject.org\1|p" |
|
||||
while read url; do
|
||||
echo "Downloading $url"
|
||||
wget -q $url
|
||||
done
|
||||
decompress_rpms
|
||||
|
||||
echo "Removing rpms"
|
||||
rm -f $1/*.rpm
|
||||
|
||||
popd
|
||||
}
|
||||
|
||||
# Run benchmarks for a build
|
||||
run_bench() {
|
||||
if [ -z $1 ]; then
|
||||
make DETAILED=1 ver=$installed prefix= -f /usr/libexec/glibc-benchtests/bench.mk bench
|
||||
else
|
||||
make DETAILED=1 ver=$1 prefix=$PWD -f $1/usr/libexec/glibc-benchtests/bench.mk bench
|
||||
fi
|
||||
}
|
||||
|
||||
# Get absolute paths if needed, since we will change into the working directory
|
||||
# next.
|
||||
if [ $path -eq 1 ]; then
|
||||
old_path=$(realpath $old)/
|
||||
new_path=$(realpath $new)/
|
||||
fi
|
||||
|
||||
tmpdir=$(mktemp -p /tmp -d glibc-bench-compare.$$.XXXX)
|
||||
pushd $tmpdir
|
||||
|
||||
# Get both builds.
|
||||
if [ $path -eq 0 ]; then
|
||||
if [ -z $installed ]; then
|
||||
get_build $old
|
||||
fi
|
||||
get_build $new
|
||||
else
|
||||
old=$(decompress_rpms $old_path)
|
||||
new=$(decompress_rpms $new_path)
|
||||
fi
|
||||
|
||||
# make bench for each of those.
|
||||
if [ -z $installed ]; then
|
||||
run_bench $old
|
||||
else
|
||||
run_bench
|
||||
fi
|
||||
run_bench $new
|
||||
|
||||
# Now run the comparison script.
|
||||
$old/usr/libexec/glibc-benchtests/compare_bench.py $old/usr/libexec/glibc-benchtests/benchout.schema.json \
|
||||
bench.$old.out bench.$new.out
|
@ -1,286 +0,0 @@
|
||||
Short description: Add C.UTF-8 support.
|
||||
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
|
||||
Origin: PATCH
|
||||
Upstream status: not-submitted
|
||||
|
||||
This patch needs to upstream as part of Carlos O'Donell
|
||||
<carlos@redhat.com>'s work on enabling upstream C.UTF-8 support. This
|
||||
work is currently blocked on cleaning up the test results to prove that
|
||||
full code-point sorting is working as intended.
|
||||
|
||||
Note that this patch does not provide full code-point sorting as
|
||||
expected.
|
||||
|
||||
This patch needs to upstream as soon as possible since it would be nice
|
||||
to have this in F29 and fixed.
|
||||
|
||||
From 2eda7b462b415105f5a05c1323372d4e39d46439 Mon Sep 17 00:00:00 2001
|
||||
From: Mike FABIAN <mfabian@redhat.com>
|
||||
Date: Mon, 10 Aug 2015 15:58:12 +0200
|
||||
Subject: [PATCH] Add a C.UTF-8 locale
|
||||
|
||||
---
|
||||
localedata/SUPPORTED | 1 +
|
||||
localedata/locales/C | 238 +++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 239 insertions(+)
|
||||
create mode 100644 localedata/locales/C
|
||||
|
||||
diff --git a/localedata/SUPPORTED b/localedata/SUPPORTED
|
||||
index 8ca023e..2a78391 100644
|
||||
--- a/localedata/SUPPORTED
|
||||
+++ b/localedata/SUPPORTED
|
||||
@@ -1,6 +1,7 @@
|
||||
# This file names the currently supported and somewhat tested locales.
|
||||
# If you have any additions please file a glibc bug report.
|
||||
SUPPORTED-LOCALES=\
|
||||
+C.UTF-8/UTF-8 \
|
||||
aa_DJ.UTF-8/UTF-8 \
|
||||
aa_DJ/ISO-8859-1 \
|
||||
aa_ER/UTF-8 \
|
||||
diff --git a/localedata/locales/C b/localedata/locales/C
|
||||
new file mode 100644
|
||||
index 0000000..fdf460e
|
||||
--- /dev/null
|
||||
+++ b/localedata/locales/C
|
||||
@@ -0,0 +1,238 @@
|
||||
+escape_char /
|
||||
+comment_char %
|
||||
+% Locale for C locale in UTF-8
|
||||
+
|
||||
+LC_IDENTIFICATION
|
||||
+title "C locale"
|
||||
+source ""
|
||||
+address ""
|
||||
+contact ""
|
||||
+email "mfabian@redhat.com"
|
||||
+tel ""
|
||||
+fax ""
|
||||
+language "C"
|
||||
+territory ""
|
||||
+revision "1.0"
|
||||
+date "2015-08-10"
|
||||
+%
|
||||
+category "i18n:2012";LC_IDENTIFICATION
|
||||
+category "i18n:2012";LC_CTYPE
|
||||
+category "i18n:2012";LC_COLLATE
|
||||
+category "i18n:2012";LC_TIME
|
||||
+category "i18n:2012";LC_NUMERIC
|
||||
+category "i18n:2012";LC_MONETARY
|
||||
+category "i18n:2012";LC_MESSAGES
|
||||
+category "i18n:2012";LC_PAPER
|
||||
+category "i18n:2012";LC_NAME
|
||||
+category "i18n:2012";LC_ADDRESS
|
||||
+category "i18n:2012";LC_TELEPHONE
|
||||
+category "i18n:2012";LC_MEASUREMENT
|
||||
+END LC_IDENTIFICATION
|
||||
+
|
||||
+LC_CTYPE
|
||||
+copy "i18n"
|
||||
+
|
||||
+translit_start
|
||||
+include "translit_combining";""
|
||||
+translit_end
|
||||
+
|
||||
+END LC_CTYPE
|
||||
+
|
||||
+LC_COLLATE
|
||||
+order_start forward
|
||||
+<U0000>
|
||||
+..
|
||||
+<UFFFF>
|
||||
+<U00010000>
|
||||
+..
|
||||
+<U0001FFFF>
|
||||
+<U00020000>
|
||||
+..
|
||||
+<U0002FFFF>
|
||||
+<U000E0000>
|
||||
+..
|
||||
+<U000EFFFF>
|
||||
+<U000F0000>
|
||||
+..
|
||||
+<U000FFFFF>
|
||||
+<U00100000>
|
||||
+..
|
||||
+<U0010FFFF>
|
||||
+UNDEFINED
|
||||
+order_end
|
||||
+END LC_COLLATE
|
||||
+
|
||||
+LC_MONETARY
|
||||
+% This is the 14652 i18n fdcc-set definition for
|
||||
+% the LC_MONETARY category
|
||||
+% (except for the int_curr_symbol and currency_symbol, they are empty in
|
||||
+% the 14652 i18n fdcc-set definition and also empty in
|
||||
+% glibc/locale/C-monetary.c. But localedef complains in that case).
|
||||
+%
|
||||
+% Using "USD" for int_curr_symbol. But maybe "XXX" would be better?
|
||||
+% XXX is "No currency" (https://en.wikipedia.org/wiki/ISO_4217)
|
||||
+int_curr_symbol "<U0055><U0053><U0044><U0020>"
|
||||
+% Using "$" for currency_symbol. But maybe <U00A4> would be better?
|
||||
+% U+00A4 is the "generic currency symbol"
|
||||
+% (https://en.wikipedia.org/wiki/Currency_sign_%28typography%29)
|
||||
+currency_symbol "<U0024>"
|
||||
+mon_decimal_point "<U002E>"
|
||||
+mon_thousands_sep ""
|
||||
+mon_grouping -1
|
||||
+positive_sign ""
|
||||
+negative_sign "<U002D>"
|
||||
+int_frac_digits -1
|
||||
+frac_digits -1
|
||||
+p_cs_precedes -1
|
||||
+int_p_sep_by_space -1
|
||||
+p_sep_by_space -1
|
||||
+n_cs_precedes -1
|
||||
+int_n_sep_by_space -1
|
||||
+n_sep_by_space -1
|
||||
+p_sign_posn -1
|
||||
+n_sign_posn -1
|
||||
+%
|
||||
+END LC_MONETARY
|
||||
+
|
||||
+LC_NUMERIC
|
||||
+% This is the POSIX Locale definition for
|
||||
+% the LC_NUMERIC category.
|
||||
+%
|
||||
+decimal_point "<U002E>"
|
||||
+thousands_sep ""
|
||||
+grouping -1
|
||||
+END LC_NUMERIC
|
||||
+
|
||||
+LC_TIME
|
||||
+% This is the POSIX Locale definition for
|
||||
+% the LC_TIME category.
|
||||
+%
|
||||
+% Abbreviated weekday names (%a)
|
||||
+abday "<U0053><U0075><U006E>";"<U004D><U006F><U006E>";/
|
||||
+ "<U0054><U0075><U0065>";"<U0057><U0065><U0064>";/
|
||||
+ "<U0054><U0068><U0075>";"<U0046><U0072><U0069>";/
|
||||
+ "<U0053><U0061><U0074>"
|
||||
+
|
||||
+% Full weekday names (%A)
|
||||
+day "<U0053><U0075><U006E><U0064><U0061><U0079>";/
|
||||
+ "<U004D><U006F><U006E><U0064><U0061><U0079>";/
|
||||
+ "<U0054><U0075><U0065><U0073><U0064><U0061><U0079>";/
|
||||
+ "<U0057><U0065><U0064><U006E><U0065><U0073><U0064><U0061><U0079>";/
|
||||
+ "<U0054><U0068><U0075><U0072><U0073><U0064><U0061><U0079>";/
|
||||
+ "<U0046><U0072><U0069><U0064><U0061><U0079>";/
|
||||
+ "<U0053><U0061><U0074><U0075><U0072><U0064><U0061><U0079>"
|
||||
+
|
||||
+% Abbreviated month names (%b)
|
||||
+abmon "<U004A><U0061><U006E>";"<U0046><U0065><U0062>";/
|
||||
+ "<U004D><U0061><U0072>";"<U0041><U0070><U0072>";/
|
||||
+ "<U004D><U0061><U0079>";"<U004A><U0075><U006E>";/
|
||||
+ "<U004A><U0075><U006C>";"<U0041><U0075><U0067>";/
|
||||
+ "<U0053><U0065><U0070>";"<U004F><U0063><U0074>";/
|
||||
+ "<U004E><U006F><U0076>";"<U0044><U0065><U0063>"
|
||||
+
|
||||
+% Full month names (%B)
|
||||
+mon "<U004A><U0061><U006E><U0075><U0061><U0072><U0079>";/
|
||||
+ "<U0046><U0065><U0062><U0072><U0075><U0061><U0072><U0079>";/
|
||||
+ "<U004D><U0061><U0072><U0063><U0068>";/
|
||||
+ "<U0041><U0070><U0072><U0069><U006C>";/
|
||||
+ "<U004D><U0061><U0079>";/
|
||||
+ "<U004A><U0075><U006E><U0065>";/
|
||||
+ "<U004A><U0075><U006C><U0079>";/
|
||||
+ "<U0041><U0075><U0067><U0075><U0073><U0074>";/
|
||||
+ "<U0053><U0065><U0070><U0074><U0065><U006D><U0062><U0065><U0072>";/
|
||||
+ "<U004F><U0063><U0074><U006F><U0062><U0065><U0072>";/
|
||||
+ "<U004E><U006F><U0076><U0065><U006D><U0062><U0065><U0072>";/
|
||||
+ "<U0044><U0065><U0063><U0065><U006D><U0062><U0065><U0072>"
|
||||
+
|
||||
+% Week description, consists of three fields:
|
||||
+% 1. Number of days in a week.
|
||||
+% 2. Gregorian date that is a first weekday (19971130 for Sunday, 19971201 for Monday).
|
||||
+% 3. The weekday number to be contained in the first week of the year.
|
||||
+%
|
||||
+% ISO 8601 conforming applications should use the values 7, 19971201 (a
|
||||
+% Monday), and 4 (Thursday), respectively.
|
||||
+week 7;19971201;4
|
||||
+first_weekday 1
|
||||
+first_workday 1
|
||||
+
|
||||
+% Appropriate date and time representation (%c)
|
||||
+% "%a %b %e %H:%M:%S %Y"
|
||||
+d_t_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065><U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0059>"
|
||||
+
|
||||
+% Appropriate date representation (%x)
|
||||
+% "%m/%d/%y"
|
||||
+d_fmt "<U0025><U006D><U002F><U0025><U0064><U002F><U0025><U0079>"
|
||||
+
|
||||
+% Appropriate time representation (%X)
|
||||
+% "%H:%M:%S"
|
||||
+t_fmt "<U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053>"
|
||||
+
|
||||
+% Appropriate AM/PM time representation (%r)
|
||||
+% "%I:%M:%S %p"
|
||||
+t_fmt_ampm "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0070>"
|
||||
+
|
||||
+% Equivalent of AM/PM (%p) "AM"/"PM"
|
||||
+%
|
||||
+am_pm "<U0041><U004D>";"<U0050><U004D>"
|
||||
+
|
||||
+% Appropriate date representation (date(1)) "%a %b %e %H:%M:%S %Z %Y"
|
||||
+date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065><U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U005A><U0020><U0025><U0059>"
|
||||
+END LC_TIME
|
||||
+
|
||||
+LC_MESSAGES
|
||||
+% This is the POSIX Locale definition for
|
||||
+% the LC_NUMERIC category.
|
||||
+%
|
||||
+yesexpr "<U005E><U005B><U0079><U0059><U005D>"
|
||||
+noexpr "<U005E><U005B><U006E><U004E><U005D>"
|
||||
+yesstr "<U0059><U0065><U0073>"
|
||||
+nostr "<U004E><U006F>"
|
||||
+END LC_MESSAGES
|
||||
+
|
||||
+LC_PAPER
|
||||
+% This is the ISO/IEC 14652 "i18n" definition for
|
||||
+% the LC_PAPER category.
|
||||
+% (A4 paper, this is also used in the built in C/POSIX
|
||||
+% locale in glibc/locale/C-paper.c)
|
||||
+height 297
|
||||
+width 210
|
||||
+END LC_PAPER
|
||||
+
|
||||
+LC_NAME
|
||||
+% This is the ISO/IEC 14652 "i18n" definition for
|
||||
+% the LC_NAME category.
|
||||
+% "%p%t%g%t%m%t%f"
|
||||
+% (also used in the built in C/POSIX locale in glibc/locale/C-name.c)
|
||||
+name_fmt "<U0025><U0070><U0025><U0074><U0025><U0067><U0025><U0074>/
|
||||
+<U0025><U006D><U0025><U0074><U0025><U0066>"
|
||||
+END LC_NAME
|
||||
+
|
||||
+LC_ADDRESS
|
||||
+% This is the ISO/IEC 14652 "i18n" definition for
|
||||
+% the LC_ADDRESS category.
|
||||
+% "%a%N%f%N%d%N%b%N%s %h %e %r%N%C-%z %T%N%c%N"
|
||||
+% (also used in the built in C/POSIX locale in glibc/locale/C-address.c)
|
||||
+postal_fmt "<U0025><U0061><U0025><U004E><U0025><U0066><U0025><U004E>/
|
||||
+<U0025><U0064><U0025><U004E><U0025><U0062><U0025><U004E><U0025><U0073>/
|
||||
+<U0020><U0025><U0068><U0020><U0025><U0065><U0020><U0025><U0072><U0025>/
|
||||
+<U004E><U0025><U0043><U002D><U0025><U007A><U0020><U0025><U0054><U0025>/
|
||||
+<U004E><U0025><U0063><U0025><U004E>"
|
||||
+END LC_ADDRESS
|
||||
+
|
||||
+LC_TELEPHONE
|
||||
+% This is the ISO/IEC 14652 "i18n" definition for
|
||||
+% the LC_TELEPHONE category.
|
||||
+% "+%c %a %l"
|
||||
+tel_int_fmt "<U002B><U0025><U0063><U0020><U0025><U0061><U0020><U0025>/
|
||||
+<U006C>"
|
||||
+% (also used in the built in C/POSIX locale in glibc/locale/C-telephone.c)
|
||||
+END LC_TELEPHONE
|
||||
+
|
||||
+LC_MEASUREMENT
|
||||
+% This is the ISO/IEC 14652 "i18n" definition for
|
||||
+% the LC_MEASUREMENT category.
|
||||
+% (same as in the built in C/POSIX locale in glibc/locale/C-measurement.c)
|
||||
+%metric
|
||||
+measurement 1
|
||||
+END LC_MEASUREMENT
|
||||
+
|
||||
--
|
||||
2.4.3
|
||||
|
@ -1,15 +0,0 @@
|
||||
Short description: Adjust CS_PATH return value.
|
||||
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
|
||||
Origin: PATCH
|
||||
Upstream status: not-needed
|
||||
|
||||
In Fedora we should return only /usr/bin because /bin is just a symlink
|
||||
to /usr/bin after MoveToUsr transition (which glibc has not really
|
||||
completed).
|
||||
|
||||
diff -pruN a/sysdeps/unix/confstr.h b/sysdeps/unix/confstr.h
|
||||
--- a/sysdeps/unix/confstr.h 2012-12-25 08:32:13.000000000 +0530
|
||||
+++ b/sysdeps/unix/confstr.h 2014-09-05 20:02:55.698275219 +0530
|
||||
@@ -1 +1 @@
|
||||
-#define CS_PATH "/bin:/usr/bin"
|
||||
+#define CS_PATH "/usr/bin"
|
33
glibc-fdelt.patch
Normal file
33
glibc-fdelt.patch
Normal file
@ -0,0 +1,33 @@
|
||||
commit d4cc29a254db6bd3838aac79d9d0e91cfd467c9d
|
||||
Author: Andreas Schwab <schwab@redhat.com>
|
||||
Date: Fri Dec 2 11:34:28 2011 +0100
|
||||
|
||||
Mark fortified __FD_ELT as extension
|
||||
|
||||
diff --git a/ChangeLog b/ChangeLog
|
||||
index dddb628..e512bbb 100644
|
||||
--- a/ChangeLog
|
||||
+++ b/ChangeLog
|
||||
@@ -1,3 +1,8 @@
|
||||
+2011-12-02 Andreas Schwab <schwab@redhat.com>
|
||||
+
|
||||
+ * misc/bits/select2.h (__FD_ELT): Mark as extension. Add
|
||||
+ parenthesis.
|
||||
+
|
||||
2011-11-29 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* locale/weight.h (findidx): Add parameter len.
|
||||
diff --git a/misc/bits/select2.h b/misc/bits/select2.h
|
||||
index 37c4827..a7ce1b4 100644
|
||||
--- a/misc/bits/select2.h
|
||||
+++ b/misc/bits/select2.h
|
||||
@@ -27,7 +27,8 @@ extern unsigned long int __fdelt_warn (unsigned long int __d)
|
||||
__warnattr ("bit outside of fd_set selected");
|
||||
#undef __FD_ELT
|
||||
#define __FD_ELT(d) \
|
||||
- ({ unsigned long int __d = d; \
|
||||
+ __extension__ \
|
||||
+ ({ unsigned long int __d = (d); \
|
||||
(__builtin_constant_p (__d) \
|
||||
? (__d >= __FD_SETSIZE \
|
||||
? __fdelt_warn (__d) : (__d / __NFDBITS)) \
|
@ -1,91 +0,0 @@
|
||||
Short description: Cleanup use of _dl_starting_up.
|
||||
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
|
||||
Origin: PATCH
|
||||
Upstream status: https://sourceware.org/ml/libc-alpha/2014-02/msg00589.html
|
||||
|
||||
Upstream discussions:
|
||||
https://sourceware.org/ml/libc-alpha/2014-02/msg00580.html
|
||||
|
||||
Based on the following commit:
|
||||
~~~
|
||||
From 16552c01a66633c9e412984d9d92616bd4e5303c Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Schwab <schwab@redhat.com>
|
||||
Date: Fri, 11 Jun 2010 11:04:11 +0200
|
||||
Subject: [PATCH] Properly set __libc_multiple_libcs
|
||||
|
||||
* elf/rtld.c (_dl_starting_up): Always define.
|
||||
(dl_main): Always set _dl_starting_up.
|
||||
* elf/dl-support.c (_dl_starting_up): Always define.
|
||||
* elf/dl-init.c (_dl_init): Always clear _dl_starting_up.
|
||||
|
||||
---
|
||||
ChangeLog | 7 +++++++
|
||||
elf/dl-init.c | 4 ----
|
||||
elf/dl-support.c | 2 --
|
||||
elf/rtld.c | 4 ----
|
||||
4 files changed, 7 insertions(+), 10 deletions(-)
|
||||
~~~
|
||||
|
||||
This patch needs to go upstream to get cleaned up, but has always involed
|
||||
analysis of the GNU/Hurd parts of the change and that stalled out, but
|
||||
perhaps with build-many-glibcs we can now test these changes more easily.
|
||||
|
||||
Index: b/elf/dl-init.c
|
||||
===================================================================
|
||||
--- a/elf/dl-init.c
|
||||
+++ b/elf/dl-init.c
|
||||
@@ -119,8 +119,6 @@ _dl_init (struct link_map *main_map, int
|
||||
while (i-- > 0)
|
||||
call_init (main_map->l_initfini[i], argc, argv, env);
|
||||
|
||||
-#ifndef HAVE_INLINED_SYSCALLS
|
||||
/* Finished starting up. */
|
||||
_dl_starting_up = 0;
|
||||
-#endif
|
||||
}
|
||||
Index: b/elf/dl-support.c
|
||||
===================================================================
|
||||
--- a/elf/dl-support.c
|
||||
+++ b/elf/dl-support.c
|
||||
@@ -117,10 +117,8 @@ struct r_scope_elem _dl_initial_searchli
|
||||
.r_nlist = 1,
|
||||
};
|
||||
|
||||
-#ifndef HAVE_INLINED_SYSCALLS
|
||||
/* Nonzero during startup. */
|
||||
int _dl_starting_up = 1;
|
||||
-#endif
|
||||
|
||||
/* Random data provided by the kernel. */
|
||||
void *_dl_random;
|
||||
Index: b/elf/rtld.c
|
||||
===================================================================
|
||||
--- a/elf/rtld.c
|
||||
+++ b/elf/rtld.c
|
||||
@@ -214,7 +214,6 @@ audit_list_iter_next (struct audit_list_
|
||||
return iter->previous->name;
|
||||
}
|
||||
|
||||
-#ifndef HAVE_INLINED_SYSCALLS
|
||||
/* Set nonzero during loading and initialization of executable and
|
||||
libraries, cleared before the executable's entry point runs. This
|
||||
must not be initialized to nonzero, because the unused dynamic
|
||||
@@ -224,7 +223,6 @@ audit_list_iter_next (struct audit_list_
|
||||
never be called. */
|
||||
int _dl_starting_up = 0;
|
||||
rtld_hidden_def (_dl_starting_up)
|
||||
-#endif
|
||||
|
||||
/* This is the structure which defines all variables global to ld.so
|
||||
(except those which cannot be added for some reason). */
|
||||
@@ -898,10 +896,8 @@ dl_main (const ElfW(Phdr) *phdr,
|
||||
/* Process the environment variable which control the behaviour. */
|
||||
process_envvars (&mode);
|
||||
|
||||
-#ifndef HAVE_INLINED_SYSCALLS
|
||||
/* Set up a flag which tells we are just starting. */
|
||||
_dl_starting_up = 1;
|
||||
-#endif
|
||||
|
||||
if (*user_entry == (ElfW(Addr)) ENTRY_POINT)
|
||||
{
|
@ -1,61 +0,0 @@
|
||||
Short description: Fedora-specific workaround for kernel pty bug.
|
||||
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
|
||||
Origin: PATCH
|
||||
Upstream status: not-submitted
|
||||
|
||||
This is a Fedora-specific workaround for a kernel bug where calling
|
||||
ioctl on a pty will silently ignore the invalid c_cflag. The
|
||||
workaround is to use TCGETS to verify the setting matches. This is
|
||||
not upstream and needs to either be removed or submitted upstream
|
||||
after analysis.
|
||||
|
||||
Index: b/sysdeps/unix/sysv/linux/tcsetattr.c
|
||||
===================================================================
|
||||
--- a/sysdeps/unix/sysv/linux/tcsetattr.c
|
||||
+++ b/sysdeps/unix/sysv/linux/tcsetattr.c
|
||||
@@ -45,6 +45,7 @@ __tcsetattr (int fd, int optional_action
|
||||
{
|
||||
struct __kernel_termios k_termios;
|
||||
unsigned long int cmd;
|
||||
+ int retval;
|
||||
|
||||
switch (optional_actions)
|
||||
{
|
||||
@@ -75,7 +76,36 @@ __tcsetattr (int fd, int optional_action
|
||||
memcpy (&k_termios.c_cc[0], &termios_p->c_cc[0],
|
||||
__KERNEL_NCCS * sizeof (cc_t));
|
||||
|
||||
- return INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios);
|
||||
+ retval = INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios);
|
||||
+
|
||||
+ if (retval == 0 && cmd == TCSETS)
|
||||
+ {
|
||||
+ /* The Linux kernel has a bug which silently ignore the invalid
|
||||
+ c_cflag on pty. We have to check it here. */
|
||||
+ int save = errno;
|
||||
+ retval = INLINE_SYSCALL (ioctl, 3, fd, TCGETS, &k_termios);
|
||||
+ if (retval)
|
||||
+ {
|
||||
+ /* We cannot verify if the setting is ok. We don't return
|
||||
+ an error (?). */
|
||||
+ __set_errno (save);
|
||||
+ retval = 0;
|
||||
+ }
|
||||
+ else if ((termios_p->c_cflag & (PARENB | CREAD))
|
||||
+ != (k_termios.c_cflag & (PARENB | CREAD))
|
||||
+ || ((termios_p->c_cflag & CSIZE)
|
||||
+ && ((termios_p->c_cflag & CSIZE)
|
||||
+ != (k_termios.c_cflag & CSIZE))))
|
||||
+ {
|
||||
+ /* It looks like the Linux kernel silently changed the
|
||||
+ PARENB/CREAD/CSIZE bits in c_cflag. Report it as an
|
||||
+ error. */
|
||||
+ __set_errno (EINVAL);
|
||||
+ retval = -1;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return retval;
|
||||
}
|
||||
weak_alias (__tcsetattr, tcsetattr)
|
||||
libc_hidden_def (tcsetattr)
|
@ -1,49 +0,0 @@
|
||||
Short description: Add 4 ISO-8859-15 locales to SUPPORTED for Euro symbol.
|
||||
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
|
||||
Origin: PATCH
|
||||
Bug-RHEL: #61908
|
||||
Upstream status: not-needed
|
||||
|
||||
Very early RHL 7.3 requirement to add these locales so users can
|
||||
get access to Euro symbol. We should review this bug and decide if
|
||||
the UTF-8 locales are now serving the same purpose and drop the
|
||||
additional locales.
|
||||
|
||||
* Tue Mar 26 2002 Jakub Jelinek <jakub@redhat.com> 2.2.5-28
|
||||
- add a couple of .ISO-8859-15 locales (#61908)
|
||||
|
||||
diff -Nrup a/localedata/SUPPORTED b/localedata/SUPPORTED
|
||||
--- a/localedata/SUPPORTED 2012-11-25 12:59:31.000000000 -0700
|
||||
+++ b/localedata/SUPPORTED 2012-11-26 12:58:43.298223018 -0700
|
||||
@@ -89,6 +89,7 @@ cy_GB.UTF-8/UTF-8 \
|
||||
cy_GB/ISO-8859-14 \
|
||||
da_DK.UTF-8/UTF-8 \
|
||||
da_DK/ISO-8859-1 \
|
||||
+da_DK.ISO-8859-15/ISO-8859-15 \
|
||||
de_AT.UTF-8/UTF-8 \
|
||||
de_AT/ISO-8859-1 \
|
||||
de_AT@euro/ISO-8859-15 \
|
||||
@@ -121,6 +122,7 @@ en_DK.UTF-8/UTF-8 \
|
||||
en_DK/ISO-8859-1 \
|
||||
en_GB.UTF-8/UTF-8 \
|
||||
en_GB/ISO-8859-1 \
|
||||
+en_GB.ISO-8859-15/ISO-8859-15 \
|
||||
en_HK.UTF-8/UTF-8 \
|
||||
en_HK/ISO-8859-1 \
|
||||
en_IE.UTF-8/UTF-8 \
|
||||
@@ -136,6 +138,7 @@ en_SG.UTF-8/UTF-8 \
|
||||
en_SG/ISO-8859-1 \
|
||||
en_US.UTF-8/UTF-8 \
|
||||
en_US/ISO-8859-1 \
|
||||
+en_US.ISO-8859-15/ISO-8859-15 \
|
||||
en_ZA.UTF-8/UTF-8 \
|
||||
en_ZA/ISO-8859-1 \
|
||||
en_ZM/UTF-8 \
|
||||
@@ -385,6 +388,7 @@ sv_FI/ISO-8859-1 \
|
||||
sv_FI@euro/ISO-8859-15 \
|
||||
sv_SE.UTF-8/UTF-8 \
|
||||
sv_SE/ISO-8859-1 \
|
||||
+sv_SE.ISO-8859-15/ISO-8859-15 \
|
||||
sw_KE/UTF-8 \
|
||||
sw_TZ/UTF-8 \
|
||||
szl_PL/UTF-8 \
|
@ -1,21 +0,0 @@
|
||||
Short description: Fedora-specific glibc install locale changes.
|
||||
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
|
||||
Origin: PATCH
|
||||
Upstream status: not-needed
|
||||
|
||||
The Fedora glibc build and install does not need the normal install
|
||||
behaviour which updates the locale archive. The Fedora install phase
|
||||
in the spec file of the rpm will handle this manually.
|
||||
|
||||
diff --git a/localedata/Makefile b/localedata/Makefile
|
||||
index 0eea396ad86da956..54caabda33728207 100644
|
||||
--- a/localedata/Makefile
|
||||
+++ b/localedata/Makefile
|
||||
@@ -413,6 +413,7 @@ define build-one-locale
|
||||
echo -n '...'; \
|
||||
input=`echo $$locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; \
|
||||
$(LOCALEDEF) $$flags --alias-file=../intl/locale.alias \
|
||||
+ --no-archive \
|
||||
-i locales/$$input -f charmaps/$$charset \
|
||||
$(addprefix --prefix=,$(install_root)) $$locale \
|
||||
&& echo ' done';
|
@ -1,31 +0,0 @@
|
||||
Short description: Place glibc info into "Libraries" category.
|
||||
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
|
||||
Origin: PATCH
|
||||
Upstream status: not-needed
|
||||
|
||||
The category names for libraries is completely random including
|
||||
"Libraries", "GNU Libraries", "GNU libraries", and "Software libraries."
|
||||
In the GNU info manual the "Software libraries" category is given as an
|
||||
example, but really we need to standardize on a category for upstream.
|
||||
I suggest we drop this change after some upstream discussion.
|
||||
|
||||
From 4820b9175535e13df79ce816106016040014916e Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Jelinek <jakub@redhat.com>
|
||||
Date: Fri, 3 Nov 2006 16:31:21 +0000
|
||||
Subject: [PATCH] Change @dircategory.
|
||||
|
||||
---
|
||||
manual/libc.texinfo | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
--- a/manual/libc.texinfo
|
||||
+++ b/manual/libc.texinfo
|
||||
@@ -7,7 +7,7 @@
|
||||
@include macros.texi
|
||||
|
||||
@comment Tell install-info what to do.
|
||||
-@dircategory Software libraries
|
||||
+@dircategory Libraries
|
||||
@direntry
|
||||
* Libc: (libc). C library.
|
||||
@end direntry
|
@ -1,31 +0,0 @@
|
||||
Short description: Fedora-specific enabling batch read in NSS.
|
||||
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
|
||||
Origin: PATCH
|
||||
Bug-RHEL: #188246
|
||||
Upstream status: not-submitted
|
||||
|
||||
Enable batch read in NSS. It's not clear if this is always a win or
|
||||
just a win for NIS+, this needs to be analyzed and sent upstream or
|
||||
removed.
|
||||
|
||||
From baba5d9461d4e8a581ac26fe4412ad783ffc73e7 Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Jelinek <jakub@redhat.com>
|
||||
Date: Mon, 1 May 2006 08:02:53 +0000
|
||||
Subject: [PATCH] Enable SETENT_BATCH_READ nis/nss option by default
|
||||
|
||||
* Mon May 1 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-4
|
||||
- SETENT_BATCH_READ /etc/default/nss option for speeding up
|
||||
some usages of NIS+ (#188246)
|
||||
|
||||
diff --git a/nis/nss b/nis/nss
|
||||
--- a/nis/nss
|
||||
+++ b/nis/nss
|
||||
@@ -25,7 +25,7 @@
|
||||
# memory with every getXXent() call. Otherwise each getXXent() call
|
||||
# might result into a network communication with the server to get
|
||||
# the next entry.
|
||||
-#SETENT_BATCH_READ=TRUE
|
||||
+SETENT_BATCH_READ=TRUE
|
||||
#
|
||||
# ADJUNCT_AS_SHADOW
|
||||
# If set to TRUE, the passwd routines in the NIS NSS module will not
|
@ -1,20 +0,0 @@
|
||||
Short description: NSCD must use nscd user.
|
||||
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
|
||||
Origin: PATCH
|
||||
Upstream status: not-needed
|
||||
|
||||
Fedora-specific configuration adjustment to introduce the nscd user.
|
||||
(Upstream does not assume this user exists.)
|
||||
|
||||
diff -Nrup a/nscd/nscd.conf b/nscd/nscd.conf
|
||||
--- a/nscd/nscd.conf 2012-06-05 07:42:49.000000000 -0600
|
||||
+++ b/nscd/nscd.conf 2012-06-07 12:15:21.818318670 -0600
|
||||
@@ -33,7 +33,7 @@
|
||||
# logfile /var/log/nscd.log
|
||||
# threads 4
|
||||
# max-threads 32
|
||||
-# server-user nobody
|
||||
+ server-user nscd
|
||||
# stat-user somebody
|
||||
debug-level 0
|
||||
# reload-count 5
|
@ -1,45 +0,0 @@
|
||||
The Fedora /etc/nsswitch.conf is based largely on the upstream
|
||||
version with minor downstream distribution modifications for
|
||||
use with SSSD and systemd.
|
||||
|
||||
diff --git a/nss/nsswitch.conf b/nss/nsswitch.conf
|
||||
index f55358811495c9f1..14c3cde8080a848c 100644
|
||||
--- a/nss/nsswitch.conf
|
||||
+++ b/nss/nsswitch.conf
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# /etc/nsswitch.conf
|
||||
#
|
||||
-# An example Name Service Switch config file. This file should be
|
||||
+# Name Service Switch config file. This file should be
|
||||
# sorted with the most-used services at the beginning.
|
||||
#
|
||||
# Valid databases are: aliases, ethers, group, gshadow, hosts,
|
||||
@@ -52,18 +52,20 @@
|
||||
# shadow: db files
|
||||
# group: db files
|
||||
|
||||
-# In alphabetical order. Re-order as required to optimize peformance.
|
||||
+# In order of likelihood of use to accelerate lookup.
|
||||
+passwd: sss files
|
||||
+shadow: files sss
|
||||
+group: sss files
|
||||
+hosts: files dns myhostname
|
||||
+services: files sss
|
||||
+netgroup: sss
|
||||
+automount: files sss
|
||||
+
|
||||
aliases: files
|
||||
ethers: files
|
||||
-group: files
|
||||
gshadow: files
|
||||
-hosts: files dns
|
||||
initgroups: files
|
||||
-netgroup: files
|
||||
networks: files dns
|
||||
-passwd: files
|
||||
protocols: files
|
||||
publickey: files
|
||||
rpc: files
|
||||
-shadow: files
|
||||
-services: files
|
4533
glibc-fedora.patch
Normal file
4533
glibc-fedora.patch
Normal file
File diff suppressed because it is too large
Load Diff
92
glibc-ia64-lib64.patch
Normal file
92
glibc-ia64-lib64.patch
Normal file
@ -0,0 +1,92 @@
|
||||
2004-05-14 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/configure.in: Use */lib64 even for ia64.
|
||||
* sysdeps/unix/sysv/linux/configure: Rebuilt.
|
||||
* sysdeps/unix/sysv/linux/ia64/dl-procinfo.c: New file.
|
||||
* sysdeps/unix/sysv/linux/ia64/dl-procinfo.h: New file.
|
||||
* sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed: Change /lib64/ld*
|
||||
into /lib/ld*. Add LD_LIBRARY_VERSION.
|
||||
* sysdeps/unix/sysv/linux/ia64/ldconfig.h
|
||||
(SYSDEP_KNOWN_INTERPRETER_NAMES): Add /lib64/ld-linux-ia64.so.2.
|
||||
* sysdeps/unix/sysv/linux/ia64/dl-cache.h: Include sparc-linux
|
||||
dl-cache.h instead of generic dl-cache.h.
|
||||
|
||||
--- libc/sysdeps/unix/sysv/linux/configure.jj 2003-03-23 03:10:04.000000000 +0100
|
||||
+++ libc/sysdeps/unix/sysv/linux/configure 2004-05-14 15:54:35.669802684 +0200
|
||||
@@ -225,7 +225,7 @@ case "$prefix" in
|
||||
# 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib
|
||||
case $machine in
|
||||
sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64 | \
|
||||
- mips/mips64/n64/* )
|
||||
+ mips/mips64/n64/* | ia64 )
|
||||
libc_cv_slibdir="/lib64"
|
||||
if test "$libdir" = '${exec_prefix}/lib'; then
|
||||
libdir='${exec_prefix}/lib64';
|
||||
--- libc/sysdeps/unix/sysv/linux/configure.in.jj 2003-03-23 03:10:04.000000000 +0100
|
||||
+++ libc/sysdeps/unix/sysv/linux/configure.in 2004-05-14 15:53:44.355998785 +0200
|
||||
@@ -158,7 +158,7 @@ case "$prefix" in
|
||||
# 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib
|
||||
case $machine in
|
||||
sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64 | \
|
||||
- mips/mips64/n64/* )
|
||||
+ mips/mips64/n64/* | ia64 )
|
||||
libc_cv_slibdir="/lib64"
|
||||
if test "$libdir" = '${exec_prefix}/lib'; then
|
||||
libdir='${exec_prefix}/lib64';
|
||||
--- libc/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c.jj 2004-05-14 15:42:09.307560515 +0200
|
||||
+++ libc/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c 2003-09-30 00:23:24.000000000 +0200
|
||||
@@ -0,0 +1,5 @@
|
||||
+#ifdef IS_IN_ldconfig
|
||||
+#include <sysdeps/i386/dl-procinfo.c>
|
||||
+#else
|
||||
+#include <sysdeps/generic/dl-procinfo.c>
|
||||
+#endif
|
||||
--- libc/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed.jj 2002-01-17 07:49:28.000000000 +0100
|
||||
+++ libc/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed 2004-05-14 16:21:03.041325040 +0200
|
||||
@@ -1 +1,4 @@
|
||||
-s_^\(RTLDLIST=\)\([^ ]*\)-ia64\(\.so\.[0-9.]*\)[ ]*$_\1"\2-ia64\3 \2\3"_
|
||||
+/LD_TRACE_LOADED_OBJECTS=1/a\
|
||||
+add_env="$add_env LD_LIBRARY_VERSION=\\$verify_out"
|
||||
+s_^\(RTLDLIST=\)/lib64/ld\([^ ]*\)-ia64\(\.so\.[0-9.]*\)[ ]*$_\1"/lib/ld\2-ia64\3 /lib/ld\2\3"_
|
||||
+s_^\(RTLDLIST=\)\([^"][^ ]*\)-ia64\(\.so\.[0-9.]*\)[ ]*$_\1"\2-ia64\3 \2\3"_
|
||||
--- libc/sysdeps/unix/sysv/linux/ia64/ldconfig.h.jj 2001-07-06 06:56:17.000000000 +0200
|
||||
+++ libc/sysdeps/unix/sysv/linux/ia64/ldconfig.h 2004-05-14 15:45:40.103783087 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2001 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 2001, 2004 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
|
||||
@@ -19,7 +19,8 @@
|
||||
#include <sysdeps/generic/ldconfig.h>
|
||||
|
||||
#define SYSDEP_KNOWN_INTERPRETER_NAMES \
|
||||
- { "/lib/ld-linux.so.2", FLAG_ELF_LIBC6 },
|
||||
+ { "/lib/ld-linux.so.2", FLAG_ELF_LIBC6 }, \
|
||||
+ { "/lib64/ld-linux-ia64.so.2", FLAG_ELF_LIBC6 },
|
||||
#define SYSDEP_KNOWN_LIBRARY_NAMES \
|
||||
{ "libc.so.6", FLAG_ELF_LIBC6 }, \
|
||||
{ "libm.so.6", FLAG_ELF_LIBC6 },
|
||||
--- libc/sysdeps/unix/sysv/linux/ia64/dl-cache.h.jj 2001-07-06 06:56:17.000000000 +0200
|
||||
+++ libc/sysdeps/unix/sysv/linux/ia64/dl-cache.h 2004-05-14 15:41:11.658891907 +0200
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Support for reading /etc/ld.so.cache files written by Linux ldconfig.
|
||||
- Copyright (C) 2000 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 2000, 2004 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
|
||||
@@ -22,4 +22,4 @@
|
||||
#define _dl_cache_check_flags(flags) \
|
||||
((flags) == _DL_CACHE_DEFAULT_ID)
|
||||
|
||||
-#include_next <dl-cache.h>
|
||||
+#include <sysdeps/unix/sysv/linux/sparc/dl-cache.h>
|
||||
--- libc/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h.jj 2004-05-14 15:42:13.018895395 +0200
|
||||
+++ libc/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h 2003-07-23 00:06:23.000000000 +0200
|
||||
@@ -0,0 +1,5 @@
|
||||
+#ifdef IS_IN_ldconfig
|
||||
+#include <sysdeps/unix/sysv/linux/i386/dl-procinfo.h>
|
||||
+#else
|
||||
+#include <sysdeps/generic/dl-procinfo.h>
|
||||
+#endif
|
1660
glibc-localegrouping.patch
Normal file
1660
glibc-localegrouping.patch
Normal file
File diff suppressed because it is too large
Load Diff
49
glibc-no-leaf-attribute.patch
Normal file
49
glibc-no-leaf-attribute.patch
Normal file
@ -0,0 +1,49 @@
|
||||
From 7327af4c323f6d4f500bf4aaa66a9cac6236772f Mon Sep 17 00:00:00 2001
|
||||
From: Jim Meyering <meyering@redhat.com>
|
||||
Date: Wed, 26 Oct 2011 20:08:52 +0200
|
||||
Subject: [PATCH] Revert "Use leaf function attribute in __THROW"
|
||||
|
||||
This reverts commit aa78043a4aafe5db1a1a76d544a833b63b4c5f5c
|
||||
and the related 49a43d80ec5c97cf6136b1ee2687414773b2d5aa.
|
||||
This fixes http://bugzilla.redhat.com/747377
|
||||
---
|
||||
misc/sys/cdefs.h | 15 +++------------
|
||||
2 files changed, 3 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
|
||||
index 72073e8..165a94a 100644
|
||||
--- a/misc/sys/cdefs.h
|
||||
+++ b/misc/sys/cdefs.h
|
||||
@@ -38,27 +38,18 @@
|
||||
|
||||
#ifdef __GNUC__
|
||||
|
||||
-/* All functions, except those with callbacks, are leaf functions. */
|
||||
-# if __GNUC_PREREQ (4, 6) && !defined _LIBC
|
||||
-# define __LEAF , __leaf__
|
||||
-# define __LEAF_ATTR __attribute__ ((__leaf__))
|
||||
-# else
|
||||
-# define __LEAF
|
||||
-# define __LEAF_ATTR
|
||||
-# endif
|
||||
-
|
||||
/* GCC can always grok prototypes. For C++ programs we add throw()
|
||||
to help it optimize the function calls. But this works only with
|
||||
gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
|
||||
as non-throwing using a function attribute since programs can use
|
||||
the -fexceptions options for C code as well. */
|
||||
# if !defined __cplusplus && __GNUC_PREREQ (3, 3)
|
||||
-# define __THROW __attribute__ ((__nothrow__ __LEAF))
|
||||
-# define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
|
||||
+# define __THROW __attribute__ ((__nothrow__))
|
||||
+# define __NTH(fct) __attribute__ ((__nothrow__)) fct
|
||||
# else
|
||||
# if defined __cplusplus && __GNUC_PREREQ (2,8)
|
||||
# define __THROW throw ()
|
||||
-# define __NTH(fct) __LEAF_ATTR fct throw ()
|
||||
+# define __NTH(fct) fct throw ()
|
||||
# else
|
||||
# define __THROW
|
||||
# define __NTH(fct) fct
|
||||
--
|
||||
1.7.7.1
|
@ -1,21 +0,0 @@
|
||||
Short description: Provide options to nscd startup.
|
||||
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
|
||||
Origin: PATCH
|
||||
Upstream status: not-needed
|
||||
|
||||
Fedora-specific nscd startup configuration file.
|
||||
|
||||
diff --git a/nscd/nscd.service b/nscd/nscd.service
|
||||
index b7428a3..19ba185 100644
|
||||
--- a/nscd/nscd.service
|
||||
+++ b/nscd/nscd.service
|
||||
@@ -5,7 +5,8 @@ Description=Name Service Cache Daemon
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
-ExecStart=/usr/sbin/nscd
|
||||
+EnvironmentFile=-/etc/sysconfig/nscd
|
||||
+ExecStart=/usr/sbin/nscd $NSCD_OPTIONS
|
||||
ExecStop=/usr/sbin/nscd --shutdown
|
||||
ExecReload=/usr/sbin/nscd -i passwd
|
||||
ExecReload=/usr/sbin/nscd -i group
|
@ -1,40 +0,0 @@
|
||||
Use python3 for installed executable python scripts.
|
||||
|
||||
Fedora is a Python3-only distribution:
|
||||
https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
|
||||
|
||||
This fixes build failures where builders may strictly enforce only
|
||||
python3 during a transitional phase.
|
||||
|
||||
Author: Carlos O'Donell <carlos@redhat.com>
|
||||
|
||||
diff --git a/benchtests/scripts/compare_bench.py b/benchtests/scripts/compare_bench.py
|
||||
index c1c438a1c9f0eae6..b7d3d7bcee87969d 100755
|
||||
--- a/benchtests/scripts/compare_bench.py
|
||||
+++ b/benchtests/scripts/compare_bench.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python
|
||||
+#!/usr/bin/python3
|
||||
# Copyright (C) 2015-2019 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
#
|
||||
diff --git a/benchtests/scripts/import_bench.py b/benchtests/scripts/import_bench.py
|
||||
index 7a55d19f038e64d4..72e6034243a8c9b6 100644
|
||||
--- a/benchtests/scripts/import_bench.py
|
||||
+++ b/benchtests/scripts/import_bench.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python
|
||||
+#!/usr/bin/python3
|
||||
# Copyright (C) 2015-2019 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
#
|
||||
diff --git a/benchtests/scripts/validate_benchout.py b/benchtests/scripts/validate_benchout.py
|
||||
index 55d07c6bce5b5184..04129f9c26c2874c 100755
|
||||
--- a/benchtests/scripts/validate_benchout.py
|
||||
+++ b/benchtests/scripts/validate_benchout.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python
|
||||
+#!/usr/bin/python3
|
||||
# Copyright (C) 2014-2019 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
#
|
@ -1,38 +0,0 @@
|
||||
Short description: Add syslog.target dependency.
|
||||
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
|
||||
Origin: PATCH
|
||||
Bug-Fedora: #1070416
|
||||
Upstream status: not-needed
|
||||
|
||||
Fedora-specific changes to the nscd.service file.
|
||||
See also: glibc-nscd-sysconfig.patch.
|
||||
|
||||
--- a/nscd/nscd.service
|
||||
+++ b/nscd/nscd.service
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
[Unit]
|
||||
Description=Name Service Cache Daemon
|
||||
+After=syslog.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
@@ -17,3 +18,4 @@
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
+Also=nscd.socket
|
||||
diff --git a/nscd/nscd.socket b/nscd/nscd.socket
|
||||
new file mode 100644
|
||||
index 0000000..7e512d5
|
||||
--- /dev/null
|
||||
+++ b/nscd/nscd.socket
|
||||
@@ -0,0 +1,8 @@
|
||||
+[Unit]
|
||||
+Description=Name Service Cache Daemon Socket
|
||||
+
|
||||
+[Socket]
|
||||
+ListenDatagram=/var/run/nscd/socket
|
||||
+
|
||||
+[Install]
|
||||
+WantedBy=sockets.target
|
@ -1,22 +0,0 @@
|
||||
Please see the following bug for a complete summary:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1615608
|
||||
|
||||
Index: glibc-2.28/manual/startup.texi
|
||||
===================================================================
|
||||
--- glibc-2.28.orig/manual/startup.texi
|
||||
+++ glibc-2.28/manual/startup.texi
|
||||
@@ -1005,14 +1005,6 @@ This function actually terminates the pr
|
||||
intercept this signal; see @ref{Signal Handling}.
|
||||
@end deftypefun
|
||||
|
||||
-@c Put in by rms. Don't remove.
|
||||
-@cartouche
|
||||
-@strong{Future Change Warning:} Proposed Federal censorship regulations
|
||||
-may prohibit us from giving you information about the possibility of
|
||||
-calling this function. We would be required to say that this is not an
|
||||
-acceptable way of terminating a program.
|
||||
-@end cartouche
|
||||
-
|
||||
@node Termination Internals
|
||||
@subsection Termination Internals
|
||||
|
27
glibc-rh552960-2.patch
Normal file
27
glibc-rh552960-2.patch
Normal file
@ -0,0 +1,27 @@
|
||||
diff -rup a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
|
||||
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2012-02-10 12:49:42.609737373 -0700
|
||||
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2012-02-10 12:52:00.962150379 -0700
|
||||
@@ -438,6 +438,10 @@ __pthread_cond_wait:
|
||||
addl $1, cond_futex(%ebx)
|
||||
movl cond_futex(%ebx), %ebp
|
||||
|
||||
+ /* Increment total_seq to ensure we do not lose wakeups. */
|
||||
+ addl $1, total_seq(%ebx)
|
||||
+ adcl $0, total_seq+4(%ebx)
|
||||
+
|
||||
/* Unlock. */
|
||||
LOCK
|
||||
#if cond_lock == 0
|
||||
diff -rup a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
|
||||
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2012-02-10 12:49:42.612737361 -0700
|
||||
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2012-02-10 12:52:36.179000963 -0700
|
||||
@@ -366,6 +366,9 @@ __pthread_cond_wait:
|
||||
incl cond_futex(%rdi)
|
||||
movl cond_futex(%rdi), %edx
|
||||
|
||||
+ /* Increment total_seq to ensure we do not lose wakeups. */
|
||||
+ incq total_seq(%rdi)
|
||||
+
|
||||
/* Release internal lock. */
|
||||
LOCK
|
||||
#if cond_lock == 0
|
226
glibc-rh552960.patch
Normal file
226
glibc-rh552960.patch
Normal file
@ -0,0 +1,226 @@
|
||||
diff -rup a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
|
||||
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2011-12-15 10:45:09.759232551 -0700
|
||||
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2011-12-15 15:11:57.534479377 -0700
|
||||
@@ -137,6 +137,7 @@ __pthread_cond_wait:
|
||||
cmpl $PI_BIT, %eax
|
||||
jne 18f
|
||||
|
||||
+90:
|
||||
movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %ecx
|
||||
movl %ebp, %edx
|
||||
xorl %esi, %esi
|
||||
@@ -150,6 +151,9 @@ __pthread_cond_wait:
|
||||
sete 16(%esp)
|
||||
je 19f
|
||||
|
||||
+ cmpl $-EAGAIN, %eax
|
||||
+ je 91f
|
||||
+
|
||||
/* Normal and PI futexes dont mix. Use normal futex functions only
|
||||
if the kernel does not support the PI futex functions. */
|
||||
cmpl $-ENOSYS, %eax
|
||||
@@ -394,6 +398,78 @@ __pthread_cond_wait:
|
||||
#endif
|
||||
call __lll_unlock_wake
|
||||
jmp 11b
|
||||
+
|
||||
+91:
|
||||
+.LcleanupSTART2:
|
||||
+ /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to
|
||||
+ call it again. */
|
||||
+
|
||||
+ /* Get internal lock. */
|
||||
+ movl $1, %edx
|
||||
+ xorl %eax, %eax
|
||||
+ LOCK
|
||||
+#if cond_lock == 0
|
||||
+ cmpxchgl %edx, (%ebx)
|
||||
+#else
|
||||
+ cmpxchgl %edx, cond_lock(%ebx)
|
||||
+#endif
|
||||
+ jz 92f
|
||||
+
|
||||
+#if cond_lock == 0
|
||||
+ movl %ebx, %edx
|
||||
+#else
|
||||
+ leal cond_lock(%ebx), %edx
|
||||
+#endif
|
||||
+#if (LLL_SHARED-LLL_PRIVATE) > 255
|
||||
+ xorl %ecx, %ecx
|
||||
+#endif
|
||||
+ cmpl $-1, dep_mutex(%ebx)
|
||||
+ setne %cl
|
||||
+ subl $1, %ecx
|
||||
+ andl $(LLL_SHARED-LLL_PRIVATE), %ecx
|
||||
+#if LLL_PRIVATE != 0
|
||||
+ addl $LLL_PRIVATE, %ecx
|
||||
+#endif
|
||||
+ call __lll_lock_wait
|
||||
+
|
||||
+92:
|
||||
+ /* Increment the cond_futex value again, so it can be used as a new
|
||||
+ expected value. */
|
||||
+ addl $1, cond_futex(%ebx)
|
||||
+ movl cond_futex(%ebx), %ebp
|
||||
+
|
||||
+ /* Unlock. */
|
||||
+ LOCK
|
||||
+#if cond_lock == 0
|
||||
+ subl $1, (%ebx)
|
||||
+#else
|
||||
+ subl $1, cond_lock(%ebx)
|
||||
+#endif
|
||||
+ je 93f
|
||||
+#if cond_lock == 0
|
||||
+ movl %ebx, %eax
|
||||
+#else
|
||||
+ leal cond_lock(%ebx), %eax
|
||||
+#endif
|
||||
+#if (LLL_SHARED-LLL_PRIVATE) > 255
|
||||
+ xorl %ecx, %ecx
|
||||
+#endif
|
||||
+ cmpl $-1, dep_mutex(%ebx)
|
||||
+ setne %cl
|
||||
+ subl $1, %ecx
|
||||
+ andl $(LLL_SHARED-LLL_PRIVATE), %ecx
|
||||
+#if LLL_PRIVATE != 0
|
||||
+ addl $LLL_PRIVATE, %ecx
|
||||
+#endif
|
||||
+ call __lll_unlock_wake
|
||||
+
|
||||
+93:
|
||||
+ /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
|
||||
+ xorl %ecx, %ecx
|
||||
+ movl dep_mutex(%ebx), %edi
|
||||
+ jmp 90b
|
||||
+.LcleanupEND2:
|
||||
+
|
||||
.size __pthread_cond_wait, .-__pthread_cond_wait
|
||||
versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
|
||||
GLIBC_2_3_2)
|
||||
@@ -566,6 +642,10 @@ __condvar_w_cleanup:
|
||||
.long .LcleanupEND-.Lsub_cond_futex
|
||||
.long __condvar_w_cleanup-.LSTARTCODE
|
||||
.uleb128 0
|
||||
+ .long .LcleanupSTART2-.LSTARTCODE
|
||||
+ .long .LcleanupEND2-.LcleanupSTART2
|
||||
+ .long __condvar_w_cleanup-.LSTARTCODE
|
||||
+ .uleb128 0
|
||||
.long .LcallUR-.LSTARTCODE
|
||||
.long .LENDCODE-.LcallUR
|
||||
.long 0
|
||||
diff -rup a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
|
||||
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2011-12-15 10:45:09.764232551 -0700
|
||||
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2011-12-15 15:12:49.287474417 -0700
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <lowlevelcond.h>
|
||||
#include <tcb-offsets.h>
|
||||
#include <pthread-pi-defines.h>
|
||||
+#include <pthread-errnos.h>
|
||||
#include <stap-probe.h>
|
||||
|
||||
#include <kernel-features.h>
|
||||
@@ -136,11 +137,14 @@ __pthread_cond_wait:
|
||||
cmpl $PI_BIT, %eax
|
||||
jne 61f
|
||||
|
||||
+90:
|
||||
movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %esi
|
||||
movl $SYS_futex, %eax
|
||||
syscall
|
||||
|
||||
movl $1, %r8d
|
||||
+ cmpq $-EAGAIN, %rax
|
||||
+ je 91f
|
||||
#ifdef __ASSUME_REQUEUE_PI
|
||||
jmp 62f
|
||||
#else
|
||||
@@ -327,6 +331,70 @@ __pthread_cond_wait:
|
||||
|
||||
13: movq %r10, %rax
|
||||
jmp 14b
|
||||
+
|
||||
+91:
|
||||
+.LcleanupSTART2:
|
||||
+ /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to
|
||||
+ call it again. */
|
||||
+ movq 8(%rsp), %rdi
|
||||
+
|
||||
+ /* Get internal lock. */
|
||||
+ movl $1, %esi
|
||||
+ xorl %eax, %eax
|
||||
+ LOCK
|
||||
+#if cond_lock == 0
|
||||
+ cmpxchgl %esi, (%rdi)
|
||||
+#else
|
||||
+ cmpxchgl %esi, cond_lock(%rdi)
|
||||
+#endif
|
||||
+ jz 92f
|
||||
+
|
||||
+#if cond_lock != 0
|
||||
+ addq $cond_lock, %rdi
|
||||
+#endif
|
||||
+ cmpq $-1, dep_mutex-cond_lock(%rdi)
|
||||
+ movl $LLL_PRIVATE, %eax
|
||||
+ movl $LLL_SHARED, %esi
|
||||
+ cmovne %eax, %esi
|
||||
+ callq __lll_lock_wait
|
||||
+#if cond_lock != 0
|
||||
+ subq $cond_lock, %rdi
|
||||
+#endif
|
||||
+92:
|
||||
+ /* Increment the cond_futex value again, so it can be used as a new
|
||||
+ expected value. */
|
||||
+ incl cond_futex(%rdi)
|
||||
+ movl cond_futex(%rdi), %edx
|
||||
+
|
||||
+ /* Release internal lock. */
|
||||
+ LOCK
|
||||
+#if cond_lock == 0
|
||||
+ decl (%rdi)
|
||||
+#else
|
||||
+ decl cond_lock(%rdi)
|
||||
+#endif
|
||||
+ jz 93f
|
||||
+
|
||||
+#if cond_lock != 0
|
||||
+ addq $cond_lock, %rdi
|
||||
+#endif
|
||||
+ cmpq $-1, dep_mutex-cond_lock(%rdi)
|
||||
+ movl $LLL_PRIVATE, %eax
|
||||
+ movl $LLL_SHARED, %esi
|
||||
+ cmovne %eax, %esi
|
||||
+ /* The call preserves %rdx. */
|
||||
+ callq __lll_unlock_wake
|
||||
+#if cond_lock != 0
|
||||
+ subq $cond_lock, %rdi
|
||||
+#endif
|
||||
+93:
|
||||
+ /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
|
||||
+ xorq %r10, %r10
|
||||
+ movq dep_mutex(%rdi), %r8
|
||||
+ leaq cond_futex(%rdi), %rdi
|
||||
+ jmp 90b
|
||||
+.LcleanupEND2:
|
||||
+
|
||||
.size __pthread_cond_wait, .-__pthread_cond_wait
|
||||
versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
|
||||
GLIBC_2_3_2)
|
||||
@@ -479,11 +547,15 @@ __condvar_cleanup1:
|
||||
.uleb128 .LcleanupSTART-.LSTARTCODE
|
||||
.uleb128 .LcleanupEND-.LcleanupSTART
|
||||
.uleb128 __condvar_cleanup1-.LSTARTCODE
|
||||
- .uleb128 0
|
||||
+ .uleb128 0
|
||||
+ .uleb128 .LcleanupSTART2-.LSTARTCODE
|
||||
+ .uleb128 .LcleanupEND2-.LcleanupSTART2
|
||||
+ .uleb128 __condvar_cleanup1-.LSTARTCODE
|
||||
+ .uleb128 0
|
||||
.uleb128 .LcallUR-.LSTARTCODE
|
||||
.uleb128 .LENDCODE-.LcallUR
|
||||
.uleb128 0
|
||||
- .uleb128 0
|
||||
+ .uleb128 0
|
||||
.Lcstend:
|
||||
|
||||
|
@ -1,21 +0,0 @@
|
||||
Short description: Add UCS-2 aliases.
|
||||
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
|
||||
Origin: PATCH
|
||||
Bug-RHEL: #697421
|
||||
Upstream status: https://sourceware.org/ml/libc-alpha/2012-12/msg00103.html
|
||||
|
||||
This is a Fedora-specific change to include new aliases for UCS-2
|
||||
data for gconv used by a certain class of users. This should be
|
||||
revisited at some point to determine if those users are just using
|
||||
UTF-8 at this point.
|
||||
|
||||
diff -rup a/iconvdata/gconv-modules b/iconvdata/gconv-modules
|
||||
--- a/iconvdata/gconv-modules 2010-05-04 05:27:23.000000000 -0600
|
||||
+++ b/iconvdata/gconv-modules 2012-01-26 10:58:24.181895489 -0700
|
||||
@@ -1954,3 +1954,6 @@ alias HPGREEK8// HP-GREEK8//
|
||||
alias OSF10010004// HP-GREEK8//
|
||||
module HP-GREEK8// INTERNAL HP-GREEK8 1
|
||||
module INTERNAL HP-GREEK8// HP-GREEK8 1
|
||||
+
|
||||
+alias ISO-10646-UCS-2// UNICODE//
|
||||
+alias ISO-10646-UCS-2// ISO-10646/UTF8/
|
13
glibc-rh708455.patch
Normal file
13
glibc-rh708455.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/manual/resource.texi b/manual/resource.texi
|
||||
index 0549572..8e3155c 100644
|
||||
--- a/manual/resource.texi
|
||||
+++ b/manual/resource.texi
|
||||
@@ -1607,7 +1607,7 @@ processors and so the call
|
||||
@end smallexample
|
||||
|
||||
@noindent
|
||||
-returns the number of processors which are currently inline (i.e.,
|
||||
+returns the number of processors which are currently online (i.e.,
|
||||
available).
|
||||
|
||||
For these two pieces of information the GNU C library also provides
|
52
glibc-rh730856.patch
Normal file
52
glibc-rh730856.patch
Normal file
@ -0,0 +1,52 @@
|
||||
diff -Nrup a/resolv/res_query.c b/resolv/res_query.c
|
||||
--- a/resolv/res_query.c 2012-05-11 13:46:06.442619026 -0400
|
||||
+++ b/resolv/res_query.c 2012-05-11 16:19:35.195340660 -0400
|
||||
@@ -122,6 +122,7 @@ __libc_res_nquery(res_state statp,
|
||||
int *resplen2)
|
||||
{
|
||||
HEADER *hp = (HEADER *) answer;
|
||||
+ HEADER *hp2;
|
||||
int n, use_malloc = 0;
|
||||
u_int oflags = statp->_flags;
|
||||
|
||||
@@ -239,26 +240,25 @@ __libc_res_nquery(res_state statp,
|
||||
/* __libc_res_nsend might have reallocated the buffer. */
|
||||
hp = (HEADER *) *answerp;
|
||||
|
||||
- /* We simplify the following tests by assigning HP to HP2. It
|
||||
- is easy to verify that this is the same as ignoring all
|
||||
- tests of HP2. */
|
||||
- HEADER *hp2 = answerp2 ? (HEADER *) *answerp2 : hp;
|
||||
-
|
||||
- if (n < (int) sizeof (HEADER) && answerp2 != NULL
|
||||
- && *resplen2 > (int) sizeof (HEADER))
|
||||
+ /* We simplify the following tests by assigning HP to HP2 or
|
||||
+ vice versa. It is easy to verify that this is the same as
|
||||
+ ignoring all tests of HP or HP2. */
|
||||
+ if (answerp2 == NULL || *resplen2 < (int) sizeof (HEADER))
|
||||
{
|
||||
- /* Special case of partial answer. */
|
||||
- assert (n == 0 || hp != hp2);
|
||||
- hp = hp2;
|
||||
+ hp2 = hp;
|
||||
}
|
||||
- else if (answerp2 != NULL && *resplen2 < (int) sizeof (HEADER)
|
||||
- && n > (int) sizeof (HEADER))
|
||||
+ else
|
||||
{
|
||||
- /* Special case of partial answer. */
|
||||
- assert (hp != hp2);
|
||||
- hp2 = hp;
|
||||
+ hp2 = (HEADER *) *answerp2;
|
||||
+ if (n < (int) sizeof (HEADER))
|
||||
+ {
|
||||
+ hp = hp2;
|
||||
+ }
|
||||
}
|
||||
|
||||
+ /* Make sure both hp and hp2 are defined */
|
||||
+ assert((hp != NULL) && (hp2 != NULL));
|
||||
+
|
||||
if ((hp->rcode != NOERROR || ntohs(hp->ancount) == 0)
|
||||
&& (hp2->rcode != NOERROR || ntohs(hp2->ancount) == 0)) {
|
||||
#ifdef DEBUG
|
@ -1,84 +0,0 @@
|
||||
Short description: Work ld.so --verify crash on debuginfo files.
|
||||
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
|
||||
Origin: PATCH
|
||||
Bug-RHEL: #741105, #767146
|
||||
Upstream status: not-needed
|
||||
|
||||
This change is designed to work around running ld.so on a debuginfo
|
||||
file. This is the wrong fix for this problem and should be dropped.
|
||||
The correct solution is to mark debuginfo files as new types of
|
||||
ELF files.
|
||||
|
||||
Index: glibc-2.22-386-g95e8397/elf/dl-load.c
|
||||
===================================================================
|
||||
--- glibc-2.22-386-g95e8397.orig/elf/dl-load.c
|
||||
+++ glibc-2.22-386-g95e8397/elf/dl-load.c
|
||||
@@ -881,7 +881,8 @@ _dl_map_object_from_fd (const char *name
|
||||
|
||||
/* Get file information. */
|
||||
struct r_file_id id;
|
||||
- if (__glibc_unlikely (!_dl_get_file_id (fd, &id)))
|
||||
+ struct stat64 st;
|
||||
+ if (__glibc_unlikely (!_dl_get_file_id (fd, &id, &st)))
|
||||
{
|
||||
errstring = N_("cannot stat shared object");
|
||||
call_lose_errno:
|
||||
@@ -1076,6 +1077,16 @@ _dl_map_object_from_fd (const char *name
|
||||
= N_("ELF load command address/offset not properly aligned");
|
||||
goto call_lose;
|
||||
}
|
||||
+ if (__glibc_unlikely (ph->p_offset + ph->p_filesz > st.st_size))
|
||||
+ {
|
||||
+ /* If the segment requires zeroing of part of its last
|
||||
+ page, we'll crash when accessing the unmapped page.
|
||||
+ There's still a possibility of a race, if the shared
|
||||
+ object is truncated between the fxstat above and the
|
||||
+ memset below. */
|
||||
+ errstring = N_("ELF load command past end of file");
|
||||
+ goto call_lose;
|
||||
+ }
|
||||
|
||||
struct loadcmd *c = &loadcmds[nloadcmds++];
|
||||
c->mapstart = ALIGN_DOWN (ph->p_vaddr, GLRO(dl_pagesize));
|
||||
Index: glibc-2.22-386-g95e8397/sysdeps/generic/dl-fileid.h
|
||||
===================================================================
|
||||
--- glibc-2.22-386-g95e8397.orig/sysdeps/generic/dl-fileid.h
|
||||
+++ glibc-2.22-386-g95e8397/sysdeps/generic/dl-fileid.h
|
||||
@@ -29,7 +29,8 @@ struct r_file_id
|
||||
On error, returns false, with errno set. */
|
||||
static inline bool
|
||||
_dl_get_file_id (int fd __attribute__ ((unused)),
|
||||
- struct r_file_id *id __attribute__ ((unused)))
|
||||
+ struct r_file_id *id __attribute__ ((unused)),
|
||||
+ struct stat64_t *st __attribute__((unused)))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
Index: glibc-2.22-386-g95e8397/sysdeps/posix/dl-fileid.h
|
||||
===================================================================
|
||||
--- glibc-2.22-386-g95e8397.orig/sysdeps/posix/dl-fileid.h
|
||||
+++ glibc-2.22-386-g95e8397/sysdeps/posix/dl-fileid.h
|
||||
@@ -27,18 +27,16 @@ struct r_file_id
|
||||
ino64_t ino;
|
||||
};
|
||||
|
||||
-/* Sample FD to fill in *ID. Returns true on success.
|
||||
+/* Sample FD to fill in *ID and *ST. Returns true on success.
|
||||
On error, returns false, with errno set. */
|
||||
static inline bool
|
||||
-_dl_get_file_id (int fd, struct r_file_id *id)
|
||||
+_dl_get_file_id (int fd, struct r_file_id *id, struct stat64 *st)
|
||||
{
|
||||
- struct stat64 st;
|
||||
-
|
||||
- if (__glibc_unlikely (__fxstat64 (_STAT_VER, fd, &st) < 0))
|
||||
+ if (__glibc_unlikely (__fxstat64 (_STAT_VER, fd, st) < 0))
|
||||
return false;
|
||||
|
||||
- id->dev = st.st_dev;
|
||||
- id->ino = st.st_ino;
|
||||
+ id->dev = st->st_dev;
|
||||
+ id->ino = st->st_ino;
|
||||
return true;
|
||||
}
|
||||
|
29
glibc-rh750811.patch
Normal file
29
glibc-rh750811.patch
Normal file
@ -0,0 +1,29 @@
|
||||
commit 850fb039cec802072f70ed9763927881bbbf639c
|
||||
Author: Andreas Schwab <schwab@linux-m68k.org>
|
||||
Date: Tue Dec 6 11:10:06 2011 +0100
|
||||
|
||||
Fix a wrong constant in powerpc hypot implementation
|
||||
|
||||
--- a/ChangeLog 2011-12-05 20:28:47.000000000 -0700
|
||||
+++ b/ChangeLog 2011-12-07 13:14:29.619858242 -0700
|
||||
@@ -1,3 +1,7 @@
|
||||
+2011-12-06 Andreas Schwab <schwab@linux-m68k.org>
|
||||
+
|
||||
+ * sysdeps/powerpc/fpu/e_hypot.c (twoM600): Correct value.
|
||||
+
|
||||
2011-12-02 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* misc/bits/select2.h (__FD_ELT): Mark as extension. Add
|
||||
diff --git a/sysdeps/powerpc/fpu/e_hypot.c b/sysdeps/powerpc/fpu/e_hypot.c
|
||||
index a8d67d8..3731c58 100644
|
||||
--- a/sysdeps/powerpc/fpu/e_hypot.c
|
||||
+++ b/sysdeps/powerpc/fpu/e_hypot.c
|
||||
@@ -26,7 +26,7 @@ static const double two500 = 3.2733906078961419e+150;
|
||||
static const double two600 = 4.149515568880993e+180;
|
||||
static const double two1022 = 4.49423283715579e+307;
|
||||
static const double twoM500 = 3.054936363499605e-151;
|
||||
-static const double twoM600 = 4.616489308892868e-128;
|
||||
+static const double twoM600 = 2.4099198651028841e-181;
|
||||
static const double pdnum = 2.225073858507201e-308;
|
||||
|
||||
/* __ieee754_hypot(x,y)
|
35
glibc-rh750858.patch
Normal file
35
glibc-rh750858.patch
Normal file
@ -0,0 +1,35 @@
|
||||
commit 3d7ba52b68e4dc5c4d3eb19de436c66ed9bb2f0d
|
||||
Author: Andreas Schwab <schwab@redhat.com>
|
||||
Date: Thu Nov 3 14:26:38 2011 +0100
|
||||
|
||||
Don't fail in makedb if SELinux is disabled
|
||||
|
||||
*** a/ChangeLog Wed Nov 30 12:38:59 2011
|
||||
--- b/ChangeLog Wed Nov 30 12:39:17 2011
|
||||
***************
|
||||
*** 9,14 ****
|
||||
--- 9,19 ----
|
||||
(reused_arena): Don't check arena limit.
|
||||
(arena_get2): Atomically check arena limit.
|
||||
|
||||
+ 2011-11-03 Andreas Schwab <schwab@redhat.com>
|
||||
+
|
||||
+ * nss/makedb.c (set_file_creation_context): Do nothing if SELinux
|
||||
+ is disabled.
|
||||
+
|
||||
2011-10-19 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* sysdeps/x86_64/fpu/math_private.h (libc_feupdateenv): Use
|
||||
diff --git a/nss/makedb.c b/nss/makedb.c
|
||||
index 8cee92f..1b19966 100644
|
||||
--- a/nss/makedb.c
|
||||
+++ b/nss/makedb.c
|
||||
@@ -842,7 +842,7 @@ set_file_creation_context (const char *outname, mode_t mode)
|
||||
|
||||
/* Check if SELinux is enabled, and remember. */
|
||||
if (enabled == 0)
|
||||
- enabled = is_selinux_enabled ();
|
||||
+ enabled = is_selinux_enabled () ? 1 : -1;
|
||||
if (enabled < 0)
|
||||
return;
|
||||
|
170
glibc-rh757881.patch
Normal file
170
glibc-rh757881.patch
Normal file
@ -0,0 +1,170 @@
|
||||
Index: glibc-2.12-2-gc4ccff1/malloc/arena.c
|
||||
===================================================================
|
||||
--- glibc-2.12-2-gc4ccff1.orig/malloc/arena.c
|
||||
+++ glibc-2.12-2-gc4ccff1/malloc/arena.c
|
||||
@@ -870,7 +870,7 @@ heap_trim(heap, pad) heap_info *heap; si
|
||||
heap = prev_heap;
|
||||
if(!prev_inuse(p)) { /* consolidate backward */
|
||||
p = prev_chunk(p);
|
||||
- unlink(p, bck, fwd);
|
||||
+ unlink(ar_ptr, p, bck, fwd);
|
||||
}
|
||||
assert(((unsigned long)((char*)p + new_size) & (pagesz-1)) == 0);
|
||||
assert( ((char*)p + new_size) == ((char*)heap + heap->size) );
|
||||
Index: glibc-2.12-2-gc4ccff1/malloc/hooks.c
|
||||
===================================================================
|
||||
--- glibc-2.12-2-gc4ccff1.orig/malloc/hooks.c
|
||||
+++ glibc-2.12-2-gc4ccff1/malloc/hooks.c
|
||||
@@ -219,7 +219,9 @@ top_check()
|
||||
(char*)t + chunksize(t) == mp_.sbrk_base + main_arena.system_mem)))
|
||||
return 0;
|
||||
|
||||
+ mutex_unlock(&main_arena);
|
||||
malloc_printerr (check_action, "malloc: top chunk is corrupt", t);
|
||||
+ mutex_lock(&main_arena);
|
||||
|
||||
/* Try to set up a new top chunk. */
|
||||
brk = MORECORE(0);
|
||||
Index: glibc-2.12-2-gc4ccff1/malloc/malloc.c
|
||||
===================================================================
|
||||
--- glibc-2.12-2-gc4ccff1.orig/malloc/malloc.c
|
||||
+++ glibc-2.12-2-gc4ccff1/malloc/malloc.c
|
||||
@@ -1541,12 +1541,14 @@
|
||||
#define last(b) ((b)->bk)
|
||||
|
||||
/* Take a chunk off a bin list */
|
||||
-#define unlink(P, BK, FD) { \
|
||||
+#define unlink(AV, P, BK, FD) { \
|
||||
FD = P->fd; \
|
||||
BK = P->bk; \
|
||||
- if (__builtin_expect (FD->bk != P || BK->fd != P, 0)) \
|
||||
+ if (__builtin_expect (FD->bk != P || BK->fd != P, 0)) { \
|
||||
+ mutex_unlock(&(AV)->mutex); \
|
||||
malloc_printerr (check_action, "corrupted double-linked list", P); \
|
||||
- else { \
|
||||
+ mutex_lock(&(AV)->mutex); \
|
||||
+ } else { \
|
||||
FD->bk = BK; \
|
||||
BK->fd = FD; \
|
||||
if (!in_smallbin_range (P->size) \
|
||||
@@ -2593,7 +2595,9 @@
|
||||
|
||||
else if (contiguous(av) && old_size && brk < old_end) {
|
||||
/* Oops! Someone else killed our space.. Can't touch anything. */
|
||||
+ mutex_unlock(&av->mutex);
|
||||
malloc_printerr (3, "break adjusted to free malloc space", brk);
|
||||
+ mutex_lock(&av->mutex);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3467,7 +3471,9 @@
|
||||
{
|
||||
errstr = "malloc(): memory corruption (fast)";
|
||||
errout:
|
||||
+ mutex_unlock(&av->mutex);
|
||||
malloc_printerr (check_action, errstr, chunk2mem (victim));
|
||||
+ mutex_lock(&av->mutex);
|
||||
return NULL;
|
||||
}
|
||||
check_remalloced_chunk(av, victim, nb);
|
||||
@@ -3552,8 +3558,12 @@
|
||||
bck = victim->bk;
|
||||
if (__builtin_expect (victim->size <= 2 * SIZE_SZ, 0)
|
||||
|| __builtin_expect (victim->size > av->system_mem, 0))
|
||||
- malloc_printerr (check_action, "malloc(): memory corruption",
|
||||
- chunk2mem (victim));
|
||||
+ {
|
||||
+ void *p = chunk2mem(victim);
|
||||
+ mutex_unlock(&av->mutex);
|
||||
+ malloc_printerr (check_action, "malloc(): memory corruption", p);
|
||||
+ mutex_lock(&av->mutex);
|
||||
+ }
|
||||
size = chunksize(victim);
|
||||
|
||||
/*
|
||||
@@ -3694,7 +3704,7 @@
|
||||
victim = victim->fd;
|
||||
|
||||
remainder_size = size - nb;
|
||||
- unlink(victim, bck, fwd);
|
||||
+ unlink(av, victim, bck, fwd);
|
||||
|
||||
/* Exhaust */
|
||||
if (remainder_size < MINSIZE) {
|
||||
@@ -3792,7 +3802,7 @@
|
||||
remainder_size = size - nb;
|
||||
|
||||
/* unlink */
|
||||
- unlink(victim, bck, fwd);
|
||||
+ unlink(av, victim, bck, fwd);
|
||||
|
||||
/* Exhaust */
|
||||
if (remainder_size < MINSIZE) {
|
||||
@@ -3927,9 +3937,11 @@
|
||||
{
|
||||
errstr = "free(): invalid pointer";
|
||||
errout:
|
||||
- if (! have_lock && locked)
|
||||
+ if (have_lock || locked)
|
||||
(void)mutex_unlock(&av->mutex);
|
||||
malloc_printerr (check_action, errstr, chunk2mem(p));
|
||||
+ if (have_lock)
|
||||
+ mutex_lock(&av->mutex);
|
||||
return;
|
||||
}
|
||||
/* We know that each chunk is at least MINSIZE bytes in size. */
|
||||
@@ -4073,7 +4085,7 @@
|
||||
prevsize = p->prev_size;
|
||||
size += prevsize;
|
||||
p = chunk_at_offset(p, -((long) prevsize));
|
||||
- unlink(p, bck, fwd);
|
||||
+ unlink(av, p, bck, fwd);
|
||||
}
|
||||
|
||||
if (nextchunk != av->top) {
|
||||
@@ -4082,7 +4094,7 @@
|
||||
|
||||
/* consolidate forward */
|
||||
if (!nextinuse) {
|
||||
- unlink(nextchunk, bck, fwd);
|
||||
+ unlink(av, nextchunk, bck, fwd);
|
||||
size += nextsize;
|
||||
} else
|
||||
clear_inuse_bit_at_offset(nextchunk, 0);
|
||||
@@ -4243,7 +4255,7 @@
|
||||
prevsize = p->prev_size;
|
||||
size += prevsize;
|
||||
p = chunk_at_offset(p, -((long) prevsize));
|
||||
- unlink(p, bck, fwd);
|
||||
+ unlink(av, p, bck, fwd);
|
||||
}
|
||||
|
||||
if (nextchunk != av->top) {
|
||||
@@ -4251,7 +4263,7 @@
|
||||
|
||||
if (!nextinuse) {
|
||||
size += nextsize;
|
||||
- unlink(nextchunk, bck, fwd);
|
||||
+ unlink(av, nextchunk, bck, fwd);
|
||||
} else
|
||||
clear_inuse_bit_at_offset(nextchunk, 0);
|
||||
|
||||
@@ -4320,7 +4332,9 @@
|
||||
{
|
||||
errstr = "realloc(): invalid old size";
|
||||
errout:
|
||||
+ mutex_unlock(&av->mutex);
|
||||
malloc_printerr (check_action, errstr, chunk2mem(oldp));
|
||||
+ mutex_lock(&av->mutex);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -4362,7 +4376,7 @@
|
||||
(unsigned long)(newsize = oldsize + nextsize) >=
|
||||
(unsigned long)(nb)) {
|
||||
newp = oldp;
|
||||
- unlink(next, bck, fwd);
|
||||
+ unlink(av, next, bck, fwd);
|
||||
}
|
||||
|
||||
/* allocate, copy, free */
|
242
glibc-rh757887.patch
Normal file
242
glibc-rh757887.patch
Normal file
@ -0,0 +1,242 @@
|
||||
commit f3a6cc0a560a17f32a3e90d2f20501a53cab6058
|
||||
Author: Andreas Schwab <schwab@redhat.com>
|
||||
Date: Tue Nov 29 10:52:22 2011 +0100
|
||||
|
||||
Fix access after end of search string in regex matcher
|
||||
|
||||
--- a/ChangeLog 2011-11-30 12:43:22.312632113 -0700
|
||||
+++ b/ChangeLog 2011-11-30 12:43:50.569624022 -0700
|
||||
@@ -1,3 +1,14 @@
|
||||
+2011-11-29 Andreas Schwab <schwab@redhat.com>
|
||||
+
|
||||
+ * locale/weight.h (findidx): Add parameter len.
|
||||
+ * locale/weightwc.h (findidx): Likewise.
|
||||
+ * posix/fnmatch_loop.c (FCT): Adjust caller.
|
||||
+ * posix/regcomp.c (build_equiv_class): Likewise.
|
||||
+ * posix/regex_internal.h (re_string_elem_size_at): Likewise.
|
||||
+ * posix/regexec.c (check_node_accept_bytes): Likewise.
|
||||
+ * string/strcoll_l.c (STRCOLL): Likewise.
|
||||
+ * string/strxfrm_l.c (STRXFRM): Likewise.
|
||||
+
|
||||
2011-11-14 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* malloc/arena.c (arena_get2): Don't call reused_arena when
|
||||
diff --git a/locale/weight.h b/locale/weight.h
|
||||
index dc70a00..967e176 100644
|
||||
--- a/locale/weight.h
|
||||
+++ b/locale/weight.h
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 1996,1997,1998,1999,2000,2003,2004 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 1996,1997,1998,1999,2000,2003,2004,2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Ulrich Drepper, <drepper@cygnus.com>.
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
/* Find index of weight. */
|
||||
auto inline int32_t
|
||||
__attribute ((always_inline))
|
||||
-findidx (const unsigned char **cpp)
|
||||
+findidx (const unsigned char **cpp, size_t len)
|
||||
{
|
||||
int_fast32_t i = table[*(*cpp)++];
|
||||
const unsigned char *cp;
|
||||
@@ -34,6 +34,7 @@ findidx (const unsigned char **cpp)
|
||||
Search for the correct one. */
|
||||
cp = &extra[-i];
|
||||
usrc = *cpp;
|
||||
+ --len;
|
||||
while (1)
|
||||
{
|
||||
size_t nhere;
|
||||
@@ -56,7 +57,7 @@ findidx (const unsigned char **cpp)
|
||||
already. */
|
||||
size_t cnt;
|
||||
|
||||
- for (cnt = 0; cnt < nhere; ++cnt)
|
||||
+ for (cnt = 0; cnt < nhere && cnt < len; ++cnt)
|
||||
if (cp[cnt] != usrc[cnt])
|
||||
break;
|
||||
|
||||
@@ -79,13 +80,13 @@ findidx (const unsigned char **cpp)
|
||||
size_t cnt;
|
||||
size_t offset = 0;
|
||||
|
||||
- for (cnt = 0; cnt < nhere; ++cnt)
|
||||
+ for (cnt = 0; cnt < nhere && cnt < len; ++cnt)
|
||||
if (cp[cnt] != usrc[cnt])
|
||||
break;
|
||||
|
||||
if (cnt != nhere)
|
||||
{
|
||||
- if (cp[cnt] > usrc[cnt])
|
||||
+ if (cnt == len || cp[cnt] > usrc[cnt])
|
||||
{
|
||||
/* Cannot be in this range. */
|
||||
cp += 2 * nhere;
|
||||
diff --git a/locale/weightwc.h b/locale/weightwc.h
|
||||
index 9ea1126..7862091 100644
|
||||
--- a/locale/weightwc.h
|
||||
+++ b/locale/weightwc.h
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 1996-2001,2003,2004,2005,2007 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 1996-2001,2003,2004,2005,2007,2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Ulrich Drepper, <drepper@cygnus.com>.
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
/* Find index of weight. */
|
||||
auto inline int32_t
|
||||
__attribute ((always_inline))
|
||||
-findidx (const wint_t **cpp)
|
||||
+findidx (const wint_t **cpp, size_t len)
|
||||
{
|
||||
wint_t ch = *(*cpp)++;
|
||||
int32_t i = __collidx_table_lookup ((const char *) table, ch);
|
||||
@@ -32,6 +32,7 @@ findidx (const wint_t **cpp)
|
||||
/* Oh well, more than one sequence starting with this byte.
|
||||
Search for the correct one. */
|
||||
const int32_t *cp = (const int32_t *) &extra[-i];
|
||||
+ --len;
|
||||
while (1)
|
||||
{
|
||||
size_t nhere;
|
||||
@@ -54,7 +55,7 @@ findidx (const wint_t **cpp)
|
||||
already. */
|
||||
size_t cnt;
|
||||
|
||||
- for (cnt = 0; cnt < nhere; ++cnt)
|
||||
+ for (cnt = 0; cnt < nhere && cnt < len; ++cnt)
|
||||
if (cp[cnt] != usrc[cnt])
|
||||
break;
|
||||
|
||||
@@ -75,7 +76,7 @@ findidx (const wint_t **cpp)
|
||||
size_t cnt;
|
||||
size_t offset;
|
||||
|
||||
- for (cnt = 0; cnt < nhere - 1; ++cnt)
|
||||
+ for (cnt = 0; cnt < nhere - 1 && cnt < len; ++cnt)
|
||||
if (cp[cnt] != usrc[cnt])
|
||||
break;
|
||||
|
||||
diff --git a/posix/fnmatch_loop.c b/posix/fnmatch_loop.c
|
||||
index 18a6667..72bd3ee 100644
|
||||
--- a/posix/fnmatch_loop.c
|
||||
+++ b/posix/fnmatch_loop.c
|
||||
@@ -412,7 +412,7 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used)
|
||||
_NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB);
|
||||
# endif
|
||||
|
||||
- idx = findidx (&cp);
|
||||
+ idx = findidx (&cp, 1);
|
||||
if (idx != 0)
|
||||
{
|
||||
/* We found a table entry. Now see whether the
|
||||
@@ -422,7 +422,7 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used)
|
||||
int32_t idx2;
|
||||
const UCHAR *np = (const UCHAR *) n;
|
||||
|
||||
- idx2 = findidx (&np);
|
||||
+ idx2 = findidx (&np, string_end - n);
|
||||
if (idx2 != 0
|
||||
&& (idx >> 24) == (idx2 >> 24)
|
||||
&& len == weights[idx2 & 0xffffff])
|
||||
diff --git a/posix/regcomp.c b/posix/regcomp.c
|
||||
index b238c08..34ee845 100644
|
||||
--- a/posix/regcomp.c
|
||||
+++ b/posix/regcomp.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Extended regular expression matching and search library.
|
||||
- Copyright (C) 2002-2007,2009,2010 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 2002-2007,2009,2010,2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
|
||||
|
||||
@@ -3409,19 +3409,18 @@ build_equiv_class (bitset_t sbcset, const unsigned char *name)
|
||||
_NL_COLLATE_EXTRAMB);
|
||||
indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE,
|
||||
_NL_COLLATE_INDIRECTMB);
|
||||
- idx1 = findidx (&cp);
|
||||
- if (BE (idx1 == 0 || cp < name + strlen ((const char *) name), 0))
|
||||
+ idx1 = findidx (&cp, -1);
|
||||
+ if (BE (idx1 == 0 || *cp != '\0', 0))
|
||||
/* This isn't a valid character. */
|
||||
return REG_ECOLLATE;
|
||||
|
||||
/* Build single byte matcing table for this equivalence class. */
|
||||
- char_buf[1] = (unsigned char) '\0';
|
||||
len = weights[idx1 & 0xffffff];
|
||||
for (ch = 0; ch < SBC_MAX; ++ch)
|
||||
{
|
||||
char_buf[0] = ch;
|
||||
cp = char_buf;
|
||||
- idx2 = findidx (&cp);
|
||||
+ idx2 = findidx (&cp, 1);
|
||||
/*
|
||||
idx2 = table[ch];
|
||||
*/
|
||||
|
||||
--- a/posix/regex_internal.h 2011-11-30 12:47:02.706567482 -0700
|
||||
+++ a/posix/regex_internal.h 2011-11-30 12:47:32.969558337 -0700
|
||||
@@ -756,7 +756,7 @@
|
||||
indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE,
|
||||
_NL_COLLATE_INDIRECTMB);
|
||||
p = pstr->mbs + idx;
|
||||
- tmp = findidx (&p);
|
||||
+ tmp = findidx (&p, pstr->len - idx);
|
||||
return p - pstr->mbs - idx;
|
||||
}
|
||||
else
|
||||
diff --git a/posix/regexec.c b/posix/regexec.c
|
||||
index 9e0c565..3ea810b 100644
|
||||
--- a/posix/regexec.c
|
||||
+++ b/posix/regexec.c
|
||||
@@ -3924,7 +3924,7 @@ check_node_accept_bytes (const re_dfa_t *dfa, int node_idx,
|
||||
_NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB);
|
||||
indirect = (const int32_t *)
|
||||
_NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB);
|
||||
- int32_t idx = findidx (&cp);
|
||||
+ int32_t idx = findidx (&cp, elem_len);
|
||||
if (idx > 0)
|
||||
for (i = 0; i < cset->nequiv_classes; ++i)
|
||||
{
|
||||
diff --git a/string/strcoll_l.c b/string/strcoll_l.c
|
||||
index d8d1139..fb77d08 100644
|
||||
--- a/string/strcoll_l.c
|
||||
+++ b/string/strcoll_l.c
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 1995-1997,2002,2004,2007,2010 Free Software Foundation, Inc.
|
||||
+/* Copyright (C) 1995-1997,2002,2004,2007,2010,2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Ulrich Drepper <drepper@gnu.org>, 1995.
|
||||
|
||||
@@ -205,7 +205,7 @@ STRCOLL (s1, s2, l)
|
||||
|
||||
while (*us1 != L('\0'))
|
||||
{
|
||||
- int32_t tmp = findidx (&us1);
|
||||
+ int32_t tmp = findidx (&us1, -1);
|
||||
rule1arr[idx1max] = tmp >> 24;
|
||||
idx1arr[idx1max] = tmp & 0xffffff;
|
||||
idx1cnt = idx1max++;
|
||||
@@ -267,7 +267,7 @@ STRCOLL (s1, s2, l)
|
||||
|
||||
while (*us2 != L('\0'))
|
||||
{
|
||||
- int32_t tmp = findidx (&us2);
|
||||
+ int32_t tmp = findidx (&us2, -1);
|
||||
rule2arr[idx2max] = tmp >> 24;
|
||||
idx2arr[idx2max] = tmp & 0xffffff;
|
||||
idx2cnt = idx2max++;
|
||||
diff --git a/string/strxfrm_l.c b/string/strxfrm_l.c
|
||||
index 220253c..b06556d 100644
|
||||
--- a/string/strxfrm_l.c
|
||||
+++ b/string/strxfrm_l.c
|
||||
@@ -176,7 +176,7 @@ STRXFRM (STRING_TYPE *dest, const STRING_TYPE *src, size_t n, __locale_t l)
|
||||
idxmax = 0;
|
||||
do
|
||||
{
|
||||
- int32_t tmp = findidx (&usrc);
|
||||
+ int32_t tmp = findidx (&usrc, -1);
|
||||
rulearr[idxmax] = tmp >> 24;
|
||||
idxarr[idxmax] = tmp & 0xffffff;
|
||||
|
45
glibc-rh758252.patch
Normal file
45
glibc-rh758252.patch
Normal file
@ -0,0 +1,45 @@
|
||||
commit 6257af2d05d460a0dd3e2a8268dd813edb980d81
|
||||
Author: Andreas Schwab <schwab@redhat.com>
|
||||
Date: Thu Dec 1 13:27:53 2011 +0100
|
||||
|
||||
Truncate time values in Linux futimes when falling back to utime
|
||||
|
||||
diff --git a/ChangeLog b/ChangeLog
|
||||
index 2bf0a0a..dddb628 100644
|
||||
--- a/ChangeLog
|
||||
+++ b/ChangeLog
|
||||
@@ -7,6 +7,12 @@
|
||||
* misc/bits/select2.h (__FD_ELT): Mark as extension. Add
|
||||
parenthesis.
|
||||
|
||||
+2011-12-01 Andreas Schwab <schwab@redhat.com>
|
||||
+
|
||||
+ * sysdeps/unix/sysv/linux/futimes.c: Truncate time values when
|
||||
+ falling back to utime.
|
||||
+
|
||||
+
|
||||
2011-11-29 Andreas Schwab <schwab@redhat.com>
|
||||
|
||||
* locale/weight.h (findidx): Add parameter len.
|
||||
diff --git a/sysdeps/unix/sysv/linux/futimes.c b/sysdeps/unix/sysv/linux/futimes.c
|
||||
index 272b83e..cd3cce6 100644
|
||||
--- a/sysdeps/unix/sysv/linux/futimes.c
|
||||
+++ b/sysdeps/unix/sysv/linux/futimes.c
|
||||
@@ -1,5 +1,5 @@
|
||||
/* futimes -- change access and modification times of open file. Linux version.
|
||||
- Copyright (C) 2002,2003,2005,2006,2007 Free Software Foundation, Inc.
|
||||
+ Copyright (C) 2002,2003,2005,2006,2007,2011 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
|
||||
@@ -95,8 +95,8 @@ __futimes (int fd, const struct timeval tvp[2])
|
||||
if (tvp != NULL)
|
||||
{
|
||||
times = &buf;
|
||||
- buf.actime = tvp[0].tv_sec + (tvp[0].tv_usec + 500000) / 1000000;
|
||||
- buf.modtime = tvp[1].tv_sec + (tvp[1].tv_usec + 500000) / 1000000;
|
||||
+ buf.actime = tvp[0].tv_sec;
|
||||
+ buf.modtime = tvp[1].tv_sec;
|
||||
}
|
||||
else
|
||||
times = NULL;
|
82
glibc-rh767696.patch
Normal file
82
glibc-rh767696.patch
Normal file
@ -0,0 +1,82 @@
|
||||
commit 97ac2654b2d831acaa18a2b018b0736245903fd2
|
||||
Author: Ulrich Drepper <drepper@gmail.com>
|
||||
Date: Sat Dec 17 20:18:42 2011 -0500
|
||||
|
||||
Check values from TZ file header
|
||||
|
||||
|
||||
[BZ #13506]
|
||||
* time/tzfile.c (__tzfile_read): Check values from file header.
|
||||
|
||||
diff --git a/time/tzfile.c b/time/tzfile.c
|
||||
index 144e20b..402389c 100644
|
||||
--- a/time/tzfile.c
|
||||
+++ b/time/tzfile.c
|
||||
@@ -234,23 +234,58 @@ __tzfile_read (const char *file, size_t extra, char **extrap)
|
||||
goto read_again;
|
||||
}
|
||||
|
||||
+ if (__builtin_expect (num_transitions
|
||||
+ > ((SIZE_MAX - (__alignof__ (struct ttinfo) - 1))
|
||||
+ / (sizeof (time_t) + 1)), 0))
|
||||
+ goto lose;
|
||||
total_size = num_transitions * (sizeof (time_t) + 1);
|
||||
total_size = ((total_size + __alignof__ (struct ttinfo) - 1)
|
||||
& ~(__alignof__ (struct ttinfo) - 1));
|
||||
types_idx = total_size;
|
||||
- total_size += num_types * sizeof (struct ttinfo) + chars;
|
||||
+ if (__builtin_expect (num_types
|
||||
+ > (SIZE_MAX - total_size) / sizeof (struct ttinfo), 0))
|
||||
+ goto lose;
|
||||
+ total_size += num_types * sizeof (struct ttinfo);
|
||||
+ if (__builtin_expect (chars > SIZE_MAX - total_size, 0))
|
||||
+ goto lose;
|
||||
+ total_size += chars;
|
||||
+ if (__builtin_expect (__alignof__ (struct leap) - 1
|
||||
+ > SIZE_MAX - total_size, 0))
|
||||
+ goto lose;
|
||||
total_size = ((total_size + __alignof__ (struct leap) - 1)
|
||||
& ~(__alignof__ (struct leap) - 1));
|
||||
leaps_idx = total_size;
|
||||
+ if (__builtin_expect (num_leaps
|
||||
+ > (SIZE_MAX - total_size) / sizeof (struct leap), 0))
|
||||
+ goto lose;
|
||||
total_size += num_leaps * sizeof (struct leap);
|
||||
- tzspec_len = (sizeof (time_t) == 8 && trans_width == 8
|
||||
- ? st.st_size - (ftello (f)
|
||||
- + num_transitions * (8 + 1)
|
||||
- + num_types * 6
|
||||
- + chars
|
||||
- + num_leaps * 12
|
||||
- + num_isstd
|
||||
- + num_isgmt) - 1 : 0);
|
||||
+ tzspec_len = 0;
|
||||
+ if (sizeof (time_t) == 8 && trans_width == 8)
|
||||
+ {
|
||||
+ off_t rem = st.st_size - ftello (f);
|
||||
+ if (__builtin_expect (rem < 0
|
||||
+ || (size_t) rem < (num_transitions * (8 + 1)
|
||||
+ + num_types * 6
|
||||
+ + chars), 0))
|
||||
+ goto lose;
|
||||
+ tzspec_len = (size_t) rem - (num_transitions * (8 + 1)
|
||||
+ + num_types * 6
|
||||
+ + chars);
|
||||
+ if (__builtin_expect (num_leaps > SIZE_MAX / 12
|
||||
+ || tzspec_len < num_leaps * 12, 0))
|
||||
+ goto lose;
|
||||
+ tzspec_len -= num_leaps * 12;
|
||||
+ if (__builtin_expect (tzspec_len < num_isstd, 0))
|
||||
+ goto lose;
|
||||
+ tzspec_len -= num_isstd;
|
||||
+ if (__builtin_expect (tzspec_len == 0 || tzspec_len - 1 < num_isgmt, 0))
|
||||
+ goto lose;
|
||||
+ tzspec_len -= num_isgmt + 1;
|
||||
+ if (__builtin_expect (SIZE_MAX - total_size < tzspec_len, 0))
|
||||
+ goto lose;
|
||||
+ }
|
||||
+ if (__builtin_expect (SIZE_MAX - total_size - tzspec_len < extra, 0))
|
||||
+ goto lose;
|
||||
|
||||
/* Allocate enough memory including the extra block requested by the
|
||||
caller. */
|
14
glibc-rh767746.patch
Normal file
14
glibc-rh767746.patch
Normal file
@ -0,0 +1,14 @@
|
||||
--- a/nptl/pthread_create.c 2011-12-13 11:41:37.000000000 -0700
|
||||
+++ b/nptl/pthread_create.c 2011-12-14 10:03:13.000000000 -0700
|
||||
@@ -440,8 +440,9 @@
|
||||
int err = ALLOCATE_STACK (iattr, &pd);
|
||||
if (__builtin_expect (err != 0, 0))
|
||||
/* Something went wrong. Maybe a parameter of the attributes is
|
||||
- invalid or we could not allocate memory. */
|
||||
- return err;
|
||||
+ invalid or we could not allocate memory. Note we have to
|
||||
+ translate error codes. */
|
||||
+ return err == ENOMEM ? EAGAIN : err;
|
||||
|
||||
|
||||
/* Initialize the TCB. All initializations with zero should be
|
24
glibc-rh769993.patch
Normal file
24
glibc-rh769993.patch
Normal file
@ -0,0 +1,24 @@
|
||||
commit d2daaa1eb6deaa17f6c9bc110cf7d927d8dcd767
|
||||
Author: Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
|
||||
Date: Wed Dec 21 13:27:09 2011 -0800
|
||||
|
||||
Define x86_64 feraiseexcept inline only under __USE_EXTERN_INLINES.
|
||||
|
||||
2011-12-19 Rafael Ávila de Espíndola <rafael.espindola@gmail.com>
|
||||
|
||||
* sysdeps/x86_64/fpu/bits/fenv.h (feraiseexcept): Define it only
|
||||
under [__USE_EXTERN_INLINES].
|
||||
|
||||
diff --git a/sysdeps/x86_64/fpu/bits/fenv.h b/sysdeps/x86_64/fpu/bits/fenv.h
|
||||
index 4af1643..d73859c 100644
|
||||
--- a/sysdeps/x86_64/fpu/bits/fenv.h
|
||||
+++ b/sysdeps/x86_64/fpu/bits/fenv.h
|
||||
@@ -97,7 +97,7 @@ fenv_t;
|
||||
#endif
|
||||
|
||||
|
||||
-#ifdef __OPTIMIZE__
|
||||
+#ifdef __USE_EXTERN_INLINES
|
||||
__BEGIN_DECLS
|
||||
|
||||
/* Optimized versions. */
|
240
glibc-rh794797.patch
Normal file
240
glibc-rh794797.patch
Normal file
@ -0,0 +1,240 @@
|
||||
From libc-alpha-return-25252-listarch-libc-alpha=sources dot redhat dot com at sourceware dot org Thu Feb 16 16:21:17 2012
|
||||
Return-Path: <libc-alpha-return-25252-listarch-libc-alpha=sources dot redhat dot com at sourceware dot org>
|
||||
Delivered-To: listarch-libc-alpha at sources dot redhat dot com
|
||||
Received: (qmail 5187 invoked by alias); 16 Feb 2012 16:21:14 -0000
|
||||
Delivered-To: moderator for libc-alpha at sourceware dot org
|
||||
Received: (qmail 2174 invoked by uid 22791); 16 Feb 2012 16:17:18 -0000
|
||||
X-SWARE-Spam-Status: No, hits=-2.0 required=5.0
|
||||
tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,TW_TV,TW_VB,TW_VF,T_RP_MATCHES_RCVD
|
||||
X-Spam-Check-By: sourceware.org
|
||||
Date: Thu, 16 Feb 2012 08:16:13 -0800
|
||||
From: Kees Cook <kees at outflux dot net>
|
||||
To: "Ryan S dot Arnold" <ryan dot arnold at gmail dot com>
|
||||
Cc: libc-alpha at sourceware dot org, Paul Eggert <eggert at cs dot ucla dot edu>,
|
||||
Roland McGrath <roland at hack dot frob dot com>,
|
||||
Andreas Schwab <schwab at linux-m68k dot org>
|
||||
Subject: Re: [PATCH] vfprintf: validate nargs and maybe allocate from heap
|
||||
Message-ID: <20120216161613.GZ20420@outflux.net>
|
||||
References: <20120206062537.GM4979@outflux.net>
|
||||
<20120207000509 dot GP4989 at outflux dot net>
|
||||
<20120210192457 dot GF20420 at outflux dot net>
|
||||
<CAAKybw8AgkGsKAx=kvX4Tsi74f+HtuVnatTCB0VfsHi7vVFi1Q at mail dot gmail dot com>
|
||||
<20120214223048 dot GM20420 at outflux dot net>
|
||||
<CAAKybw_HS+cav+YcDw3ns7UXu6_xA7EHPrkiB87P+OGwEB0PVQ at mail dot gmail dot com>
|
||||
<20120214224543 dot GN20420 at outflux dot net>
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=us-ascii
|
||||
Content-Disposition: inline
|
||||
In-Reply-To: <20120214224543 dot GN20420 at outflux dot net>
|
||||
X-MIMEDefang-Filter: outflux$Revision: 1.316 $
|
||||
X-HELO: www.outflux.net
|
||||
Mailing-List: contact libc-alpha-help at sourceware dot org; run by ezmlm
|
||||
Precedence: bulk
|
||||
List-Id: <libc-alpha.sourceware.org>
|
||||
List-Subscribe: <mailto:libc-alpha-subscribe at sourceware dot org>
|
||||
List-Archive: <http://sourceware.org/ml/libc-alpha/>
|
||||
List-Post: <mailto:libc-alpha at sourceware dot org>
|
||||
List-Help: <mailto:libc-alpha-help at sourceware dot org>, <http://sourceware dot org/ml/#faqs>
|
||||
Sender: libc-alpha-owner at sourceware dot org
|
||||
Delivered-To: mailing list libc-alpha at sourceware dot org
|
||||
|
||||
The nargs value can overflow when doing allocations, allowing arbitrary
|
||||
memory writes via format strings, bypassing _FORTIFY_SOURCE:
|
||||
http://www.phrack.org/issues.html?issue=67&id=9
|
||||
|
||||
This checks for nargs overflow and possibly allocates from heap instead of
|
||||
stack, and adds a regression test for the situation.
|
||||
|
||||
I have FSF assignment via Google. (Sent from @outflux since that's how I'm
|
||||
subscribed here, but CL shows @chromium.org as part of my Google work.)
|
||||
|
||||
This version disables the useless test on non-32-bit platforms.
|
||||
|
||||
2012-02-16 Kees Cook <keescook@chromium.org>
|
||||
|
||||
[BZ #13656]
|
||||
* stdio-common/vfprintf.c (vfprintf): Check for nargs overflow and
|
||||
possibly allocate from heap instead of stack.
|
||||
* stdio-common/bug-vfprintf-nargs.c: New file.
|
||||
* stdio-common/Makefile (tests): Add nargs overflow test.
|
||||
|
||||
diff --git a/stdio-common/Makefile b/stdio-common/Makefile
|
||||
index a847b28..080badc 100644
|
||||
--- a/stdio-common/Makefile
|
||||
+++ b/stdio-common/Makefile
|
||||
@@ -59,7 +59,8 @@ tests := tstscanf test_rdwr test-popen tstgetln test-fseek \
|
||||
tst-popen tst-unlockedio tst-fmemopen2 tst-put-error tst-fgets \
|
||||
tst-fwrite bug16 bug17 tst-swscanf tst-sprintf2 bug18 bug18a \
|
||||
bug19 bug19a tst-popen2 scanf13 scanf14 scanf15 bug20 bug21 bug22 \
|
||||
- scanf16 scanf17 tst-setvbuf1 tst-grouping bug23 bug24
|
||||
+ scanf16 scanf17 tst-setvbuf1 tst-grouping bug23 bug24 \
|
||||
+ bug-vfprintf-nargs
|
||||
|
||||
test-srcs = tst-unbputc tst-printf
|
||||
|
||||
diff --git a/stdio-common/bug-vfprintf-nargs.c b/stdio-common/bug-vfprintf-nargs.c
|
||||
new file mode 100644
|
||||
index 0000000..13c66c0
|
||||
--- /dev/null
|
||||
+++ b/stdio-common/bug-vfprintf-nargs.c
|
||||
@@ -0,0 +1,78 @@
|
||||
+/* Test for vfprintf nargs allocation overflow (BZ #13656).
|
||||
+ Copyright (C) 2012 Free Software Foundation, Inc.
|
||||
+ This file is part of the GNU C Library.
|
||||
+ Contributed by Kees Cook <keescook@chromium.org>, 2012.
|
||||
+
|
||||
+ The GNU C Library is free software; you can redistribute it and/or
|
||||
+ modify it under the terms of the GNU Lesser General Public
|
||||
+ License as published by the Free Software Foundation; either
|
||||
+ version 2.1 of the License, or (at your option) any later version.
|
||||
+
|
||||
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ Lesser General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU Lesser General Public
|
||||
+ License along with the GNU C Library; if not, write to the Free
|
||||
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
+ 02111-1307 USA. */
|
||||
+
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <stdint.h>
|
||||
+#include <unistd.h>
|
||||
+#include <inttypes.h>
|
||||
+#include <string.h>
|
||||
+#include <signal.h>
|
||||
+
|
||||
+static int
|
||||
+format_failed (const char *fmt, const char *expected)
|
||||
+{
|
||||
+ char output[80];
|
||||
+
|
||||
+ printf ("%s : ", fmt);
|
||||
+
|
||||
+ memset (output, 0, sizeof output);
|
||||
+ /* Having sprintf itself detect a failure is good. */
|
||||
+ if (sprintf (output, fmt, 1, 2, 3, "test") > 0
|
||||
+ && strcmp (output, expected) != 0)
|
||||
+ {
|
||||
+ printf ("FAIL (output '%s' != expected '%s')\n", output, expected);
|
||||
+ return 1;
|
||||
+ }
|
||||
+ puts ("ok");
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+do_test (void)
|
||||
+{
|
||||
+ int rc = 0;
|
||||
+ char buf[64];
|
||||
+
|
||||
+ /* Regular positionals work. */
|
||||
+ if (format_failed ("%1$d", "1") != 0)
|
||||
+ rc = 1;
|
||||
+
|
||||
+ /* Regular width positionals work. */
|
||||
+ if (format_failed ("%1$*2$d", " 1") != 0)
|
||||
+ rc = 1;
|
||||
+
|
||||
+ /* Positional arguments are constructed via read_int, so nargs can only
|
||||
+ overflow on 32-bit systems. On 64-bit systems, it will attempt to
|
||||
+ allocate a giant amount of memory and possibly crash, which is the
|
||||
+ expected situation. Since the 64-bit behavior is arch-specific, only
|
||||
+ test this on 32-bit systems. */
|
||||
+ if (sizeof (long int) == 4)
|
||||
+ {
|
||||
+ sprintf (buf, "%%1$d %%%" PRIdPTR "$d", UINT32_MAX / sizeof (int));
|
||||
+ if (format_failed (buf, "1 %$d") != 0)
|
||||
+ rc = 1;
|
||||
+ }
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
+
|
||||
+#define TEST_FUNCTION do_test ()
|
||||
+#include "../test-skeleton.c"
|
||||
diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
|
||||
index 863cd5d..022e72b 100644
|
||||
--- a/stdio-common/vfprintf.c
|
||||
+++ b/stdio-common/vfprintf.c
|
||||
@@ -235,6 +235,9 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
|
||||
0 if unknown. */
|
||||
int readonly_format = 0;
|
||||
|
||||
+ /* For the argument descriptions, which may be allocated on the heap. */
|
||||
+ void *args_malloced = NULL;
|
||||
+
|
||||
/* This table maps a character into a number representing a
|
||||
class. In each step there is a destination label for each
|
||||
class. */
|
||||
@@ -1647,9 +1650,10 @@ do_positional:
|
||||
determine the size of the array needed to store the argument
|
||||
attributes. */
|
||||
size_t nargs = 0;
|
||||
- int *args_type;
|
||||
- union printf_arg *args_value = NULL;
|
||||
+ size_t bytes_per_arg;
|
||||
+ union printf_arg *args_value;
|
||||
int *args_size;
|
||||
+ int *args_type;
|
||||
|
||||
/* Positional parameters refer to arguments directly. This could
|
||||
also determine the maximum number of arguments. Track the
|
||||
@@ -1698,13 +1702,33 @@ do_positional:
|
||||
|
||||
/* Determine the number of arguments the format string consumes. */
|
||||
nargs = MAX (nargs, max_ref_arg);
|
||||
+ bytes_per_arg = sizeof (*args_value) + sizeof (*args_size)
|
||||
+ + sizeof (*args_type);
|
||||
+
|
||||
+ /* Check for potential integer overflow. */
|
||||
+ if (nargs > SIZE_MAX / bytes_per_arg)
|
||||
+ {
|
||||
+ done = -1;
|
||||
+ goto all_done;
|
||||
+ }
|
||||
|
||||
/* Allocate memory for the argument descriptions. */
|
||||
- args_type = alloca (nargs * sizeof (int));
|
||||
+ if (__libc_use_alloca (nargs * bytes_per_arg))
|
||||
+ args_value = alloca (nargs * bytes_per_arg);
|
||||
+ else
|
||||
+ {
|
||||
+ args_value = args_malloced = malloc (nargs * bytes_per_arg);
|
||||
+ if (args_value == NULL)
|
||||
+ {
|
||||
+ done = -1;
|
||||
+ goto all_done;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ args_size = &args_value[nargs].pa_int;
|
||||
+ args_type = &args_size[nargs];
|
||||
memset (args_type, s->_flags2 & _IO_FLAGS2_FORTIFY ? '\xff' : '\0',
|
||||
- nargs * sizeof (int));
|
||||
- args_value = alloca (nargs * sizeof (union printf_arg));
|
||||
- args_size = alloca (nargs * sizeof (int));
|
||||
+ nargs * sizeof (*args_type));
|
||||
|
||||
/* XXX Could do sanity check here: If any element in ARGS_TYPE is
|
||||
still zero after this loop, format is invalid. For now we
|
||||
@@ -1973,8 +1997,8 @@ do_positional:
|
||||
}
|
||||
|
||||
all_done:
|
||||
- if (__builtin_expect (workstart != NULL, 0))
|
||||
- free (workstart);
|
||||
+ free (args_malloced);
|
||||
+ free (workstart);
|
||||
/* Unlock the stream. */
|
||||
_IO_funlockfile (s);
|
||||
_IO_cleanup_region_end (0);
|
||||
--
|
||||
1.7.5.4
|
||||
|
||||
--
|
||||
Kees Cook @outflux.net
|
||||
|
@ -1,91 +0,0 @@
|
||||
Short description: fnmatch() fails with MBCS.
|
||||
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
|
||||
Origin: PATCH
|
||||
Bug-RHEL: #819430, #826149, #826151
|
||||
Bug-Upstream: #14185
|
||||
Upstream status: not-submitted
|
||||
|
||||
fnmatch() fails when '*' wildcard is applied on the file name
|
||||
containing multi-byte character(s)
|
||||
|
||||
This needs to be reviewed thoroughly and go upstream with a
|
||||
new test case.
|
||||
|
||||
diff -Nrup a/posix/fnmatch.c b/posix/fnmatch.c
|
||||
--- a/posix/fnmatch.c 2012-01-01 07:16:32.000000000 -0500
|
||||
+++ b/posix/fnmatch.c 2012-05-23 14:14:29.099461189 -0400
|
||||
@@ -333,6 +333,7 @@ fnmatch (pattern, string, flags)
|
||||
# if HANDLE_MULTIBYTE
|
||||
if (__builtin_expect (MB_CUR_MAX, 1) != 1)
|
||||
{
|
||||
+ const char *orig_pattern = pattern;
|
||||
mbstate_t ps;
|
||||
size_t n;
|
||||
const char *p;
|
||||
@@ -356,10 +357,8 @@ fnmatch (pattern, string, flags)
|
||||
alloca_used);
|
||||
n = mbsrtowcs (wpattern, &p, n + 1, &ps);
|
||||
if (__glibc_unlikely (n == (size_t) -1))
|
||||
- /* Something wrong.
|
||||
- XXX Do we have to set `errno' to something which mbsrtows hasn't
|
||||
- already done? */
|
||||
- return -1;
|
||||
+ /* Something wrong: Fall back to single byte matching. */
|
||||
+ goto try_singlebyte;
|
||||
if (p)
|
||||
{
|
||||
memset (&ps, '\0', sizeof (ps));
|
||||
@@ -371,10 +370,8 @@ fnmatch (pattern, string, flags)
|
||||
prepare_wpattern:
|
||||
n = mbsrtowcs (NULL, &pattern, 0, &ps);
|
||||
if (__glibc_unlikely (n == (size_t) -1))
|
||||
- /* Something wrong.
|
||||
- XXX Do we have to set `errno' to something which mbsrtows hasn't
|
||||
- already done? */
|
||||
- return -1;
|
||||
+ /*Something wrong: Fall back to single byte matching. */
|
||||
+ goto try_singlebyte;
|
||||
if (__glibc_unlikely (n >= (size_t) -1 / sizeof (wchar_t)))
|
||||
{
|
||||
__set_errno (ENOMEM);
|
||||
@@ -401,14 +398,8 @@ fnmatch (pattern, string, flags)
|
||||
alloca_used);
|
||||
n = mbsrtowcs (wstring, &p, n + 1, &ps);
|
||||
if (__glibc_unlikely (n == (size_t) -1))
|
||||
- {
|
||||
- /* Something wrong.
|
||||
- XXX Do we have to set `errno' to something which
|
||||
- mbsrtows hasn't already done? */
|
||||
- free_return:
|
||||
- free (wpattern_malloc);
|
||||
- return -1;
|
||||
- }
|
||||
+ /* Something wrong: Fall back to single byte matching. */
|
||||
+ goto free_and_try_singlebyte;
|
||||
if (p)
|
||||
{
|
||||
memset (&ps, '\0', sizeof (ps));
|
||||
@@ -420,10 +411,8 @@ fnmatch (pattern, string, flags)
|
||||
prepare_wstring:
|
||||
n = mbsrtowcs (NULL, &string, 0, &ps);
|
||||
if (__glibc_unlikely (n == (size_t) -1))
|
||||
- /* Something wrong.
|
||||
- XXX Do we have to set `errno' to something which mbsrtows hasn't
|
||||
- already done? */
|
||||
- goto free_return;
|
||||
+ /* Something wrong: Fall back to singlebyte matching. */
|
||||
+ goto free_and_try_singlebyte;
|
||||
if (__glibc_unlikely (n >= (size_t) -1 / sizeof (wchar_t)))
|
||||
{
|
||||
free (wpattern_malloc);
|
||||
@@ -450,6 +439,10 @@ fnmatch (pattern, string, flags)
|
||||
free (wpattern_malloc);
|
||||
|
||||
return res;
|
||||
+ free_and_try_singlebyte:
|
||||
+ free(wpattern_malloc);
|
||||
+ try_singlebyte:
|
||||
+ pattern = orig_pattern;
|
||||
}
|
||||
# endif /* mbstate_t and mbsrtowcs or _LIBC. */
|
||||
|
@ -1,37 +0,0 @@
|
||||
Short description: Fix newlocale error return.
|
||||
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
|
||||
Origin: PATCH
|
||||
Bug-RHEL: #832516
|
||||
Bug-Fedora: #827510
|
||||
Bug-Upstream: #14247
|
||||
Upstream status: not-submitted
|
||||
|
||||
This needs to go upstream right away to fix the error case for
|
||||
newlocale not correctly returning an error.
|
||||
|
||||
2012-06-14 Jeff Law <law@redhat.com>
|
||||
|
||||
* locale/loadlocale.c (_nl_load_locale): Delay setting
|
||||
file->decided until we have successfully loaded the file's
|
||||
data.
|
||||
|
||||
diff --git a/locale/loadlocale.c b/locale/loadlocale.c
|
||||
index e3fa187..9fd9216 100644
|
||||
--- a/locale/loadlocale.c
|
||||
+++ b/locale/loadlocale.c
|
||||
@@ -169,7 +169,6 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
|
||||
int save_err;
|
||||
int alloc = ld_mapped;
|
||||
|
||||
- file->decided = 1;
|
||||
file->data = NULL;
|
||||
|
||||
fd = __open_nocancel (file->filename, O_RDONLY | O_CLOEXEC);
|
||||
@@ -278,6 +277,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
|
||||
newdata->alloc = alloc;
|
||||
|
||||
file->data = newdata;
|
||||
+ file->decided = 1;
|
||||
}
|
||||
|
||||
void
|
45238
glibc-rh841318.patch
Normal file
45238
glibc-rh841318.patch
Normal file
File diff suppressed because it is too large
Load Diff
353
glibc-rh847718.patch
Normal file
353
glibc-rh847718.patch
Normal file
@ -0,0 +1,353 @@
|
||||
diff -Nrup a/stdlib/Makefile b/stdlib/Makefile
|
||||
--- a/stdlib/Makefile 2011-10-19 05:03:31.000000000 -0600
|
||||
+++ b/stdlib/Makefile 2012-08-15 10:04:53.514783877 -0600
|
||||
@@ -71,7 +71,7 @@ tests := tst-strtol tst-strtod testmb t
|
||||
tst-atof1 tst-atof2 tst-strtod2 tst-strtod3 tst-rand48-2 \
|
||||
tst-makecontext tst-strtod4 tst-strtod5 tst-qsort2 \
|
||||
tst-makecontext2 tst-strtod6 tst-unsetenv1 \
|
||||
- tst-makecontext3 bug-getcontext
|
||||
+ tst-makecontext3 bug-getcontext tst-strtod-overflow
|
||||
|
||||
include ../Makeconfig
|
||||
|
||||
diff -Nrup a/stdlib/strtod_l.c b/stdlib/strtod_l.c
|
||||
--- a/stdlib/strtod_l.c 2011-10-19 05:03:31.000000000 -0600
|
||||
+++ b/stdlib/strtod_l.c 2012-08-15 10:04:53.595783593 -0600
|
||||
@@ -62,6 +62,7 @@ extern unsigned long long int ____strtou
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
+#include <stdint.h>
|
||||
|
||||
/* The gmp headers need some configuration frobs. */
|
||||
#define HAVE_ALLOCA 1
|
||||
@@ -176,19 +177,19 @@ extern const mp_limb_t _tens_in_limb[MAX
|
||||
/* Return a floating point number of the needed type according to the given
|
||||
multi-precision number after possible rounding. */
|
||||
static FLOAT
|
||||
-round_and_return (mp_limb_t *retval, int exponent, int negative,
|
||||
+round_and_return (mp_limb_t *retval, intmax_t exponent, int negative,
|
||||
mp_limb_t round_limb, mp_size_t round_bit, int more_bits)
|
||||
{
|
||||
if (exponent < MIN_EXP - 1)
|
||||
{
|
||||
- mp_size_t shift = MIN_EXP - 1 - exponent;
|
||||
-
|
||||
- if (shift > MANT_DIG)
|
||||
+ if (exponent < MIN_EXP - 1 - MANT_DIG)
|
||||
{
|
||||
__set_errno (ERANGE);
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
+ mp_size_t shift = MIN_EXP - 1 - exponent;
|
||||
+
|
||||
more_bits |= (round_limb & ((((mp_limb_t) 1) << round_bit) - 1)) != 0;
|
||||
if (shift == MANT_DIG)
|
||||
/* This is a special case to handle the very seldom case where
|
||||
@@ -235,6 +236,9 @@ round_and_return (mp_limb_t *retval, int
|
||||
__set_errno (ERANGE);
|
||||
}
|
||||
|
||||
+ if (exponent > MAX_EXP)
|
||||
+ goto overflow;
|
||||
+
|
||||
if ((round_limb & (((mp_limb_t) 1) << round_bit)) != 0
|
||||
&& (more_bits || (retval[0] & 1) != 0
|
||||
|| (round_limb & ((((mp_limb_t) 1) << round_bit) - 1)) != 0))
|
||||
@@ -260,6 +264,7 @@ round_and_return (mp_limb_t *retval, int
|
||||
}
|
||||
|
||||
if (exponent > MAX_EXP)
|
||||
+ overflow:
|
||||
return negative ? -FLOAT_HUGE_VAL : FLOAT_HUGE_VAL;
|
||||
|
||||
return MPN2FLOAT (retval, exponent, negative);
|
||||
@@ -273,7 +278,7 @@ round_and_return (mp_limb_t *retval, int
|
||||
factor for the resulting number (see code) multiply by it. */
|
||||
static const STRING_TYPE *
|
||||
str_to_mpn (const STRING_TYPE *str, int digcnt, mp_limb_t *n, mp_size_t *nsize,
|
||||
- int *exponent
|
||||
+ intmax_t *exponent
|
||||
#ifndef USE_WIDE_CHAR
|
||||
, const char *decimal, size_t decimal_len, const char *thousands
|
||||
#endif
|
||||
@@ -337,7 +342,7 @@ str_to_mpn (const STRING_TYPE *str, int
|
||||
}
|
||||
while (--digcnt > 0);
|
||||
|
||||
- if (*exponent > 0 && cnt + *exponent <= MAX_DIG_PER_LIMB)
|
||||
+ if (*exponent > 0 && *exponent <= MAX_DIG_PER_LIMB - cnt)
|
||||
{
|
||||
low *= _tens_in_limb[*exponent];
|
||||
start = _tens_in_limb[cnt + *exponent];
|
||||
@@ -415,7 +420,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group
|
||||
{
|
||||
int negative; /* The sign of the number. */
|
||||
MPN_VAR (num); /* MP representation of the number. */
|
||||
- int exponent; /* Exponent of the number. */
|
||||
+ intmax_t exponent; /* Exponent of the number. */
|
||||
|
||||
/* Numbers starting `0X' or `0x' have to be processed with base 16. */
|
||||
int base = 10;
|
||||
@@ -437,7 +442,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group
|
||||
/* Points at the character following the integer and fractional digits. */
|
||||
const STRING_TYPE *expp;
|
||||
/* Total number of digit and number of digits in integer part. */
|
||||
- int dig_no, int_no, lead_zero;
|
||||
+ size_t dig_no, int_no, lead_zero;
|
||||
/* Contains the last character read. */
|
||||
CHAR_TYPE c;
|
||||
|
||||
@@ -769,7 +774,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group
|
||||
are all or any is really a fractional digit will be decided
|
||||
later. */
|
||||
int_no = dig_no;
|
||||
- lead_zero = int_no == 0 ? -1 : 0;
|
||||
+ lead_zero = int_no == 0 ? (size_t) -1 : 0;
|
||||
|
||||
/* Read the fractional digits. A special case are the 'american
|
||||
style' numbers like `16.' i.e. with decimal point but without
|
||||
@@ -791,12 +796,13 @@ ____STRTOF_INTERNAL (nptr, endptr, group
|
||||
(base == 16 && ({ CHAR_TYPE lo = TOLOWER (c);
|
||||
lo >= L_('a') && lo <= L_('f'); })))
|
||||
{
|
||||
- if (c != L_('0') && lead_zero == -1)
|
||||
+ if (c != L_('0') && lead_zero == (size_t) -1)
|
||||
lead_zero = dig_no - int_no;
|
||||
++dig_no;
|
||||
c = *++cp;
|
||||
}
|
||||
}
|
||||
+ assert (dig_no <= (uintmax_t) INTMAX_MAX);
|
||||
|
||||
/* Remember start of exponent (if any). */
|
||||
expp = cp;
|
||||
@@ -819,24 +825,80 @@ ____STRTOF_INTERNAL (nptr, endptr, group
|
||||
|
||||
if (c >= L_('0') && c <= L_('9'))
|
||||
{
|
||||
- int exp_limit;
|
||||
+ intmax_t exp_limit;
|
||||
|
||||
/* Get the exponent limit. */
|
||||
if (base == 16)
|
||||
- exp_limit = (exp_negative ?
|
||||
- -MIN_EXP + MANT_DIG + 4 * int_no :
|
||||
- MAX_EXP - 4 * int_no + 4 * lead_zero + 3);
|
||||
+ {
|
||||
+ if (exp_negative)
|
||||
+ {
|
||||
+ assert (int_no <= (uintmax_t) (INTMAX_MAX
|
||||
+ + MIN_EXP - MANT_DIG) / 4);
|
||||
+ exp_limit = -MIN_EXP + MANT_DIG + 4 * (intmax_t) int_no;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if (int_no)
|
||||
+ {
|
||||
+ assert (lead_zero == 0
|
||||
+ && int_no <= (uintmax_t) INTMAX_MAX / 4);
|
||||
+ exp_limit = MAX_EXP - 4 * (intmax_t) int_no + 3;
|
||||
+ }
|
||||
+ else if (lead_zero == (size_t) -1)
|
||||
+ {
|
||||
+ /* The number is zero and this limit is
|
||||
+ arbitrary. */
|
||||
+ exp_limit = MAX_EXP + 3;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ assert (lead_zero
|
||||
+ <= (uintmax_t) (INTMAX_MAX - MAX_EXP - 3) / 4);
|
||||
+ exp_limit = (MAX_EXP
|
||||
+ + 4 * (intmax_t) lead_zero
|
||||
+ + 3);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
else
|
||||
- exp_limit = (exp_negative ?
|
||||
- -MIN_10_EXP + MANT_DIG + int_no :
|
||||
- MAX_10_EXP - int_no + lead_zero + 1);
|
||||
+ {
|
||||
+ if (exp_negative)
|
||||
+ {
|
||||
+ assert (int_no
|
||||
+ <= (uintmax_t) (INTMAX_MAX + MIN_10_EXP - MANT_DIG));
|
||||
+ exp_limit = -MIN_10_EXP + MANT_DIG + (intmax_t) int_no;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ if (int_no)
|
||||
+ {
|
||||
+ assert (lead_zero == 0
|
||||
+ && int_no <= (uintmax_t) INTMAX_MAX);
|
||||
+ exp_limit = MAX_10_EXP - (intmax_t) int_no + 1;
|
||||
+ }
|
||||
+ else if (lead_zero == (size_t) -1)
|
||||
+ {
|
||||
+ /* The number is zero and this limit is
|
||||
+ arbitrary. */
|
||||
+ exp_limit = MAX_10_EXP + 1;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ assert (lead_zero
|
||||
+ <= (uintmax_t) (INTMAX_MAX - MAX_10_EXP - 1));
|
||||
+ exp_limit = MAX_10_EXP + (intmax_t) lead_zero + 1;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (exp_limit < 0)
|
||||
+ exp_limit = 0;
|
||||
|
||||
do
|
||||
{
|
||||
- exponent *= 10;
|
||||
- exponent += c - L_('0');
|
||||
-
|
||||
- if (__builtin_expect (exponent > exp_limit, 0))
|
||||
+ if (__builtin_expect ((exponent > exp_limit / 10
|
||||
+ || (exponent == exp_limit / 10
|
||||
+ && c - L_('0') > exp_limit % 10)), 0))
|
||||
/* The exponent is too large/small to represent a valid
|
||||
number. */
|
||||
{
|
||||
@@ -845,7 +907,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group
|
||||
/* We have to take care for special situation: a joker
|
||||
might have written "0.0e100000" which is in fact
|
||||
zero. */
|
||||
- if (lead_zero == -1)
|
||||
+ if (lead_zero == (size_t) -1)
|
||||
result = negative ? -0.0 : 0.0;
|
||||
else
|
||||
{
|
||||
@@ -864,6 +926,9 @@ ____STRTOF_INTERNAL (nptr, endptr, group
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
+ exponent *= 10;
|
||||
+ exponent += c - L_('0');
|
||||
+
|
||||
c = *++cp;
|
||||
}
|
||||
while (c >= L_('0') && c <= L_('9'));
|
||||
@@ -932,7 +997,14 @@ ____STRTOF_INTERNAL (nptr, endptr, group
|
||||
}
|
||||
#endif
|
||||
startp += lead_zero + decimal_len;
|
||||
- exponent -= base == 16 ? 4 * lead_zero : lead_zero;
|
||||
+ assert (lead_zero <= (base == 16
|
||||
+ ? (uintmax_t) INTMAX_MAX / 4
|
||||
+ : (uintmax_t) INTMAX_MAX));
|
||||
+ assert (lead_zero <= (base == 16
|
||||
+ ? ((uintmax_t) exponent
|
||||
+ - (uintmax_t) INTMAX_MIN) / 4
|
||||
+ : ((uintmax_t) exponent - (uintmax_t) INTMAX_MIN)));
|
||||
+ exponent -= base == 16 ? 4 * (intmax_t) lead_zero : (intmax_t) lead_zero;
|
||||
dig_no -= lead_zero;
|
||||
}
|
||||
|
||||
@@ -974,7 +1046,10 @@ ____STRTOF_INTERNAL (nptr, endptr, group
|
||||
}
|
||||
|
||||
/* Adjust the exponent for the bits we are shifting in. */
|
||||
- exponent += bits - 1 + (int_no - 1) * 4;
|
||||
+ assert (int_no <= (uintmax_t) (exponent < 0
|
||||
+ ? (INTMAX_MAX - bits + 1) / 4
|
||||
+ : (INTMAX_MAX - exponent - bits + 1) / 4));
|
||||
+ exponent += bits - 1 + ((intmax_t) int_no - 1) * 4;
|
||||
|
||||
while (--dig_no > 0 && idx >= 0)
|
||||
{
|
||||
@@ -1014,13 +1089,15 @@ ____STRTOF_INTERNAL (nptr, endptr, group
|
||||
really integer digits or belong to the fractional part; i.e. we normalize
|
||||
123e-2 to 1.23. */
|
||||
{
|
||||
- register int incr = (exponent < 0 ? MAX (-int_no, exponent)
|
||||
- : MIN (dig_no - int_no, exponent));
|
||||
+ register intmax_t incr = (exponent < 0
|
||||
+ ? MAX (-(intmax_t) int_no, exponent)
|
||||
+ : MIN ((intmax_t) dig_no - (intmax_t) int_no,
|
||||
+ exponent));
|
||||
int_no += incr;
|
||||
exponent -= incr;
|
||||
}
|
||||
|
||||
- if (__builtin_expect (int_no + exponent > MAX_10_EXP + 1, 0))
|
||||
+ if (__builtin_expect (exponent > MAX_10_EXP + 1 - (intmax_t) int_no, 0))
|
||||
{
|
||||
__set_errno (ERANGE);
|
||||
return negative ? -FLOAT_HUGE_VAL : FLOAT_HUGE_VAL;
|
||||
@@ -1205,7 +1282,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group
|
||||
digits we should have enough bits for the result. The remaining
|
||||
decimal digits give us the information that more bits are following.
|
||||
This can be used while rounding. (Two added as a safety margin.) */
|
||||
- if (dig_no - int_no > (MANT_DIG - bits + 2) / 3 + 2)
|
||||
+ if ((intmax_t) dig_no > (intmax_t) int_no + (MANT_DIG - bits + 2) / 3 + 2)
|
||||
{
|
||||
dig_no = int_no + (MANT_DIG - bits + 2) / 3 + 2;
|
||||
more_bits = 1;
|
||||
@@ -1213,7 +1290,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group
|
||||
else
|
||||
more_bits = 0;
|
||||
|
||||
- neg_exp = dig_no - int_no - exponent;
|
||||
+ neg_exp = (intmax_t) dig_no - (intmax_t) int_no - exponent;
|
||||
|
||||
/* Construct the denominator. */
|
||||
densize = 0;
|
||||
diff -Nrup a/stdlib/tst-strtod-overflow.c b/stdlib/tst-strtod-overflow.c
|
||||
--- a/stdlib/tst-strtod-overflow.c 1969-12-31 17:00:00.000000000 -0700
|
||||
+++ b/stdlib/tst-strtod-overflow.c 2012-08-15 10:04:54.483780474 -0600
|
||||
@@ -0,0 +1,48 @@
|
||||
+/* Test for integer/buffer overflow in strtod.
|
||||
+ Copyright (C) 2012 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
|
||||
+ modify it under the terms of the GNU Lesser General Public
|
||||
+ License as published by the Free Software Foundation; either
|
||||
+ version 2.1 of the License, or (at your option) any later version.
|
||||
+
|
||||
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ Lesser General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU Lesser General Public
|
||||
+ License along with the GNU C Library; if not, see
|
||||
+ <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <string.h>
|
||||
+
|
||||
+#define EXPONENT "e-2147483649"
|
||||
+#define SIZE 214748364
|
||||
+
|
||||
+static int
|
||||
+do_test (void)
|
||||
+{
|
||||
+ char *p = malloc (1 + SIZE + sizeof (EXPONENT));
|
||||
+ if (p == NULL)
|
||||
+ {
|
||||
+ puts ("malloc failed, cannot test for overflow");
|
||||
+ return 0;
|
||||
+ }
|
||||
+ p[0] = '1';
|
||||
+ memset (p + 1, '0', SIZE);
|
||||
+ memcpy (p + 1 + SIZE, EXPONENT, sizeof (EXPONENT));
|
||||
+ double d = strtod (p, NULL);
|
||||
+ if (d != 0)
|
||||
+ {
|
||||
+ printf ("strtod returned wrong value: %a\n", d);
|
||||
+ return 1;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+#define TEST_FUNCTION do_test ()
|
||||
+#include "../test-skeleton.c"
|
8225
glibc.spec
8225
glibc.spec
File diff suppressed because it is too large
Load Diff
273
power6emul.c
273
power6emul.c
@ -1,273 +0,0 @@
|
||||
/* Emulate power6 mf[tf]gpr and fri[zpmn] instructions.
|
||||
Copyright (C) 2006 Red Hat, Inc.
|
||||
Contributed by Jakub Jelinek <jakub@redhat.com>, 2006.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
It is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
|
||||
extern double frip (double), friz (double), frin (double), frim (double);
|
||||
asm (".globl frip, friz, frin, frim\n.hidden frip, friz, frin, frim\n\t"
|
||||
#ifdef __powerpc64__
|
||||
".section \".toc\",\"aw\"\n"
|
||||
"8:" ".tc FD_43300000_0[TC],0x4330000000000000\n"
|
||||
"9:" ".tc FD_3fe00000_0[TC],0x3fe0000000000000\n\t"
|
||||
".previous\n\t"
|
||||
#else
|
||||
".rodata\n\t"
|
||||
".align 2\n"
|
||||
"8:" ".long 0x59800000\n"
|
||||
"9:" ".long 0x3f000000\n\t"
|
||||
".previous\n\t"
|
||||
#endif
|
||||
"# frip == ceil\n"
|
||||
"frip:" "mffs 11\n\t"
|
||||
#ifdef __powerpc64__
|
||||
"lfd 13,8b@toc(2)\n\t"
|
||||
#else
|
||||
"mflr 11\n\t"
|
||||
"bcl 20,31,1f\n"
|
||||
"1:" "mflr 9\n\t"
|
||||
"addis 9,9,8b-1b@ha\n\t"
|
||||
"lfs 13,8b-1b@l(9)\n\t"
|
||||
"mtlr 11\n\t"
|
||||
#endif
|
||||
"fabs 0,1\n\t"
|
||||
"fsub 12,13,13\n\t"
|
||||
"fcmpu 7,0,13\n\t"
|
||||
"fcmpu 6,1,12\n\t"
|
||||
"bnllr- 7\n\t"
|
||||
"mtfsfi 7,2\n\t"
|
||||
"ble- 6,2f\n\t"
|
||||
"fadd 1,1,13\n\t"
|
||||
"fsub 1,1,13\n\t"
|
||||
"fabs 1,1\n\t"
|
||||
"mtfsf 0x01,11\n\t"
|
||||
"blr\n"
|
||||
"2:" "bge- 6,3f\n\t"
|
||||
"fsub 1,1,13\n\t"
|
||||
"fadd 1,1,13\n\t"
|
||||
"fnabs 1,1\n"
|
||||
"3:" "mtfsf 0x01,11\n\t"
|
||||
"blr\n\t"
|
||||
"# friz == trunc\n"
|
||||
"friz:" "mffs 11\n\t"
|
||||
#ifdef __powerpc64__
|
||||
"lfd 13,8b@toc(2)\n\t"
|
||||
#else
|
||||
"mflr 11\n\t"
|
||||
"bcl 20,31,1f\n"
|
||||
"1:" "mflr 9\n\t"
|
||||
"addis 9,9,8b-1b@ha\n\t"
|
||||
"lfs 13,8b-1b@l(9)\n\t"
|
||||
"mtlr 11\n\t"
|
||||
#endif
|
||||
"fabs 0,1\n\t"
|
||||
"fsub 12,13,13\n\t"
|
||||
"fcmpu 7,0,13\n\t"
|
||||
"fcmpu 6,1,12\n\t"
|
||||
"bnllr- 7\n\t"
|
||||
"mtfsfi 7,1\n\t"
|
||||
"ble- 6,2f\n\t"
|
||||
"fadd 1,1,13\n\t"
|
||||
"fsub 1,1,13\n\t"
|
||||
"fabs 1,1\n\t"
|
||||
"mtfsf 0x01,11\n\t"
|
||||
"blr\n"
|
||||
"2:" "bge- 6,3f\n\t"
|
||||
"fsub 1,1,13\n\t"
|
||||
"fadd 1,1,13\n\t"
|
||||
"fnabs 1,1\n"
|
||||
"3:" "mtfsf 0x01,11\n\t"
|
||||
"blr\n\t"
|
||||
"# frin == round\n"
|
||||
"frin:" "mffs 11\n\t"
|
||||
#ifdef __powerpc64__
|
||||
"lfd 13,8b@toc(2)\n\t"
|
||||
#else
|
||||
"mflr 11\n\t"
|
||||
"bcl 20,31,1f\n"
|
||||
"1:" "mflr 9\n\t"
|
||||
"addis 9,9,8b-1b@ha\n\t"
|
||||
"addi 9,9,8b-1b@l\n\t"
|
||||
"mtlr 11\n\t"
|
||||
"lfs 13,0(9)\n\t"
|
||||
#endif
|
||||
"fabs 0,1\n\t"
|
||||
"fsub 12,13,13\n\t"
|
||||
"fcmpu 7,0,13\n\t"
|
||||
"fcmpu 6,1,12\n\t"
|
||||
"bnllr- 7\n\t"
|
||||
"mtfsfi 7,1\n\t"
|
||||
#ifdef __powerpc64__
|
||||
"lfd 10,9b@toc(2)\n\t"
|
||||
#else
|
||||
"lfs 10,9b-8b(9)\n\t"
|
||||
#endif
|
||||
"ble- 6,2f\n\t"
|
||||
"fadd 1,1,10\n\t"
|
||||
"fadd 1,1,13\n\t"
|
||||
"fsub 1,1,13\n\t"
|
||||
"fabs 1,1\n\t"
|
||||
"mtfsf 0x01,11\n\t"
|
||||
"blr\n"
|
||||
"2:" "fsub 9,1,10\n\t"
|
||||
"bge- 6,3f\n\t"
|
||||
"fsub 1,9,13\n\t"
|
||||
"fadd 1,1,13\n\t"
|
||||
"fnabs 1,1\n"
|
||||
"3:" "mtfsf 0x01,11\n\t"
|
||||
"blr\n\t"
|
||||
"# frim == floor\n"
|
||||
"frim:" "mffs 11\n\t"
|
||||
#ifdef __powerpc64__
|
||||
"lfd 13,8b@toc(2)\n\t"
|
||||
#else
|
||||
"mflr 11\n\t"
|
||||
"bcl 20,31,1f\n"
|
||||
"1:" "mflr 9\n\t"
|
||||
"addis 9,9,8b-1b@ha\n\t"
|
||||
"lfs 13,8b-1b@l(9)\n\t"
|
||||
"mtlr 11\n\t"
|
||||
#endif
|
||||
"fabs 0,1\n\t"
|
||||
"fsub 12,13,13\n\t"
|
||||
"fcmpu 7,0,13\n\t"
|
||||
"fcmpu 6,1,12\n\t"
|
||||
"bnllr- 7\n\t"
|
||||
"mtfsfi 7,3\n\t"
|
||||
"ble- 6,2f\n\t"
|
||||
"fadd 1,1,13\n\t"
|
||||
"fsub 1,1,13\n\t"
|
||||
"fabs 1,1\n\t"
|
||||
"mtfsf 0x01,11\n\t"
|
||||
"blr\n"
|
||||
"2:" "bge- 6,3f\n\t"
|
||||
"fsub 1,1,13\n\t"
|
||||
"fadd 1,1,13\n\t"
|
||||
"fnabs 1,1\n"
|
||||
"3:" "mtfsf 0x01,11\n\t"
|
||||
"blr\n");
|
||||
|
||||
#ifdef __powerpc64__
|
||||
#define m1 0x5555555555555555L
|
||||
#define m2 0x3333333333333333L
|
||||
#define m3 0x0f0f0f0f0f0f0f0fL
|
||||
#else
|
||||
#define m1 0x55555555
|
||||
#define m2 0x33333333
|
||||
#define m3 0x0f0f0f0f
|
||||
#endif
|
||||
|
||||
static inline unsigned long
|
||||
popcntb (unsigned long n)
|
||||
{
|
||||
n -= (n >> 1) & m1;
|
||||
n = (n & m2) + ((n >> 2) & m2);
|
||||
n = (n + (n >> 4)) & m3;
|
||||
return n;
|
||||
}
|
||||
|
||||
static void
|
||||
catch_sigill (int signal, struct sigcontext *ctx)
|
||||
{
|
||||
unsigned int insn = *(unsigned int *) (ctx->regs->nip);
|
||||
#ifdef __powerpc64__
|
||||
if ((insn & 0xfc1f07ff) == 0x7c0005be) /* mftgpr */
|
||||
{
|
||||
unsigned long *regs = (unsigned long *) ctx->regs;
|
||||
unsigned fpr = (insn >> 11) & 0x1f;
|
||||
unsigned gpr = (insn >> 21) & 0x1f;
|
||||
regs[gpr] = regs[fpr + 0x30];
|
||||
ctx->regs->nip += 4;
|
||||
return;
|
||||
}
|
||||
if ((insn & 0xfc1f07ff) == 0x7c0004be) /*mffgpr */
|
||||
{
|
||||
unsigned long *regs = (unsigned long *) ctx->regs;
|
||||
unsigned fpr = (insn >> 21) & 0x1f;
|
||||
unsigned gpr = (insn >> 11) & 0x1f;
|
||||
regs[fpr + 0x30] = regs[gpr];
|
||||
ctx->regs->nip += 4;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
if ((insn & 0xfc1f073f) == 0xfc000310) /* fri[pznm] */
|
||||
{
|
||||
#ifdef __powerpc64__
|
||||
double *regs = (double *) (((char *) ctx->regs) + 0x30 * 8);
|
||||
unsigned int *fpscr = (unsigned int *) (((char *) ctx->regs) + 0x50 * 8 + 4);
|
||||
#else
|
||||
double *regs = (double *) (((char *) ctx->regs) + 0x30 * 4);
|
||||
unsigned int *fpscr = (unsigned int *) (((char *) ctx->regs) + 0x30 * 4 + 0x20 * 8 + 4);
|
||||
#endif
|
||||
unsigned dest = (insn >> 21) & 0x1f;
|
||||
unsigned src = (insn >> 11) & 0x1f;
|
||||
switch (insn & 0xc0)
|
||||
{
|
||||
case 0:
|
||||
regs[dest] = frin (regs[src]);
|
||||
break;
|
||||
case 0x40:
|
||||
regs[dest] = friz (regs[src]);
|
||||
break;
|
||||
case 0x80:
|
||||
regs[dest] = frip (regs[src]);
|
||||
break;
|
||||
case 0xc0:
|
||||
regs[dest] = frim (regs[src]);
|
||||
break;
|
||||
}
|
||||
/* Update raised exceptions. */
|
||||
union { unsigned int i[2]; double d; } u;
|
||||
asm volatile ("mffs %0" : "=f" (u.d));
|
||||
u.i[1] &= 0xfffe0000; /* Is this correct? */
|
||||
*fpscr |= u.i[1];
|
||||
ctx->regs->nip += 4;
|
||||
return;
|
||||
}
|
||||
if ((insn & 0xfc00ffff) == 0x7c0000f4) /* popcntb */
|
||||
{
|
||||
unsigned long *regs = (unsigned long *) ctx->regs;
|
||||
unsigned dest = (insn >> 16) & 0x1f;
|
||||
unsigned src = (insn >> 21) & 0x1f;
|
||||
unsigned long res = 0;
|
||||
int i;
|
||||
|
||||
regs[dest] = popcntb (regs[src]);
|
||||
ctx->regs->nip += 4;
|
||||
return;
|
||||
}
|
||||
|
||||
struct sigaction sa;
|
||||
sa.sa_handler = SIG_DFL;
|
||||
sigemptyset (&sa.sa_mask);
|
||||
sa.sa_flags = 0;
|
||||
sigaction (signal, &sa, NULL);
|
||||
raise (signal);
|
||||
}
|
||||
|
||||
static void
|
||||
__attribute__ ((constructor))
|
||||
install_handler (void)
|
||||
{
|
||||
struct sigaction sa;
|
||||
sa.sa_handler = (void *) catch_sigill;
|
||||
sigemptyset (&sa.sa_mask);
|
||||
sa.sa_flags = SA_RESTART;
|
||||
sigaction (SIGILL, &sa, NULL);
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Patches are in the current directory.
|
||||
export QUILT_PATCHES=$PWD
|
||||
# Extract source file name from sources file,
|
||||
# and assume it's the same name as the directory.
|
||||
source=`awk -F '[() ]+' '/^[A-Z0-9]+ /{print $2}; /^[0-9a-f]+ /{print $2}' sources`
|
||||
srcdir=${source%.tar.xz}
|
||||
if [ "$1" == "-f" ] && [ -d "$srcdir" ]; then
|
||||
echo Cleaning up $srcdir
|
||||
rm -rf $srcdir
|
||||
fi
|
||||
if [ -d "$srcdir" ]; then
|
||||
# Don't overwrite existing source directory.
|
||||
echo "ERROR: Source directory $srcdir already exists. Use -f to force cleanup step."
|
||||
exit 1
|
||||
fi
|
||||
tar Jxvf $source
|
||||
echo "Entering $srcdir"
|
||||
pushd $srcdir
|
||||
# Apply all patches.
|
||||
quilt push -a
|
||||
popd
|
4
sources
4
sources
@ -1 +1,3 @@
|
||||
SHA512 (glibc-2.30.9000-100-g1a6566094d.tar.xz) = e6054a8f1367fde262f023c76f7eaf5ce588613c4894b8d577c7e1c3159a2dfcefb7c60e301340b823cd8e6d2f8d264d7da83e61034b9180836d392d5db4c5ba
|
||||
6cb0f013d410bf40e1a1d28a5d9f95b9 glibc-2.14-394-g8f3b1ff-fedora.tar.xz
|
||||
860f193936a67a1fd1e06c2b85912477 glibc-2.14-394-g8f3b1ff.tar.xz
|
||||
9673adaacae3ac645748827a62876ce9 glibc-ports-2.14-25-gd3d9bde.tar.xz
|
||||
|
@ -1,11 +0,0 @@
|
||||
Short description: <Short description>
|
||||
Author(s): <Who wrote them. Comma separated.>
|
||||
Origin: <Source repo(s) where it came from or keyword "PATCH" if this is simply a patch>
|
||||
# Likely git://sourceware.org/git/glibc.git
|
||||
Bug-RHEL: <Rhel bug #'s, comma separated e.g. #XXX, #YYY, #ZZZ>
|
||||
Bug-Fedora: <Fedora bug #'s, comma separated e.g. #XXX, #YYY, #ZZZ>
|
||||
Bug-Upstream: <Upstream bug#'s, comma separated e.g. #XXX, #YYY, #ZZZ>
|
||||
Upstream status: <[Patchwork URL|libc-alpha URL|not-needed|not-submitted|committed] for each commit>
|
||||
# <Additional descriptive text follows 'Upstream status:' line>
|
||||
<If upstream status == committed then a copy of the upstream commit log follows>
|
||||
<Patch>
|
Loading…
Reference in New Issue
Block a user