diff options
| author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-10-31 09:19:28 +0100 |
|---|---|---|
| committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-10-31 09:19:28 +0100 |
| commit | 57da2a23951b1c5dbea3e9ceea60d50020141592 (patch) | |
| tree | cd03f44eed1e770c2d94a0e479a03db3c042b805 | |
| parent | 62c482e93f407bcc7971547742094301374b841e (diff) | |
| parent | 3ed7c33fa2915008ec861f25b2d54a0ccc59ca21 (diff) | |
| download | glibc-57da2a23951b1c5dbea3e9ceea60d50020141592.tar.xz glibc-57da2a23951b1c5dbea3e9ceea60d50020141592.zip | |
Merge branch 'master' of git://sourceware.org/git/glibc
| -rw-r--r-- | ChangeLog | 74 | ||||
| -rw-r--r-- | INSTALL | 8 | ||||
| -rw-r--r-- | NEWS | 2 | ||||
| -rw-r--r-- | Rules | 7 | ||||
| -rw-r--r-- | benchtests/Makefile | 7 | ||||
| -rwxr-xr-x | configure | 29 | ||||
| -rw-r--r-- | configure.ac | 18 | ||||
| -rw-r--r-- | conform/Makefile | 19 | ||||
| -rw-r--r-- | conform/glibcconform.py | 11 | ||||
| -rw-r--r-- | conform/linknamespace.pl | 233 | ||||
| -rw-r--r-- | conform/linknamespace.py | 217 | ||||
| -rw-r--r-- | elf/Makefile | 4 | ||||
| -rw-r--r-- | elf/tst-unwind-main.c | 38 | ||||
| -rw-r--r-- | hurd/intr-msg.c | 4 | ||||
| -rw-r--r-- | localedata/locales/ca_ES | 6 | ||||
| -rw-r--r-- | manual/Makefile | 2 | ||||
| -rw-r--r-- | manual/install.texi | 8 | ||||
| -rw-r--r-- | math/Makefile | 10 | ||||
| -rw-r--r-- | stdlib/test-bz22786.c | 22 | ||||
| -rw-r--r-- | stdlib/tst-strtod-overflow.c | 16 | ||||
| -rw-r--r-- | support/Makefile | 2 | ||||
| -rw-r--r-- | support/blob_repeat.c | 282 | ||||
| -rw-r--r-- | support/blob_repeat.h | 44 | ||||
| -rw-r--r-- | support/tst-support_blob_repeat.c | 85 | ||||
| -rw-r--r-- | sysdeps/gnu/errlist.c | 15 | ||||
| -rw-r--r-- | sysdeps/riscv/start.S | 7 |
26 files changed, 834 insertions, 336 deletions
@@ -1,8 +1,80 @@ +2018-10-31 Samuel Thibault <samuel.thibault@ens-lyon.org> + + * sysdeps/gnu/errlist.c (EIEIO): Document how translators should + translate the error message. + +2018-10-30 Joseph Myers <joseph@codesourcery.com> + + * conform/linknamespace.py: New file. + * conform/linknamespace.pl: Remove file. + * conform/Makefile ($(linknamespace-header-tests)): Use + linknamespace.py instead of linknamespace.pl. Do not use --tmpdir + option. + +2018-10-30 Florian Weimer <fweimer@redhat.com> + + * stdlib/test-bz22786.c (do_test): Additional free calls to avoid + memory leaks. + +2018-10-30 Florian Weimer <fweimer@redhat.com> + + * support/blob_repeat.c (allocate_big): Call mkstemp directly. + +2018-10-30 Florian Weimer <fweimer@redhat.com> + + * stdlib/tst-strtod-overflow.c (do_test): Switch to + support_blob_repeat. + +2018-10-30 Florian Weimer <fweimer@redhat.com> + + Avoid spurious test failures in stdlib/test-bz22786. + * support/Makefile (libsupport-routines): Add blob_repeat. + (tests): Add tst-support_blob_repeat. + * support/blob_repeat.h: New file. + * support/blob_repeat.c: Likewise. + * support/tst-support_blob_repeat.c: Likewise. + * stdlib/test-bz22786.c (do_test): Replace malloc and memset with + support_blob_repeat_allocate. + +2018-10-30 Andreas Schwab <schwab@suse.de> + + [BZ #23125] + * sysdeps/riscv/start.S (ENTRY_POINT): Mark ra as undefined. + Don't use tail call. + * elf/tst-unwind-main.c: New file. + * elf/Makefile (tests): Add tst-unwind-main. + (CFLAGS-tst-unwind-main.c): Define. + +2018-10-29 Sergi Almacellas Abellana <sergi@koolpi.com> + + [BZ #23791] + * localedata/locales/ca_ES (LC_MONETARY): set p_cs_precedes and + n_cs_precedes to 0. + * localedata/locales/ca_ES (LC_MONETARY): set grouping to 3;3 + +2018-10-29 Joseph Myers <joseph@codesourcery.com> + + * conform/glibcconform.py: Do not import shutil. + (list_exported_functions): Use tempfile.TemporaryDirectory instead + of mkdtemp. + + * configure.ac (PYTHON_PROG): Use AC_CHECK_PROG_VER. Set + critic_missing for versions before 3.4. + * configure: Regenerated. + * manual/install.texi (Tools for Compilation): Document + requirement for Python to build glibc. + * INSTALL: Regenerated. + * Rules [PYTHON]: Make code unconditional. + * benchtests/Makefile [PYTHON]: Likewise. + * conform/Makefile [PYTHON]: Likewise. + * manual/Makefile [PYTHON]: Likewise. + * math/Makefile [PYTHON]: Likewise. + 2018-10-28 Samuel Thibault <samuel.thibault@ens-lyon.org> * hurd/hurdsig.c (_hurd_interrupted_rpc_timeout): Set to 60000. * hurd/intr-msg.c (_hurd_intr_rpc_mach_msg): When the server does not - answer to interrupt_operation, return EIO instead of EINTR. + answer to interrupt_operation, return EIEIO instead of EINTR. * sysdeps/mach/hurd/i386/intr-msg.h (INTR_MSG_TRAP): Make _hurd_intr_rpc_msg_about_to global point to start of controlled assembly snippet. Make it check canceled flag. @@ -531,11 +531,11 @@ build the GNU C Library: work with any version of 'sed'. As of release time, 'sed' version 4.5 is the newest verified to work to build the GNU C Library. - * Python 2.7/3.4 or later + * Python 3.4 or later - Python is required to build the GNU C Library manual and to run - some tests. As of release time, Python 3.6 is the newest verified - to work for testing the GNU C Library. + Python is required to build the GNU C Library. As of release time, + Python 3.6 is the newest verified to work for building and testing + the GNU C Library. * PExpect 4.0 @@ -48,7 +48,7 @@ Deprecated and removed features, and other changes affecting compatibility: Changes to build and runtime requirements: -* Python is required to build the GNU C Library manual. +* Python 3.4 or later is required to build the GNU C Library. Security related changes: @@ -114,11 +114,6 @@ tests-printers-programs := $(addprefix $(objpfx),$(tests-printers)) # .out files with the output of running the pretty printer tests. tests-printers-out := $(patsubst %,$(objpfx)%.out,$(tests-printers)) -ifndef PYTHON -# Mark tests-printers tests as unsupported if we don't have PYTHON. -tests-unsupported += $(tests-printers) -endif - ifeq ($(build-programs),yes) others: $(addprefix $(objpfx),$(others) $(sysdep-others) $(extra-objs)) else @@ -277,7 +272,6 @@ endif endif # tests -ifdef PYTHON ifneq "$(strip $(tests-printers))" "" # Static pattern rule for building the test programs for the pretty printers. @@ -300,7 +294,6 @@ $(tests-printers-out): $(objpfx)%.out: $(objpfx)% %.py %.c $(pretty-printers) \ $(PYTHON) $*.py $*.c $(objpfx)$* $(pretty-printers) > $@; \ $(evaluate-test) endif -endif .PHONY: distclean realclean subdir_distclean subdir_realclean \ diff --git a/benchtests/Makefile b/benchtests/Makefile index 45aeb5febe..d558db475c 100644 --- a/benchtests/Makefile +++ b/benchtests/Makefile @@ -180,14 +180,7 @@ $(error Invalid BENCHSET value) endif endif -# Define the bench target only if the target has a usable python installation. -ifdef PYTHON bench: bench-build bench-set bench-func bench-malloc -else -bench: - @echo "The bench target needs python to run." - @exit 1 -endif # Target to only build the benchmark without running it. We generate locales # only if we're building natively. @@ -5344,19 +5344,30 @@ fi test -n "$PYTHON_PROG" && break done -test -n "$PYTHON_PROG" || PYTHON_PROG="no" -case "x$PYTHON_PROG" in -xno|x|x:) PYTHON_PROG=no ;; -*) ;; -esac - -if test "x$PYTHON_PROG" = xno; then - aux_missing="$aux_missing python" +if test -z "$PYTHON_PROG"; then + ac_verc_fail=yes else - PYTHON="$PYTHON_PROG -B" + # Found it, now check the version. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $PYTHON_PROG" >&5 +$as_echo_n "checking version of $PYTHON_PROG... " >&6; } + ac_prog_version=`$PYTHON_PROG --version 2>&1 | sed -n 's/^.*Python \([0-9][0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 3.[4-9]*|3.[1-9][0-9]*|[4-9].*|[1-9][0-9]*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5 +$as_echo "$ac_prog_version" >&6; } fi +if test $ac_verc_fail = yes; then + critic_missing="$critic_missing python" +fi + +PYTHON="$PYTHON_PROG -B" + test -n "$critic_missing" && as_fn_error $? " *** These critical programs are missing or too old:$critic_missing diff --git a/configure.ac b/configure.ac index e983fd8faa..6cc10ede98 100644 --- a/configure.ac +++ b/configure.ac @@ -1050,18 +1050,12 @@ else fi # Check for python3 if available, or else python. -AC_CHECK_PROGS(PYTHON_PROG, python3 python,no) -case "x$PYTHON_PROG" in -xno|x|x:) PYTHON_PROG=no ;; -*) ;; -esac - -if test "x$PYTHON_PROG" = xno; then - aux_missing="$aux_missing python" -else - PYTHON="$PYTHON_PROG -B" - AC_SUBST(PYTHON) -fi +AC_CHECK_PROG_VER(PYTHON_PROG, python3 python, --version, + [Python \([0-9][0-9.]*\)], + [3.[4-9]*|3.[1-9][0-9]*|[4-9].*|[1-9][0-9]*], + critic_missing="$critic_missing python") +PYTHON="$PYTHON_PROG -B" +AC_SUBST(PYTHON) test -n "$critic_missing" && AC_MSG_ERROR([ *** These critical programs are missing or too old:$critic_missing diff --git a/conform/Makefile b/conform/Makefile index 71e58a46c8..fbc4110688 100644 --- a/conform/Makefile +++ b/conform/Makefile @@ -120,9 +120,7 @@ linknamespace-symlists-base := $(foreach std,$(conformtest-standards),\ symlist-$(std)) linknamespace-symlists-tests := $(addprefix $(objpfx),\ $(linknamespace-symlists-base)) -ifdef PYTHON tests-special += $(linknamespace-symlists-tests) -endif linknamespace-symlist-stdlibs-base := $(foreach std,$(conformtest-standards),\ symlist-stdlibs-$(std)) @@ -130,9 +128,7 @@ linknamespace-symlist-stdlibs-tests := \ $(addprefix $(objpfx),\ $(linknamespace-symlist-stdlibs-base)) -ifdef PYTHON tests-special += $(linknamespace-symlist-stdlibs-tests) -endif linknamespace-header-base := $(foreach std,\ $(conformtest-standards),\ @@ -141,9 +137,7 @@ linknamespace-header-base := $(foreach std,\ $(std)/$(h)/linknamespace.out)) linknamespace-header-tests := $(addprefix $(objpfx),\ $(linknamespace-header-base)) -ifdef PYTHON tests-special += $(linknamespace-header-tests) -endif include ../Rules @@ -224,17 +218,16 @@ $(linknamespace-symlist-stdlibs-tests): $(objpfx)symlist-stdlibs-%: \ $(evaluate-test) $(linknamespace-header-tests): $(objpfx)%/linknamespace.out: \ - linknamespace.pl \ + linknamespace.py \ $(linknamespace-symlists-tests) \ $(linknamespace-symlist-stdlibs-tests) (set -e; std_hdr=$*; std=$${std_hdr%%/*}; hdr=$${std_hdr#*/}; \ mkdir -p $(@D)/scratch; \ - $(PERL) -I. -w $< --tmpdir=$(@D)/scratch --cc='$(CC)' \ - --flags='$(conformtest-cc-flags)' --standard=$$std \ - --stdsyms=$(objpfx)symlist-$$std --header=$$hdr \ - --libsyms=$(objpfx)symlist-stdlibs-$$std \ - --readelf='$(READELF)' \ - > $@ 2>&1); \ + $(PYTHON) $< --cc='$(CC)' --flags='$(conformtest-cc-flags)' \ + --standard=$$std --stdsyms=$(objpfx)symlist-$$std \ + --header=$$hdr --libsyms=$(objpfx)symlist-stdlibs-$$std \ + --readelf='$(READELF)' \ + > $@ 2>&1); \ $(evaluate-test) # Pre-standard C feature no longer supported by GCC (obsoleted in diff --git a/conform/glibcconform.py b/conform/glibcconform.py index 31ad4a9f9f..c1db46029d 100644 --- a/conform/glibcconform.py +++ b/conform/glibcconform.py @@ -19,7 +19,6 @@ import os.path import re -import shutil import subprocess import tempfile @@ -43,11 +42,9 @@ def list_exported_functions(cc, standard, header): """ cc_all = '%s -D_ISOMAC %s' % (cc, CFLAGS[standard]) - # tempfile.TemporaryDirectory requires Python 3.2, so use mkdtemp. - temp_dir = tempfile.mkdtemp() - c_file_name = os.path.join(temp_dir, 'test.c') - aux_file_name = os.path.join(temp_dir, 'test.c.aux') - try: + with tempfile.TemporaryDirectory() as temp_dir: + c_file_name = os.path.join(temp_dir, 'test.c') + aux_file_name = os.path.join(temp_dir, 'test.c.aux') with open(c_file_name, 'w') as c_file: c_file.write('#include <%s>\n' % header) fns = set() @@ -72,6 +69,4 @@ def list_exported_functions(cc, standard, header): else: raise ValueError("couldn't parse -aux-info output: %s" % line) - finally: - shutil.rmtree(temp_dir) return fns diff --git a/conform/linknamespace.pl b/conform/linknamespace.pl deleted file mode 100644 index 3fc6aca621..0000000000 --- a/conform/linknamespace.pl +++ /dev/null @@ -1,233 +0,0 @@ -#!/usr/bin/perl - -# Check that use of symbols declared in a given header does not result -# in any symbols being brought in that are not reserved with external -# linkage for the given standard. - -# Copyright (C) 2014-2018 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/>. - -use GlibcConform; -use Getopt::Long; - -GetOptions ('header=s' => \$header, 'standard=s' => \$standard, - 'flags=s' => \$flags, 'cc=s' => \$CC, 'tmpdir=s' => \$tmpdir, - 'stdsyms=s' => \$stdsyms_file, 'libsyms=s' => \$libsyms_file, - 'readelf=s' => \$READELF); - -# Load the list of symbols that are OK. -%stdsyms = (); -open (STDSYMS, "<$stdsyms_file") || die ("open $stdsyms_file: $!\n"); -while (<STDSYMS>) { - chomp; - $stdsyms{$_} = 1; -} -close (STDSYMS) || die ("close $stdsyms_file: $!\n"); - -# The following whitelisted symbols are also allowed for now. -# -# * Bug 17576: stdin, stdout, stderr only reserved with external -# linkage when stdio.h included (and possibly not then), not -# generally. -# -# * Bug 18442: re_syntax_options wrongly brought in by regcomp and -# used by re_comp. -# -@whitelist = qw(stdin stdout stderr re_syntax_options); -foreach my $sym (@whitelist) { - $stdsyms{$sym} = 1; -} - -# Return information about GLOBAL and WEAK symbols listed in readelf -# -s output. -sub list_syms { - my ($syms_file) = @_; - open (SYMS, "<$syms_file") || die ("open $syms_file: $!\n"); - my ($file) = $syms_file; - my (@ret) = (); - while (<SYMS>) { - chomp; - if (/^File: (.*)/) { - $file = $1; - $file =~ s|^.*/||; - next; - } - s/^\s*//; - # Architecture-specific st_other bits appear inside [] and disrupt - # the format of readelf output. - s/\[.*?\]//; - my (@fields) = split (/\s+/, $_); - if (@fields < 8) { - next; - } - my ($bind) = $fields[4]; - my ($ndx) = $fields[6]; - my ($sym) = $fields[7]; - if ($bind ne "GLOBAL" && $bind ne "WEAK") { - next; - } - if ($sym !~ /^\w+$/) { - next; - } - push (@ret, [$file, $sym, $bind, $ndx ne "UND"]); - } - close (SYMS) || die ("close $syms_file: $!\n"); - return @ret; -} - -# Load information about GLOBAL and WEAK symbols defined or used in -# the standard libraries. -# Symbols from a given object, except for weak defined symbols. -%seen_syms = (); -# Strong undefined symbols from a given object. -%strong_undef_syms = (); -# Objects defining a given symbol (strongly or weakly). -%sym_objs = (); -@sym_data = list_syms ($libsyms_file); -foreach my $sym (@sym_data) { - my ($file, $name, $bind, $defined) = @$sym; - if ($defined) { - if (!defined ($sym_objs{$name})) { - $sym_objs{$name} = []; - } - push (@{$sym_objs{$name}}, $file); - } - if ($bind eq "GLOBAL" || !$defined) { - if (!defined ($seen_syms{$file})) { - $seen_syms{$file} = []; - } - push (@{$seen_syms{$file}}, $name); - } - if ($bind eq "GLOBAL" && !$defined) { - if (!defined ($strong_undef_syms{$file})) { - $strong_undef_syms{$file} = []; - } - push (@{$strong_undef_syms{$file}}, $name); - } -} - -# Determine what ELF-level symbols are brought in by use of C-level -# symbols declared in the given header. -# -# The rules followed are heuristic and so may produce false positives -# and false negatives. -# -# * All undefined symbols are considered of signficance, but it is -# possible that (a) any standard library definition is weak, so can be -# overridden by the user's definition, and (b) the symbol is only used -# conditionally and not if the program is limited to standard -# functionality. -# -# * If a symbol reference is only brought in by the user using a data -# symbol rather than a function from the standard library, this will -# not be detected. -# -# * If a symbol reference is only brought in by crt*.o or libgcc, this -# will not be detected. -# -# * If a symbol reference is only brought in through __builtin_foo in -# a standard macro being compiled to call foo, this will not be -# detected. -# -# * Header inclusions should be compiled several times with different -# options such as -O2, -D_FORTIFY_SOURCE and -D_FILE_OFFSET_BITS=64 to -# find out what symbols are undefined from such a compilation; this is -# not yet implemented. -# -# * This script finds symbols referenced through use of macros on the -# basis that if a macro calls an internal function, that function must -# also be declared in the header. However, the header might also -# declare implementation-namespace functions that are not called by -# any standard macro in the header, resulting in false positives for -# any symbols brought in only through use of those -# implementation-namespace functions. -# -# * Namespace issues can apply for dynamic linking as well as static -# linking, when a call is from one shared library to another or uses a -# PLT entry for |
