This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.20-366-ga0d424e
- From: siddhesh at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 16 Dec 2014 11:26:03 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.20-366-ga0d424e
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via a0d424ef9d7fc34f7d1a516f38c8efb1e8692a03 (commit)
via 8b460906cdb8ef1501fa5dcff54206b201e527d5 (commit)
via fa13e15b9a5cc49c9c6dee33084c3ff54d48e50e (commit)
via 0e426475a70800b6a17daa7a8ebbafeabfcbc022 (commit)
from 4f646bce1cae4031bfe7517e4793f1edc1a15220 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=a0d424ef9d7fc34f7d1a516f38c8efb1e8692a03
commit a0d424ef9d7fc34f7d1a516f38c8efb1e8692a03
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date: Tue Dec 16 16:53:05 2014 +0530
Fix 'array subscript is above array bounds' warning in res_send.c
I see this warning in my build on F21 x86_64, which seems to be due to
a weak check for array bounds. Fixed by making the bounds check
stronger.
This is not an actual bug since nscount is never set to anything
greater than MAXNS. The compiler however does not know this, so we
need the stronger bounds check to quieten the compiler.
diff --git a/ChangeLog b/ChangeLog
index 9bee819..2a3e0b7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-16 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ * resolv/res_send.c (__libc_res_nsend): Fix check for nsmap
+ bounds.
+
2014-12-16 Arjun Shankar <arjun.is@lostca.se>
* libio/tst-fopenloc.c: Use test-skeleton.c.
diff --git a/resolv/res_send.c b/resolv/res_send.c
index 4a95eb8..5a9882c 100644
--- a/resolv/res_send.c
+++ b/resolv/res_send.c
@@ -429,7 +429,7 @@ __libc_res_nsend(res_state statp, const u_char *buf, int buflen,
while (ns < MAXNS
&& EXT(statp).nsmap[ns] != MAXNS)
ns++;
- if (ns == MAXNS)
+ if (ns >= MAXNS)
break;
EXT(statp).nsmap[ns] = n;
map[n] = ns++;
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8b460906cdb8ef1501fa5dcff54206b201e527d5
commit 8b460906cdb8ef1501fa5dcff54206b201e527d5
Author: Arjun Shankar <arjun.is@lostca.se>
Date: Tue Dec 16 15:21:01 2014 +0530
Modify libio/tst-fopenloc.c to use test-skeleton.c
This test would earlier fail when run under test-skeleton.c due to
bug #17522 in 'fputws'. That bug is now fixed and so this test may
be modified.
diff --git a/ChangeLog b/ChangeLog
index ce2d639..9bee819 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2014-12-16 Arjun Shankar <arjun.is@lostca.se>
+ * libio/tst-fopenloc.c: Use test-skeleton.c.
+
* stdlib/tst-bsearch.c: Use test-skeleton.c.
(entry): Rename to ITEM.
(do_test, comp): Adjust.
diff --git a/libio/tst-fopenloc.c b/libio/tst-fopenloc.c
index 8fe83fd..140d976 100644
--- a/libio/tst-fopenloc.c
+++ b/libio/tst-fopenloc.c
@@ -29,8 +29,8 @@
static const char inputfile[] = "../iconvdata/testdata/ISO-8859-1";
-int
-main (void)
+static int
+do_test (void)
{
FILE *fp;
@@ -59,3 +59,6 @@ main (void)
return 0;
}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=fa13e15b9a5cc49c9c6dee33084c3ff54d48e50e
commit fa13e15b9a5cc49c9c6dee33084c3ff54d48e50e
Author: Arjun Shankar <arjun.is@lostca.se>
Date: Tue Dec 16 15:19:51 2014 +0530
Modify stdlib/tst-bsearch.c to use test-skeleton.c
This test used to define a 'struct entry' that conflicts with the
definition in search.h included in test-skeleton. The struct is
now renamed 'item'.
diff --git a/ChangeLog b/ChangeLog
index 7b724d0..ce2d639 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2014-12-16 Arjun Shankar <arjun.is@lostca.se>
+ * stdlib/tst-bsearch.c: Use test-skeleton.c.
+ (entry): Rename to ITEM.
+ (do_test, comp): Adjust.
+
* stdio-common/tst-fseek.c: Use test-skeleton.c.
2014-12-16 Torvald Riegel <triegel@redhat.com>
diff --git a/stdlib/tst-bsearch.c b/stdlib/tst-bsearch.c
index e539275..35b1f7f 100644
--- a/stdlib/tst-bsearch.c
+++ b/stdlib/tst-bsearch.c
@@ -20,7 +20,7 @@
#include <stdlib.h>
#include <tst-stack-align.h>
-struct entry
+struct item
{
int val;
const char *str;
@@ -45,8 +45,8 @@ static int align_check;
static int
comp (const void *p1, const void *p2)
{
- struct entry *e1 = (struct entry *) p1;
- struct entry *e2 = (struct entry *) p2;
+ struct item *e1 = (struct item *) p1;
+ struct item *e2 = (struct item *) p2;
if (!align_check)
align_check = TEST_STACK_ALIGN () ? -1 : 1;
@@ -55,20 +55,20 @@ comp (const void *p1, const void *p2)
}
-int
-main (void)
+static int
+do_test (void)
{
size_t cnt;
int result = 0;
- struct entry key;
- struct entry *res;
+ struct item key;
+ struct item *res;
for (cnt = 0; cnt < narr; ++cnt)
{
key.val = arr[cnt].val;
- res = (struct entry *) bsearch (&key, arr, narr, sizeof (arr[0]), comp);
+ res = (struct item *) bsearch (&key, arr, narr, sizeof (arr[0]), comp);
if (res == NULL)
{
printf ("entry %zd not found\n", cnt);
@@ -83,7 +83,7 @@ main (void)
/* And some special tests that shouldn't find any entry. */
key.val = -1;
- res = (struct entry *) bsearch (&key, arr, narr, sizeof (arr[0]), comp);
+ res = (struct item *) bsearch (&key, arr, narr, sizeof (arr[0]), comp);
if (res != NULL)
{
puts ("found an entry that's not there");
@@ -91,7 +91,7 @@ main (void)
}
key.val = 11;
- res = (struct entry *) bsearch (&key, arr, narr, sizeof (arr[0]), comp);
+ res = (struct item *) bsearch (&key, arr, narr, sizeof (arr[0]), comp);
if (res != NULL)
{
puts ("found an entry that's not there");
@@ -99,7 +99,7 @@ main (void)
}
key.val = 11;
- res = (struct entry *) bsearch (&key, arr, 0, sizeof (arr[0]), comp);
+ res = (struct item *) bsearch (&key, arr, 0, sizeof (arr[0]), comp);
if (res != NULL)
{
puts ("found an entry that's not there");
@@ -111,7 +111,7 @@ main (void)
{
key.val = arr[cnt].val;
- res = (struct entry *) bsearch (&key, &arr[5], 1, sizeof (arr[0]), comp);
+ res = (struct item *) bsearch (&key, &arr[5], 1, sizeof (arr[0]), comp);
if (cnt == 5)
{
if (res == NULL)
@@ -148,3 +148,6 @@ main (void)
return result;
}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0e426475a70800b6a17daa7a8ebbafeabfcbc022
commit 0e426475a70800b6a17daa7a8ebbafeabfcbc022
Author: Arjun Shankar <arjun.is@lostca.se>
Date: Tue Dec 16 15:18:46 2014 +0530
Modify stdio-common/tst-fseek.c to use test-skeleton.c
This test needs a TIMEOUT longer than the default 2 seconds since it
sleeps twice for a second each.
diff --git a/ChangeLog b/ChangeLog
index 8ce0f92..7b724d0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-12-16 Arjun Shankar <arjun.is@lostca.se>
+
+ * stdio-common/tst-fseek.c: Use test-skeleton.c.
+
2014-12-16 Torvald Riegel <triegel@redhat.com>
* string/tester.c: Include <libc-internal.h>.
diff --git a/stdio-common/tst-fseek.c b/stdio-common/tst-fseek.c
index 1ab4702..5b9c751 100644
--- a/stdio-common/tst-fseek.c
+++ b/stdio-common/tst-fseek.c
@@ -27,8 +27,8 @@
#include <sys/stat.h>
-int
-main (void)
+static int
+do_test (void)
{
const char *tmpdir;
char *fname;
@@ -476,3 +476,7 @@ main (void)
return result;
}
+
+#define TIMEOUT 3
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 15 +++++++++++++++
libio/tst-fopenloc.c | 7 +++++--
resolv/res_send.c | 2 +-
stdio-common/tst-fseek.c | 8 ++++++--
stdlib/tst-bsearch.c | 27 +++++++++++++++------------
5 files changed, 42 insertions(+), 17 deletions(-)
hooks/post-receive
--
GNU C Library master sources