[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r15255 - in /fsf/glibc-2_14-branch/libc: ./ elf/ libio/ nptl/ stdio-common/ sysdeps/i386/ sysdeps/i386/i686/multiarch/ sysde...
- To: commits@xxxxxxxxxx
- Subject: [commits] r15255 - in /fsf/glibc-2_14-branch/libc: ./ elf/ libio/ nptl/ stdio-common/ sysdeps/i386/ sysdeps/i386/i686/multiarch/ sysde...
- From: eglibc@xxxxxxxxxx
- Date: Fri, 09 Sep 2011 07:03:43 -0000
Author: eglibc
Date: Fri Sep 9 00:03:42 2011
New Revision: 15255
Log:
Import glibc-2.14 for 2011-09-09
Added:
fsf/glibc-2_14-branch/libc/elf/tst-initorder2.c
fsf/glibc-2_14-branch/libc/elf/tst-initorder2.exp
fsf/glibc-2_14-branch/libc/elf/unload8.c
fsf/glibc-2_14-branch/libc/elf/unload8mod1.c
fsf/glibc-2_14-branch/libc/elf/unload8mod1x.c
fsf/glibc-2_14-branch/libc/elf/unload8mod2.c
fsf/glibc-2_14-branch/libc/elf/unload8mod3.c
fsf/glibc-2_14-branch/libc/stdio-common/bug24.c
Modified:
fsf/glibc-2_14-branch/libc/ChangeLog
fsf/glibc-2_14-branch/libc/elf/Makefile
fsf/glibc-2_14-branch/libc/elf/dl-close.c
fsf/glibc-2_14-branch/libc/elf/dl-deps.c
fsf/glibc-2_14-branch/libc/elf/dl-fini.c
fsf/glibc-2_14-branch/libc/libio/fileops.c
fsf/glibc-2_14-branch/libc/nptl/ChangeLog
fsf/glibc-2_14-branch/libc/nptl/allocatestack.c
fsf/glibc-2_14-branch/libc/stdio-common/Makefile
fsf/glibc-2_14-branch/libc/sysdeps/i386/dl-trampoline.S
fsf/glibc-2_14-branch/libc/sysdeps/i386/i686/multiarch/strspn.S
fsf/glibc-2_14-branch/libc/sysdeps/x86_64/dl-trampoline.S
fsf/glibc-2_14-branch/libc/sysdeps/x86_64/dl-trampoline.h
Modified: fsf/glibc-2_14-branch/libc/ChangeLog
==============================================================================
--- fsf/glibc-2_14-branch/libc/ChangeLog (original)
+++ fsf/glibc-2_14-branch/libc/ChangeLog Fri Sep 9 00:03:42 2011
@@ -1,3 +1,70 @@
+2011-08-29 Jiri Olsa <jolsa@xxxxxxxxxx>
+
+ * sysdeps/i386/dl-trampoline.S (_dl_runtime_profile): Fix cfi
+ directive.
+
+2011-08-24 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * elf/Makefile: Add rules to build and run unload8 test.
+ * elf/unload8.c: New file.
+ * elf/unload8mod1.c: New file.
+ * elf/unload8mod1x.c: New file.
+ * elf/unload8mod2.c: New file.
+ * elf/unload8mod3.c: New file.
+
+ * elf/dl-close.c (_dl_close_worker): Reset private search list if
+ it wasn't used.
+
+2011-08-23 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * sysdeps/i386/i686/multiarch/strspn.S (ENTRY): Add missing
+ backslash.
+
+2011-08-22 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * elf/dl-deps.c (_dl_map_object_deps): Move check for missing
+ dependencies back to end of function.
+
+2011-08-16 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ [BZ #11724]
+ * elf/dl-deps.c (_dl_map_object_deps): Only assume cycle when
+ object is seen twice.
+ * elf/dl-fini.c (_dl_sort_fini): Likewise.
+
+ * elf/Makefile (distribute): Add tst-initorder2.c.
+ (tests): Add tst-initorder2.
+ (modules-names): Add tst-initorder2a tst-initorder2b
+ tst-initorder2c tst-initorder2d. Add rules to build them.
+ ($(objpfx)tst-initorder2.out): New rule.
+ * elf/tst-initorder2.c: New file.
+ * elf/tst-initorder2.exp: New file.
+
+2011-08-20 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ [BZ #13114]
+ * stdio-common/Makefile (tests): Add bug24.
+ * stdio-common/bug24.c: New file.
+
+2011-08-19 Andreas Jaeger <aj@xxxxxxx>
+
+ [BZ #13114]
+ * libio/fileops.c (_IO_new_file_fopen): Fix handling of
+ non-existant file when using close-on-exec mode.
+
+2011-08-20 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * sysdeps/x86_64/dl-trampoline.S (_dl_runtime_resolve): Fix CFI for
+ the very first instruction.
+
+2011-08-20 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * sysdeps/x86_64/dl-trampoline.h: If MORE_CODE is defined, restore
+ the CFI state in the end.
+ * sysdeps/x86_64/dl-trampoline.S: Define MORE_CODE before first
+ inclusion of dl-trampoline.h.
+ Based on a patch by Jiri Olsa <jolsa@xxxxxxxxxx>.
+
2011-08-14 Roland McGrath <roland@xxxxxxxxxxxxx>
* locale/Makefile (locale-CPPFLAGS): Renamed CPPFLAGS-locale-programs.
Modified: fsf/glibc-2_14-branch/libc/elf/Makefile
==============================================================================
--- fsf/glibc-2_14-branch/libc/elf/Makefile (original)
+++ fsf/glibc-2_14-branch/libc/elf/Makefile Fri Sep 9 00:03:42 2011
@@ -90,6 +90,7 @@
unload4mod1.c unload4mod2.c unload4mod3.c unload4mod4.c \
unload6mod1.c unload6mod2.c unload6mod3.c \
unload7mod1.c unload7mod2.c \
+ unload8mod1.c unload8mod1x.c unload8mod2.c unload8mod3.c \
tst-audit1.c tst-audit2.c tst-audit3.c tst-audit4.c \
tst-auditmod1.c tst-auditmod3a.c tst-auditmod3b.c \
tst-auditmod4a.c tst-auditmod4b.c \
@@ -120,9 +121,10 @@
ifuncmain7pie.c ifuncmain7static.c \
tst-unique1.c tst-unique1mod1.c tst-unique1mod2.c \
tst-unique2.c tst-unique2mod1.c tst-unique2mod2.c \
- tst-initordera1.c tst-initordera2.c tst-initorderb1.c \
- tst-initorderb2.c tst-initordera3.c tst-initordera4.c \
- tst-initorder.c
+ tst-initordera1.c tst-initordera2.c tst-initorderb1.c \
+ tst-initorderb2.c tst-initordera3.c tst-initordera4.c \
+ tst-initorder.c \
+ tst-initorder2.c
CFLAGS-dl-runtime.c = -fexceptions -fasynchronous-unwind-tables
CFLAGS-dl-lookup.c = -fexceptions -fasynchronous-unwind-tables
@@ -221,11 +223,11 @@
tst-align tst-align2 $(tests-execstack-$(have-z-execstack)) \
tst-dlmodcount tst-dlopenrpath tst-deep1 \
tst-dlmopen1 tst-dlmopen2 tst-dlmopen3 \
- unload3 unload4 unload5 unload6 unload7 tst-global1 order2 \
+ unload3 unload4 unload5 unload6 unload7 unload8 tst-global1 order2 \
tst-audit1 tst-audit2 \
tst-stackguard1 tst-addr1 tst-thrlock \
tst-unique1 tst-unique2 tst-unique3 tst-unique4 \
- tst-initorder
+ tst-initorder tst-initorder2
# reldep9
test-srcs = tst-pathopt
selinux-enabled := $(shell cat /selinux/enforce 2> /dev/null)
@@ -279,6 +281,7 @@
unload4mod1 unload4mod2 unload4mod3 unload4mod4 \
unload6mod1 unload6mod2 unload6mod3 \
unload7mod1 unload7mod2 \
+ unload8mod1 unload8mod1x unload8mod2 unload8mod3 \
order2mod1 order2mod2 order2mod3 order2mod4 \
tst-unique1mod1 tst-unique1mod2 \
tst-unique2mod1 tst-unique2mod2 \
@@ -286,7 +289,8 @@
tst-unique4lib \
tst-initordera1 tst-initorderb1 \
tst-initordera2 tst-initorderb2 \
- tst-initordera3 tst-initordera4
+ tst-initordera3 tst-initordera4 \
+ tst-initorder2a tst-initorder2b tst-initorder2c tst-initorder2d
ifeq (yes,$(have-initfini-array))
modules-names += tst-array2dep tst-array5dep
endif
@@ -568,6 +572,9 @@
$(objpfx)unload6mod3.so: $(libdl)
$(objpfx)unload7mod1.so: $(libdl)
$(objpfx)unload7mod2.so: $(objpfx)unload7mod1.so
+$(objpfx)unload8mod1.so: $(objpfx)unload8mod2.so
+$(objpfx)unload8mod2.so: $(objpfx)unload8mod3.so
+$(objpfx)unload8mod3.so: $(libdl)
$(objpfx)tst-initordera2.so: $(objpfx)tst-initordera1.so
$(objpfx)tst-initorderb2.so: $(objpfx)tst-initorderb1.so $(objpfx)tst-initordera2.so
$(objpfx)tst-initordera3.so: $(objpfx)tst-initorderb2.so $(objpfx)tst-initorderb1.so
@@ -881,6 +888,9 @@
$(objpfx)unload7.out: $(objpfx)unload7mod1.so $(objpfx)unload7mod2.so
unload7-ENV = MALLOC_PERTURB_=85
+$(objpfx)unload8: $(libdl)
+$(objpfx)unload8.out: $(objpfx)unload8mod1.so $(objpfx)unload8mod1x.so
+
ifdef libdl
$(objpfx)tst-tls9-static: $(common-objpfx)dlfcn/libdl.a
$(objpfx)tst-tls9-static.out: $(objpfx)tst-tlsmod5.so $(objpfx)tst-tlsmod6.so
@@ -1156,6 +1166,23 @@
$< > $@
cmp $@ tst-initorder.exp > /dev/null
+$(objpfx)tst-initorder2: $(objpfx)tst-initorder2a.so $(objpfx)tst-initorder2d.so $(objpfx)tst-initorder2c.so
+$(objpfx)tst-initorder2a.so: $(objpfx)tst-initorder2b.so
+$(objpfx)tst-initorder2b.so: $(objpfx)tst-initorder2c.so
+$(objpfx)tst-initorder2c.so: $(objpfx)tst-initorder2d.so
+define o-iterator-doit
+$(objpfx)tst-initorder2$o.os: tst-initorder2.c; \
+$$(compile-command.c) -DNAME=\"$o\"
+endef
+object-suffixes-left := a b c d
+include $(o-iterator)
+
+$(objpfx)tst-initorder2.out: $(objpfx)tst-initorder2
+ $(elf-objpfx)${rtld-installed-name} \
+ --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \
+ $< > $@
+ cmp $@ tst-initorder2.exp > /dev/null
+
ifeq (yes,$(config-cflags-avx))
AVX-CFLAGS=-mavx
ifeq (yes,$(config-cflags-novzeroupper))
Modified: fsf/glibc-2_14-branch/libc/elf/dl-close.c
==============================================================================
--- fsf/glibc-2_14-branch/libc/elf/dl-close.c (original)
+++ fsf/glibc-2_14-branch/libc/elf/dl-close.c Fri Sep 9 00:03:42 2011
@@ -429,6 +429,13 @@
scope_mem_left = true;
imap->l_scope_max = new_size;
+ }
+ else if (new_list != NULL)
+ {
+ /* We didn't change the scope array, so reset the search
+ list. */
+ imap->l_searchlist.r_list = NULL;
+ imap->l_searchlist.r_nlist = 0;
}
/* The loader is gone, so mark the object as not having one.
Modified: fsf/glibc-2_14-branch/libc/elf/dl-deps.c
==============================================================================
--- fsf/glibc-2_14-branch/libc/elf/dl-deps.c (original)
+++ fsf/glibc-2_14-branch/libc/elf/dl-deps.c Fri Sep 9 00:03:42 2011
@@ -491,10 +491,6 @@
if (errno == 0 && errno_saved != 0)
__set_errno (errno_saved);
- if (errno_reason)
- _dl_signal_error (errno_reason == -1 ? 0 : errno_reason, objname,
- NULL, errstring);
-
struct link_map **old_l_initfini = NULL;
if (map->l_initfini != NULL && map->l_type == lt_loaded)
{
@@ -626,12 +622,12 @@
/* We can skip looking for the binary itself which is at the front
of the search list. */
i = 1;
- bool seen[nlist];
- memset (seen, false, nlist * sizeof (seen[0]));
+ char seen[nlist];
+ memset (seen, 0, nlist * sizeof (seen[0]));
while (1)
{
/* Keep track of which object we looked at this round. */
- seen[i] = true;
+ seen[i] += seen[i] < 2;
struct link_map *thisp = l_initfini[i];
/* Find the last object in the list for which the current one is
@@ -652,15 +648,16 @@
(k - i) * sizeof (l_initfini[0]));
l_initfini[k] = thisp;
- if (seen[i + 1])
+ if (seen[i + 1] > 1)
{
++i;
goto next_clear;
}
+ char this_seen = seen[i];
memmove (&seen[i], &seen[i + 1],
(k - i) * sizeof (seen[0]));
- seen[k] = true;
+ seen[k] = this_seen;
goto next;
}
@@ -671,7 +668,7 @@
if (++i == nlist)
break;
next_clear:
- memset (&seen[i], false, (nlist - i) * sizeof (seen[0]));
+ memset (&seen[i], 0, (nlist - i) * sizeof (seen[0]));
next:;
}
@@ -690,4 +687,8 @@
}
if (old_l_initfini != NULL)
map->l_orig_initfini = old_l_initfini;
+
+ if (errno_reason)
+ _dl_signal_error (errno_reason == -1 ? 0 : errno_reason, objname,
+ NULL, errstring);
}
Modified: fsf/glibc-2_14-branch/libc/elf/dl-fini.c
==============================================================================
--- fsf/glibc-2_14-branch/libc/elf/dl-fini.c (original)
+++ fsf/glibc-2_14-branch/libc/elf/dl-fini.c Fri Sep 9 00:03:42 2011
@@ -40,12 +40,12 @@
/* We can skip looking for the binary itself which is at the front
of the search list for the main namespace. */
unsigned int i = ns == LM_ID_BASE;
- bool seen[nmaps];
- memset (seen, false, nmaps * sizeof (seen[0]));
+ char seen[nmaps];
+ memset (seen, 0, nmaps * sizeof (seen[0]));
while (1)
{
/* Keep track of which object we looked at this round. */
- seen[i] = true;
+ seen[i] += seen[i] < 2;
struct link_map *thisp = maps[i];
/* Do not handle ld.so in secondary namespaces and object which
@@ -80,14 +80,15 @@
used[k] = here_used;
}
- if (seen[i + 1])
+ if (seen[i + 1] > 1)
{
++i;
goto next_clear;
}
+ char this_seen = seen[i];
memmove (&seen[i], &seen[i + 1], (k - i) * sizeof (seen[0]));
- seen[k] = true;
+ seen[k] = this_seen;
goto next;
}
@@ -97,7 +98,7 @@
unsigned int m = maps[k]->l_reldeps->act;
struct link_map **relmaps = &maps[k]->l_reldeps->list[0];
- /* Look through the relocation dependencies of the object. */
+ /* Look through the relocation dependencies of the object. */
while (m-- > 0)
if (__builtin_expect (relmaps[m] == thisp, 0))
goto move;
@@ -110,7 +111,7 @@
if (++i == nmaps)
break;
next_clear:
- memset (&seen[i], false, (nmaps - i) * sizeof (seen[0]));
+ memset (&seen[i], 0, (nmaps - i) * sizeof (seen[0]));
next:;
}
Added: fsf/glibc-2_14-branch/libc/elf/tst-initorder2.c
==============================================================================
--- fsf/glibc-2_14-branch/libc/elf/tst-initorder2.c (added)
+++ fsf/glibc-2_14-branch/libc/elf/tst-initorder2.c Fri Sep 9 00:03:42 2011
@@ -1,0 +1,20 @@
+#include <stdio.h>
+
+#ifndef NAME
+int
+main (void)
+{
+ puts ("main");
+}
+#else
+static void __attribute__ ((constructor))
+init (void)
+{
+ puts ("init: " NAME);
+}
+static void __attribute__ ((destructor))
+fini (void)
+{
+ puts ("fini: " NAME);
+}
+#endif
Added: fsf/glibc-2_14-branch/libc/elf/tst-initorder2.exp
==============================================================================
--- fsf/glibc-2_14-branch/libc/elf/tst-initorder2.exp (added)
+++ fsf/glibc-2_14-branch/libc/elf/tst-initorder2.exp Fri Sep 9 00:03:42 2011
@@ -1,0 +1,9 @@
+init: d
+init: c
+init: b
+init: a
+main
+fini: a
+fini: b
+fini: c
+fini: d
Added: fsf/glibc-2_14-branch/libc/elf/unload8.c
==============================================================================
--- fsf/glibc-2_14-branch/libc/elf/unload8.c (added)
+++ fsf/glibc-2_14-branch/libc/elf/unload8.c Fri Sep 9 00:03:42 2011
@@ -1,0 +1,33 @@
+#include <dlfcn.h>
+#include <stdio.h>
+
+int
+main (void)
+{
+ void *h = dlopen ("$ORIGIN/unload8mod1.so", RTLD_LAZY);
+ if (h == NULL)
+ {
+ puts ("dlopen unload8mod1.so failed");
+ return 1;
+ }
+
+ void *h2 = dlopen ("$ORIGIN/unload8mod1x.so", RTLD_LAZY);
+ if (h2 == NULL)
+ {
+ puts ("dlopen unload8mod1x.so failed");
+ return 1;
+ }
+ dlclose (h2);
+
+ int (*mod1) (void) = dlsym (h, "mod1");
+ if (mod1 == NULL)
+ {
+ puts ("dlsym failed");
+ return 1;
+ }
+
+ mod1 ();
+ dlclose (h);
+
+ return 0;
+}
Added: fsf/glibc-2_14-branch/libc/elf/unload8mod1.c
==============================================================================
--- fsf/glibc-2_14-branch/libc/elf/unload8mod1.c (added)
+++ fsf/glibc-2_14-branch/libc/elf/unload8mod1.c Fri Sep 9 00:03:42 2011
@@ -1,0 +1,7 @@
+extern void mod2 (void);
+
+void
+mod1 (void)
+{
+ mod2 ();
+}
Added: fsf/glibc-2_14-branch/libc/elf/unload8mod1x.c
==============================================================================
--- fsf/glibc-2_14-branch/libc/elf/unload8mod1x.c (added)
+++ fsf/glibc-2_14-branch/libc/elf/unload8mod1x.c Fri Sep 9 00:03:42 2011
@@ -1,0 +1,1 @@
+int mod1x;
Added: fsf/glibc-2_14-branch/libc/elf/unload8mod2.c
==============================================================================
--- fsf/glibc-2_14-branch/libc/elf/unload8mod2.c (added)
+++ fsf/glibc-2_14-branch/libc/elf/unload8mod2.c Fri Sep 9 00:03:42 2011
@@ -1,0 +1,7 @@
+extern void mod3 (void);
+
+void
+mod2 (void)
+{
+ mod3 ();
+}
Added: fsf/glibc-2_14-branch/libc/elf/unload8mod3.c
==============================================================================
--- fsf/glibc-2_14-branch/libc/elf/unload8mod3.c (added)
+++ fsf/glibc-2_14-branch/libc/elf/unload8mod3.c Fri Sep 9 00:03:42 2011
@@ -1,0 +1,27 @@
+#include <dlfcn.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+void
+mod3_fini2 (void)
+{
+}
+
+void
+mod3_fini (void)
+{
+ mod3_fini2 ();
+}
+
+void
+mod3 (void)
+{
+ void *h = dlopen ("$ORIGIN/unload8mod2.so", RTLD_LAZY);
+ if (h == NULL)
+ {
+ puts ("dlopen unload8mod2.so failed");
+ exit (1);
+ }
+
+ atexit (mod3_fini);
+}
Modified: fsf/glibc-2_14-branch/libc/libio/fileops.c
==============================================================================
--- fsf/glibc-2_14-branch/libc/libio/fileops.c (original)
+++ fsf/glibc-2_14-branch/libc/libio/fileops.c Fri Sep 9 00:03:42 2011
@@ -345,23 +345,22 @@
result = _IO_file_open (fp, filename, omode|oflags, oprot, read_write,
is32not64);
+ if (result != NULL)
+ {
#ifndef __ASSUME_O_CLOEXEC
- if ((fp->_flags2 & _IO_FLAGS2_CLOEXEC) != 0 && __have_o_cloexec <= 0)
- {
- int fd = _IO_fileno (fp);
- if (__have_o_cloexec == 0)
- {
- int flags = __fcntl (fd, F_GETFD);
- __have_o_cloexec = (flags & FD_CLOEXEC) == 0 ? -1 : 1;
- }
- if (__have_o_cloexec < 0)
- __fcntl (fd, F_SETFD, FD_CLOEXEC);
- }
-#endif
-
-#ifdef _LIBC
- if (result != NULL)
- {
+ if ((fp->_flags2 & _IO_FLAGS2_CLOEXEC) != 0 && __have_o_cloexec <= 0)
+ {
+ int fd = _IO_fileno (fp);
+ if (__have_o_cloexec == 0)
+ {
+ int flags = __fcntl (fd, F_GETFD);
+ __have_o_cloexec = (flags & FD_CLOEXEC) == 0 ? -1 : 1;
+ }
+ if (__have_o_cloexec < 0)
+ __fcntl (fd, F_SETFD, FD_CLOEXEC);
+ }
+#endif
+
/* Test whether the mode string specifies the conversion. */
cs = strstr (last_recognized + 1, ",ccs=");
if (cs != NULL)
@@ -432,7 +431,6 @@
result->_mode = 1;
}
}
-#endif /* GNU libc */
return result;
}
Modified: fsf/glibc-2_14-branch/libc/nptl/ChangeLog
==============================================================================
--- fsf/glibc-2_14-branch/libc/nptl/ChangeLog (original)
+++ fsf/glibc-2_14-branch/libc/nptl/ChangeLog Fri Sep 9 00:03:42 2011
@@ -1,3 +1,8 @@
+2011-08-31 Andreas Schwab <schwab@xxxxxxxxxx>
+
+ * allocatestack.c (setxid_mark_thread): Ensure that the exiting
+ thread is woken up.
+
2011-08-08 Andreas Schwab <schwab@xxxxxxxxxx>
* sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
Modified: fsf/glibc-2_14-branch/libc/nptl/allocatestack.c
==============================================================================
--- fsf/glibc-2_14-branch/libc/nptl/allocatestack.c (original)
+++ fsf/glibc-2_14-branch/libc/nptl/allocatestack.c Fri Sep 9 00:03:42 2011
@@ -999,7 +999,16 @@
/* If the thread is exiting right now, ignore it. */
if ((ch & EXITING_BITMASK) != 0)
- return;
+ {
+ /* Release the futex if there is no other setxid in
+ progress. */
+ if ((ch & SETXID_BITMASK) == 0)
+ {
+ t->setxid_futex = 1;
+ lll_futex_wake (&t->setxid_futex, 1, LLL_PRIVATE);
+ }
+ return;
+ }
}
while (atomic_compare_and_exchange_bool_acq (&t->cancelhandling,
ch | SETXID_BITMASK, ch));
Modified: fsf/glibc-2_14-branch/libc/stdio-common/Makefile
==============================================================================
--- fsf/glibc-2_14-branch/libc/stdio-common/Makefile (original)
+++ fsf/glibc-2_14-branch/libc/stdio-common/Makefile Fri Sep 9 00:03:42 2011
@@ -60,7 +60,7 @@
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
+ scanf16 scanf17 tst-setvbuf1 tst-grouping bug23 bug24
test-srcs = tst-unbputc tst-printf
Added: fsf/glibc-2_14-branch/libc/stdio-common/bug24.c
==============================================================================
--- fsf/glibc-2_14-branch/libc/stdio-common/bug24.c (added)
+++ fsf/glibc-2_14-branch/libc/stdio-common/bug24.c Fri Sep 9 00:03:42 2011
@@ -1,0 +1,26 @@
+#include <stdio.h>
+#include <errno.h>
+
+static int
+do_test (void)
+{
+ FILE *fp = fopen ("/foobar_does_no_exit", "re");
+ if (fp != NULL)
+ {
+ /* A joker created this file. Ignore the test. */
+ fclose (fp);
+ return 0;
+ }
+
+ if (errno == ENOENT)
+ {
+ printf ("no bug\n");
+ return 0;
+ }
+
+ printf ("bug : expected ENOENT, got: %m\n");
+ return 1;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
Modified: fsf/glibc-2_14-branch/libc/sysdeps/i386/dl-trampoline.S
==============================================================================
--- fsf/glibc-2_14-branch/libc/sysdeps/i386/dl-trampoline.S (original)
+++ fsf/glibc-2_14-branch/libc/sysdeps/i386/dl-trampoline.S Fri Sep 9 00:03:42 2011
@@ -1,5 +1,5 @@
/* PLT trampolines. i386 version.
- Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 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
@@ -99,7 +99,7 @@
+4 %edx
%esp free
*/
- cfi_adjust_cfa_offset (12)
+ cfi_adjust_cfa_offset (8)
1: movl %ebx, (%esp)
cfi_rel_offset (ebx, 0)
movl %edx, %ebx # This is the frame buffer size
Modified: fsf/glibc-2_14-branch/libc/sysdeps/i386/i686/multiarch/strspn.S
==============================================================================
--- fsf/glibc-2_14-branch/libc/sysdeps/i386/i686/multiarch/strspn.S (original)
+++ fsf/glibc-2_14-branch/libc/sysdeps/i386/i686/multiarch/strspn.S Fri Sep 9 00:03:42 2011
@@ -76,8 +76,8 @@
# define ENTRY(name) \
.type __strspn_ia32, @function; \
.globl __strspn_ia32; \
- .p2align 4
- __strspn_ia32: cfi_startproc; \
+ .p2align 4; \
+__strspn_ia32: cfi_startproc; \
CALL_MCOUNT
# undef END
# define END(name) \
Modified: fsf/glibc-2_14-branch/libc/sysdeps/x86_64/dl-trampoline.S
==============================================================================
--- fsf/glibc-2_14-branch/libc/sysdeps/x86_64/dl-trampoline.S (original)
+++ fsf/glibc-2_14-branch/libc/sysdeps/x86_64/dl-trampoline.S Fri Sep 9 00:03:42 2011
@@ -27,8 +27,9 @@
.align 16
cfi_startproc
_dl_runtime_resolve:
+ cfi_adjust_cfa_offset(16) # Incorporate PLT
subq $56,%rsp
- cfi_adjust_cfa_offset(72) # Incorporate PLT
+ cfi_adjust_cfa_offset(56)
movq %rax,(%rsp) # Preserve registers otherwise clobbered.
movq %rcx, 8(%rsp)
movq %rdx, 16(%rsp)
@@ -158,14 +159,15 @@
1: js L(no_avx)
# define RESTORE_AVX
+# define MORE_CODE
# include "dl-trampoline.h"
.align 16
L(no_avx):
# endif
-# undef RESTORE_AVX
-# include "dl-trampoline.h"
+# undef RESTORE_AVX
+# include "dl-trampoline.h"
cfi_endproc
.size _dl_runtime_profile, .-_dl_runtime_profile
Modified: fsf/glibc-2_14-branch/libc/sysdeps/x86_64/dl-trampoline.h
==============================================================================
--- fsf/glibc-2_14-branch/libc/sysdeps/x86_64/dl-trampoline.h (original)
+++ fsf/glibc-2_14-branch/libc/sysdeps/x86_64/dl-trampoline.h Fri Sep 9 00:03:42 2011
@@ -1,6 +1,6 @@
/* Partial PLT profile trampoline to save and restore x86-64 vector
registers.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 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
@@ -195,14 +195,14 @@
_dl_call_pltexit. The La_x86_64_regs is being pointed by rsp now,
so we just need to allocate the sizeof(La_x86_64_retval) space on
the stack, since the alignment has already been taken care of. */
-# ifdef RESTORE_AVX
+#ifdef RESTORE_AVX
/* sizeof(La_x86_64_retval). Need extra space for 2 SSE
registers to detect if xmm0/xmm1 registers are changed
by audit module. */
subq $(LRV_SIZE + XMM_SIZE*2), %rsp
-# else
+#else
subq $LRV_SIZE, %rsp # sizeof(La_x86_64_retval)
-# endif
+#endif
movq %rsp, %rcx # La_x86_64_retval argument to %rcx.
/* Fill in the La_x86_64_retval structure. */
@@ -212,7 +212,7 @@
movaps %xmm0, LRV_XMM0_OFFSET(%rcx)
movaps %xmm1, LRV_XMM1_OFFSET(%rcx)
-# ifdef RESTORE_AVX
+#ifdef RESTORE_AVX
/* This is to support AVX audit modules. */
vmovdqu %ymm0, LRV_VECTOR0_OFFSET(%rcx)
vmovdqu %ymm1, LRV_VECTOR1_OFFSET(%rcx)
@@ -221,14 +221,14 @@
by audit module. */
vmovdqa %xmm0, (LRV_SIZE)(%rcx)
vmovdqa %xmm1, (LRV_SIZE + XMM_SIZE)(%rcx)
-# endif
+#endif
fstpt LRV_ST0_OFFSET(%rcx)
fstpt LRV_ST1_OFFSET(%rcx)
movq 24(%rbx), %rdx # La_x86_64_regs argument to %rdx.
movq 40(%rbx), %rsi # Copy args pushed by PLT in register.
- movq 32(%rbx), %rdi # %rdi: link_map, %rsi: reloc_index
+ movq 32(%rbx), %rdi # %rdi: link_map, %rsi: reloc_index
call _dl_call_pltexit
/* Restore return registers. */
@@ -238,7 +238,7 @@
movaps LRV_XMM0_OFFSET(%rsp), %xmm0
movaps LRV_XMM1_OFFSET(%rsp), %xmm1
-# ifdef RESTORE_AVX
+#ifdef RESTORE_AVX
/* Check if xmm0/xmm1 registers are changed by audit module. */
vpcmpeqq (LRV_SIZE)(%rsp), %xmm0, %xmm2
vpmovmskb %xmm2, %esi
@@ -253,7 +253,7 @@
vmovdqu LRV_VECTOR1_OFFSET(%rsp), %ymm1
1:
-# endif
+#endif
fldt LRV_ST1_OFFSET(%rsp)
fldt LRV_ST0_OFFSET(%rsp)
@@ -267,3 +267,10 @@
# (eats the reloc index and link_map)
cfi_adjust_cfa_offset(-48)
retq
+
+#ifdef MORE_CODE
+ cfi_adjust_cfa_offset(48)
+ cfi_rel_offset(%rbx, 0)
+ cfi_def_cfa_register(%rbx)
+# undef MORE_CODE
+#endif