[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r15228 - in /branches/eglibc-2_11: libc/ libc/elf/ libc/include/ libc/libio/ libc/posix/ libc/sysdeps/posix/ libc/sysdeps/un...
- To: commits@xxxxxxxxxx
- Subject: [commits] r15228 - in /branches/eglibc-2_11: libc/ libc/elf/ libc/include/ libc/libio/ libc/posix/ libc/sysdeps/posix/ libc/sysdeps/un...
- From: joseph@xxxxxxxxxx
- Date: Tue, 06 Sep 2011 15:25:09 -0000
Author: joseph
Date: Tue Sep 6 08:25:09 2011
New Revision: 15228
Log:
Merge changes between r14665 and r15227 from /fsf/glibc-2_11-branch.
Added:
branches/eglibc-2_11/libc/posix/bug-regex32.c
- copied unchanged from r15227, fsf/glibc-2_11-branch/libc/posix/bug-regex32.c
branches/eglibc-2_11/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c
- copied unchanged from r15227, fsf/glibc-2_11-branch/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c
branches/eglibc-2_11/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c
- copied unchanged from r15227, fsf/glibc-2_11-branch/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c
branches/eglibc-2_11/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list
- copied unchanged from r15227, fsf/glibc-2_11-branch/ports/sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list
Removed:
branches/eglibc-2_11/libc/libio/bug-fclose1.c
Modified:
branches/eglibc-2_11/libc/ChangeLog
branches/eglibc-2_11/libc/elf/Makefile
branches/eglibc-2_11/libc/elf/dl-close.c
branches/eglibc-2_11/libc/elf/dl-deps.c
branches/eglibc-2_11/libc/elf/dl-load.c
branches/eglibc-2_11/libc/elf/noload.c
branches/eglibc-2_11/libc/include/link.h
branches/eglibc-2_11/libc/libio/Makefile
branches/eglibc-2_11/libc/libio/fileops.c
branches/eglibc-2_11/libc/posix/Makefile
branches/eglibc-2_11/libc/posix/regex_internal.c
branches/eglibc-2_11/libc/posix/regexec.c
branches/eglibc-2_11/libc/sysdeps/posix/getaddrinfo.c
branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/Makefile
branches/eglibc-2_11/ports/ChangeLog.mips
Modified: branches/eglibc-2_11/libc/ChangeLog
==============================================================================
--- branches/eglibc-2_11/libc/ChangeLog (original)
+++ branches/eglibc-2_11/libc/ChangeLog Tue Sep 6 08:25:09 2011
@@ -1,3 +1,29 @@
+2011-05-29 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ [BZ #12350]
+ * sysdeps/posix/getaddrinfo.c (gethosts): Restore only RES_USE_IENT6
+ bit from old_res_options.
+ (gaih_inet): Likewise.
+
+2011-05-28 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ [BZ #12811]
+ * posix/regex_internal.c (build_wcs_buffer): Don't signal we have to
+ grow the buffers more if it already has to be sufficient.
+ (build_wcs_upper_buffer): Likewise.
+ * posix/regexec.c (check_matching): Likewise.
+ (clean_state_log_if_needed): Likewise.
+ (extend_buffers): Don't enlarge buffers beyond size of the input
+ buffer.
+ Patches mostly by Emil Wojak <emil@xxxxxxxx>.
+ * posix/bug-regex32.c: New file.
+ * posix/Makefile (tests): Add bug-regex32.
+
+2011-05-14 Ulrich Drepper <drepper@xxxxxxxxx>
+
+ * iconv/loop.c (SINGLE) [STORE_REST]: Add input bytes to bytebuf before
+ storing incomplete byte sequence in state object.
+
2011-05-17 H.J. Lu <hongjiu.lu@xxxxxxxxx>
[BZ #12775]
@@ -27,14 +53,6 @@
* iconv/loop.c (SINGLE) [STORE_REST]: Add input bytes to bytebuf before
storing incomplete byte sequence in state object. Avoid testing for
guaranteed too small input if we know there is enough data available.
-
-2011-05-13 Ulrich Drepper <drepper@xxxxxxxxx>
-
- [BZ #12724]
- * libio/fileops.c (_IO_new_file_close_it): Always flush when
- currently writing and seek to current position when not.
- * libio/Makefile (tests): Add bug-fclose1.
- * libio/bug-fclose1.c: New file.
2011-05-12 Ulrich Drepper <drepper@xxxxxxxxx>
@@ -139,11 +157,6 @@
Maintain aligned stack.
(CHECK_RSP): Remove unused macro.
-2011-04-01 Andreas Schwab <schwab@xxxxxxxxxx>
-
- * sysdeps/unix/sysv/linux/Makefile (sysdep_headers): Add
- bits/timex.h
-
2011-03-18 Ulrich Drepper <drepper@xxxxxxxxx>
[BZ #12583]
@@ -177,24 +190,6 @@
2011-03-03 Andreas Schwab <schwab@xxxxxxxxxx>
* libio/fmemopen.c (fmemopen): Don't read past end of buffer.
-
-2011-02-23 Andreas Schwab <schwab@xxxxxxxxxx>
- Ulrich Drepper <drepper@xxxxxxxxx>
-
- [BZ #12509]
- * include/link.h (struct link_map): Add l_orig_initfini.
- * elf/dl-load.c (_dl_map_object_from_fd): Free realname before
- returning unsuccessfully.
- * elf/dl-close.c (_dl_close_worker): If this is the last explicit
- close of a file loaded at startup, restore the original l_initfini
- list.
- * elf/dl-deps.c (_dl_map_object_deps): Don't free old l_initfini
- list, store the pointer.
- * elf/Makefile ($(objpfx)noload-mem): New rule.
- (noload-ENV): Define.
- (tests): Add $(objpfx)noload-mem.
- * elf/noload.c: Include <memcheck.h>.
- (main): Call mtrace. Close all opened handles.
2011-02-17 Andreas Schwab <schwab@xxxxxxxxxx>
Modified: branches/eglibc-2_11/libc/elf/Makefile
==============================================================================
--- branches/eglibc-2_11/libc/elf/Makefile (original)
+++ branches/eglibc-2_11/libc/elf/Makefile Tue Sep 6 08:25:09 2011
@@ -210,7 +210,7 @@
ifeq (yesyes,$(have-fpie)$(build-shared))
tests: $(objpfx)tst-pie1.out
endif
-tests: $(objpfx)tst-leaks1-mem $(objpfx)noload-mem
+tests: $(objpfx)tst-leaks1-mem
tlsmod17a-suffixes = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
tlsmod18a-suffixes = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
@@ -664,10 +664,6 @@
LDFLAGS-noload = -rdynamic
$(objpfx)noload.out: $(objpfx)testobj5.so
-$(objpfx)noload-mem: $(objpfx)noload.out
- $(common-objpfx)malloc/mtrace $(objpfx)noload.mtrace > $@
-noload-ENV = MALLOC_TRACE=$(objpfx)noload.mtrace
-
LDFLAGS-nodelete = -rdynamic
LDFLAGS-nodelmod1.so = -Wl,--enable-new-dtags,-z,nodelete
LDFLAGS-nodelmod4.so = -Wl,--enable-new-dtags,-z,nodelete
Modified: branches/eglibc-2_11/libc/elf/dl-close.c
==============================================================================
--- branches/eglibc-2_11/libc/elf/dl-close.c (original)
+++ branches/eglibc-2_11/libc/elf/dl-close.c Tue Sep 6 08:25:09 2011
@@ -1,5 +1,5 @@
/* Close a shared object opened by `_dl_open'.
- Copyright (C) 1996-2007, 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1996-2007, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -119,17 +119,8 @@
if (map->l_direct_opencount > 0 || map->l_type != lt_loaded
|| dl_close_state != not_pending)
{
- if (map->l_direct_opencount == 0)
- {
- if (map->l_type == lt_loaded)
- dl_close_state = rerun;
- else if (map->l_type == lt_library)
- {
- struct link_map **oldp = map->l_initfini;
- map->l_initfini = map->l_orig_initfini;
- _dl_scope_free (oldp);
- }
- }
+ if (map->l_direct_opencount == 0 && map->l_type == lt_loaded)
+ dl_close_state = rerun;
/* There are still references to this object. Do nothing more. */
if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0))
Modified: branches/eglibc-2_11/libc/elf/dl-deps.c
==============================================================================
--- branches/eglibc-2_11/libc/elf/dl-deps.c (original)
+++ branches/eglibc-2_11/libc/elf/dl-deps.c Tue Sep 6 08:25:09 2011
@@ -669,5 +669,5 @@
_dl_scope_free (old_l_reldeps);
}
if (old_l_initfini != NULL)
- map->l_orig_initfini = old_l_initfini;
+ _dl_scope_free (old_l_initfini);
}
Modified: branches/eglibc-2_11/libc/elf/dl-load.c
==============================================================================
--- branches/eglibc-2_11/libc/elf/dl-load.c (original)
+++ branches/eglibc-2_11/libc/elf/dl-load.c Tue Sep 6 08:25:09 2011
@@ -987,7 +987,6 @@
{
/* We are not supposed to load the object unless it is already
loaded. So return now. */
- free (realname);
__close (fd);
return NULL;
}
@@ -1006,7 +1005,6 @@
_dl_zerofd = _dl_sysdep_open_zero_fill ();
if (_dl_zerofd == -1)
{
- free (realname);
__close (fd);
_dl_signal_error (errno, NULL, NULL,
N_("cannot open zero fill device"));
Modified: branches/eglibc-2_11/libc/elf/noload.c
==============================================================================
--- branches/eglibc-2_11/libc/elf/noload.c (original)
+++ branches/eglibc-2_11/libc/elf/noload.c Tue Sep 6 08:25:09 2011
@@ -1,28 +1,20 @@
#include <dlfcn.h>
#include <stdio.h>
-#include <mcheck.h>
int
main (void)
{
int result = 0;
- void *p;
-
- mtrace ();
/* First try to load an object which is a dependency. This should
succeed. */
- p = dlopen ("testobj1.so", RTLD_LAZY | RTLD_NOLOAD);
- if (p == NULL)
+ if (dlopen ("testobj1.so", RTLD_LAZY | RTLD_NOLOAD) == NULL)
{
printf ("cannot open \"testobj1.so\": %s\n", dlerror ());
result = 1;
}
else
- {
- puts ("loading \"testobj1.so\" succeeded, OK");
- dlclose (p);
- }
+ puts ("loading \"testobj1.so\" succeeded, OK");
/* Now try loading an object which is not already loaded. */
if (dlopen ("testobj5.so", RTLD_LAZY | RTLD_NOLOAD) != NULL)
@@ -33,6 +25,8 @@
else
{
/* Load the object and run the same test again. */
+ void *p;
+
puts ("\"testobj5.so\" wasn't loaded and RTLD_NOLOAD prevented it, OK");
p = dlopen ("testobj5.so", RTLD_LAZY);
@@ -47,17 +41,13 @@
{
puts ("loading \"testobj5.so\" succeeded, OK");
- void *q = dlopen ("testobj5.so", RTLD_LAZY | RTLD_NOLOAD);
- if (q == NULL)
+ if (dlopen ("testobj5.so", RTLD_LAZY | RTLD_NOLOAD) == NULL)
{
printf ("cannot open \"testobj5.so\": %s\n", dlerror ());
result = 1;
}
else
- {
- puts ("loading \"testobj5.so\" with RTLD_NOLOAD succeeded, OK");
- dlclose (q);
- }
+ puts ("loading \"testobj5.so\" with RTLD_NOLOAD succeeded, OK");
if (dlclose (p) != 0)
{
Modified: branches/eglibc-2_11/libc/include/link.h
==============================================================================
--- branches/eglibc-2_11/libc/include/link.h (original)
+++ branches/eglibc-2_11/libc/include/link.h Tue Sep 6 08:25:09 2011
@@ -1,6 +1,6 @@
/* Data structure for communication from the run-time dynamic linker for
loaded ELF shared objects.
- Copyright (C) 1995-2006, 2007, 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1995-2006, 2007, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -236,9 +236,6 @@
/* List of object in order of the init and fini calls. */
struct link_map **l_initfini;
- /* The init and fini list generated at startup, saved when the
- object is also loaded dynamically. */
- struct link_map **l_orig_initfini;
/* List of the dependencies introduced through symbol binding. */
struct link_map_reldeps
Modified: branches/eglibc-2_11/libc/libio/Makefile
==============================================================================
--- branches/eglibc-2_11/libc/libio/Makefile (original)
+++ branches/eglibc-2_11/libc/libio/Makefile Tue Sep 6 08:25:09 2011
@@ -1,4 +1,4 @@
-# Copyright (C) 1995-2004,2006-2009,2011 Free Software Foundation, Inc.
+# Copyright (C) 1995-2004,2006,2007,2008,2009 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -67,7 +67,7 @@
tst-mmap2-eofsync tst-mmap-offend bug-fopena+ \
bug-ungetc2 bug-ungetc3 bug-ungetc4 \
tst-memstream1 tst-memstream2 \
- bug-memstream1 tst-popen1 bug-fclose1
+ bug-memstream1 tst-popen1
tests-$(OPTION_EGLIBC_LOCALE_CODE) \
+= tst-swscanf tst-fgetws tst-fopenloc tst-setvbuf1 \
tst-ungetwc1 tst-ungetwc2 bug-ftell bug-ungetwc2 \
Removed: branches/eglibc-2_11/libc/libio/bug-fclose1.c
==============================================================================
--- branches/eglibc-2_11/libc/libio/bug-fclose1.c (original)
+++ branches/eglibc-2_11/libc/libio/bug-fclose1.c (removed)
@@ -1,132 +1,0 @@
-// BZ #12724
-
-static void do_prepare (void);
-#define PREPARE(argc, argv) do_prepare ()
-static int do_test (void);
-#define TEST_FUNCTION do_test()
-#include "../test-skeleton.c"
-
-
-static int fd;
-
-
-static void
-do_prepare (void)
-{
- fd = create_temp_file ("bug-fclose1.", NULL);
- if (fd == -1)
- {
- printf ("cannot create temporary file: %m\n");
- exit (1);
- }
-}
-
-
-static int
-do_test (void)
-{
- static const char pattern[] = "hello world";
-
- /* Prepare a seekable file. */
- if (write (fd, pattern, sizeof pattern) != sizeof pattern)
- {
- printf ("cannot write pattern: %m\n");
- return 1;
- }
- if (lseek (fd, 1, SEEK_SET) != 1)
- {
- printf ("cannot seek after write: %m\n");
- return 1;
- }
-
- /* Create an output stream visiting the file; when it is closed, all
- other file descriptors visiting the file must see the new file
- position. */
- int fd2 = dup (fd);
- if (fd2 < 0)
- {
- printf ("cannot duplicate descriptor for writing: %m\n");
- return 1;
- }
- FILE *f = fdopen (fd2, "w");
- if (f == NULL)
- {
- printf ("first fdopen failed: %m\n");
- return 1;
- }
- if (fputc (pattern[1], f) != pattern[1])
- {
- printf ("fputc failed: %m\n");
- return 1;
- }
- if (fclose (f) != 0)
- {
- printf ("first fclose failed: %m\n");
- return 1;
- }
- errno = 0;
- if (lseek (fd2, 0, SEEK_CUR) != -1)
- {
- printf ("lseek after fclose after write did not fail\n");
- return 1;
- }
- if (errno != EBADF)
- {
- printf ("lseek after fclose after write did not fail with EBADF: %m\n");
- return 1;
- }
- off_t o = lseek (fd, 0, SEEK_CUR);
- if (o != 2)
- {
- printf ("\
-lseek on original descriptor after first fclose returned %ld, expected 2\n",
- (long int) o);
- return 1;
- }
-
- /* Likewise for an input stream. */
- fd2 = dup (fd);
- if (fd2 < 0)
- {
- printf ("cannot duplicate descriptor for reading: %m\n");
- return 1;
- }
- f = fdopen (fd2, "r");
- if (f == NULL)
- {
- printf ("second fdopen failed: %m\n");
- return 1;
- }
- char c = fgetc (f);
- if (c != pattern[2])
- {
- printf ("getc returned %c, expected %c\n", c, pattern[2]);
- return 1;
- }
- if (fclose (f) != 0)
- {
- printf ("second fclose failed: %m\n");
- return 1;
- }
- errno = 0;
- if (lseek (fd2, 0, SEEK_CUR) != -1)
- {
- printf ("lseek after fclose after read did not fail\n");
- return 1;
- }
- if (errno != EBADF)
- {
- printf ("lseek after fclose after read did not fail with EBADF: %m\n");
- return 1;
- }
- o = lseek (fd, 0, SEEK_CUR);
- if (o != 3)
- {
- printf ("\
-lseek on original descriptor after second fclose returned %ld, expected 3\n",
- (long int) o);
- return 1;
- }
-
- return 0;
-}
Modified: branches/eglibc-2_11/libc/libio/fileops.c
==============================================================================
--- branches/eglibc-2_11/libc/libio/fileops.c (original)
+++ branches/eglibc-2_11/libc/libio/fileops.c Tue Sep 6 08:25:09 2011
@@ -161,27 +161,19 @@
_IO_new_file_close_it (fp)
_IO_FILE *fp;
{
+ int write_status, close_status;
if (!_IO_file_is_open (fp))
return EOF;
- int write_status;
- if (_IO_in_put_mode (fp))
+ if ((fp->_flags & _IO_NO_WRITES) == 0
+ && (fp->_flags & _IO_CURRENTLY_PUTTING) != 0)
write_status = _IO_do_flush (fp);
- else if (fp->_offset != _IO_pos_BAD && fp->_IO_read_base != NULL
- && !_IO_in_backup (fp))
- {
- off64_t o = _IO_SEEKOFF (fp, 0, _IO_seek_cur, 0);
- if (o == WEOF)
- write_status = EOF;
- else
- write_status = _IO_SYSSEEK (fp, o, SEEK_SET) < 0 ? EOF : 0;
- }
else
write_status = 0;
INTUSE(_IO_unsave_markers) (fp);
- int close_status = _IO_SYSCLOSE (fp);
+ close_status = _IO_SYSCLOSE (fp);
/* Free buffer. */
#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
Modified: branches/eglibc-2_11/libc/posix/Makefile
==============================================================================
--- branches/eglibc-2_11/libc/posix/Makefile (original)
+++ branches/eglibc-2_11/libc/posix/Makefile Tue Sep 6 08:25:09 2011
@@ -106,7 +106,7 @@
tst-fnmatch2 tst-cpucount tst-cpuset
tests-$(OPTION_EGLIBC_LOCALE_CODE) \
+= tst-fnmatch tst-regexloc bug-regex1 bug-regex5 \
- bug-regex23 bug-regex25
+ bug-regex23 bug-regex25 bug-regex32
tests-$(OPTION_EGLIBC_INET) \
+= tst-getaddrinfo bug-ga1 tst-getaddrinfo2 \
tst-rfc3484 tst-rfc3484-2 tst-rfc3484-3 tst-getaddrinfo3
Modified: branches/eglibc-2_11/libc/posix/regex_internal.c
==============================================================================
--- branches/eglibc-2_11/libc/posix/regex_internal.c (original)
+++ branches/eglibc-2_11/libc/posix/regex_internal.c Tue Sep 6 08:25:09 2011
@@ -237,13 +237,8 @@
else
p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx;
mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state);
- if (BE (mbclen == (size_t) -2, 0))
- {
- /* The buffer doesn't have enough space, finish to build. */
- pstr->cur_state = prev_st;
- break;
- }
- else if (BE (mbclen == (size_t) -1 || mbclen == 0, 0))
+ if (BE (mbclen == (size_t) -1 || mbclen == 0
+ || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len), 0))
{
/* We treat these cases as a singlebyte character. */
mbclen = 1;
@@ -251,6 +246,12 @@
if (BE (pstr->trans != NULL, 0))
wc = pstr->trans[wc];
pstr->cur_state = prev_st;
+ }
+ else if (BE (mbclen == (size_t) -2, 0))
+ {
+ /* The buffer doesn't have enough space, finish to build. */
+ pstr->cur_state = prev_st;
+ break;
}
/* Write wide character and padding. */
@@ -334,9 +335,11 @@
for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;)
pstr->wcs[byte_idx++] = WEOF;
}
- else if (mbclen == (size_t) -1 || mbclen == 0)
+ else if (mbclen == (size_t) -1 || mbclen == 0
+ || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len))
{
- /* It is an invalid character or '\0'. Just use the byte. */
+ /* It is an invalid character, an incomplete character
+ at the end of the string, or '\0'. Just use the byte. */
int ch = pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx];
pstr->mbs[byte_idx] = ch;
/* And also cast it to wide char. */
@@ -449,7 +452,8 @@
for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;)
pstr->wcs[byte_idx++] = WEOF;
}
- else if (mbclen == (size_t) -1 || mbclen == 0)
+ else if (mbclen == (size_t) -1 || mbclen == 0
+ || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len))
{
/* It is an invalid character or '\0'. Just use the byte. */
int ch = pstr->raw_mbs[pstr->raw_mbs_idx + src_idx];
Modified: branches/eglibc-2_11/libc/posix/regexec.c
==============================================================================
--- branches/eglibc-2_11/libc/posix/regexec.c (original)
+++ branches/eglibc-2_11/libc/posix/regexec.c Tue Sep 6 08:25:09 2011
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002, 2003, 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2002-2005,2007,2009,2010,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@xxxxxxxxxxxxxx>.
@@ -1120,12 +1120,13 @@
re_dfastate_t *old_state = cur_state;
int next_char_idx = re_string_cur_idx (&mctx->input) + 1;
- if (BE (next_char_idx >= mctx->input.bufs_len, 0)
- || (BE (next_char_idx >= mctx->input.valid_len, 0)
- && mctx->input.valid_len < mctx->input.len))
- {
- err = extend_buffers (mctx);
- if (BE (err != REG_NOERROR, 0))
+ if ((BE (next_char_idx >= mctx->input.bufs_len, 0)
+ && mctx->input.bufs_len < mctx->input.len)
+ || (BE (next_char_idx >= mctx->input.valid_len, 0)
+ && mctx->input.valid_len < mctx->input.len))
+ {
+ err = extend_buffers (mctx);
+ if (BE (err != REG_NOERROR, 0))
{
assert (err == REG_ESPACE);
return -2;
@@ -1696,7 +1697,8 @@
{
int top = mctx->state_log_top;
- if (next_state_log_idx >= mctx->input.bufs_len
+ if ((next_state_log_idx >= mctx->input.bufs_len
+ && mctx->input.bufs_len < mctx->input.len)
|| (next_state_log_idx >= mctx->input.valid_len
&& mctx->input.valid_len < mctx->input.len))
{
@@ -4068,7 +4070,7 @@
re_string_t *pstr = &mctx->input;
/* Double the lengthes of the buffers. */
- ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2);
+ ret = re_string_realloc_buffers (pstr, MIN (pstr->len, pstr->bufs_len * 2));
if (BE (ret != REG_NOERROR, 0))
return ret;
Modified: branches/eglibc-2_11/libc/sysdeps/posix/getaddrinfo.c
==============================================================================
--- branches/eglibc-2_11/libc/sysdeps/posix/getaddrinfo.c (original)
+++ branches/eglibc-2_11/libc/sysdeps/posix/getaddrinfo.c Tue Sep 6 08:25:09 2011
@@ -207,7 +207,7 @@
if (herrno == NETDB_INTERNAL) \
{ \
__set_h_errno (herrno); \
- _res.options = old_res_options; \
+ _res.options |= old_res_options & RES_USE_INET6; \
return -EAI_SYSTEM; \
} \
if (herrno == TRY_AGAIN) \
@@ -842,7 +842,7 @@
nip = nip->next;
}
- _res.options = old_res_options;
+ _res.options |= old_res_options & RES_USE_INET6;
if (no_data != 0 && no_inet6_data != 0)
{
Modified: branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/Makefile
==============================================================================
--- branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/Makefile (original)
+++ branches/eglibc-2_11/libc/sysdeps/unix/sysv/linux/Makefile Tue Sep 6 08:25:09 2011
@@ -96,7 +96,7 @@
endif
ifeq ($(subdir),time)
-sysdep_headers += sys/timex.h bits/timex.h
+sysdep_headers += sys/timex.h
sysdep_routines += ntp_gettime
endif
Modified: branches/eglibc-2_11/ports/ChangeLog.mips
==============================================================================
--- branches/eglibc-2_11/ports/ChangeLog.mips (original)
+++ branches/eglibc-2_11/ports/ChangeLog.mips Tue Sep 6 08:25:09 2011
@@ -1,3 +1,11 @@
+2011-09-06 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ [BZ #13109]
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/syscalls.list (fstatfs)
+ (statfs): New.
+ * sysdeps/unix/sysv/linux/mips/mips64/n64/fstatfs64.c,
+ sysdeps/unix/sysv/linux/mips/mips64/n64/statfs64.c: New.
+
2011-01-25 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/mips/bits/mman.h (MADV_HUGEPAGE,