This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch google/grte/v5-2.27/master updated. glibc-2.27-86-g2805c76
- From: shebs at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 9 May 2018 18:28:51 -0000
- Subject: GNU C Library master sources branch google/grte/v5-2.27/master updated. glibc-2.27-86-g2805c76
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, google/grte/v5-2.27/master has been updated
via 2805c76bf356b5955877ccb62a246cb9c838b412 (commit)
via e86f9654cd840e2b1c855525b6a613ecebc3ba79 (commit)
via f4da58077d2c26e2c4ef19a9217c5651375ab233 (commit)
via 66a3de79d3683c715b2980f778bc82fa2701b526 (commit)
from 27b89b54411796f35df9fca9945155e20cc30de8 (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=2805c76bf356b5955877ccb62a246cb9c838b412
commit 2805c76bf356b5955877ccb62a246cb9c838b412
Author: Stan Shebs <stanshebs@google.com>
Date: Wed May 9 11:28:09 2018 -0700
Defeat a malloc optimization by declaring things volatile.
diff --git a/malloc/tst-malloc-backtrace.c b/malloc/tst-malloc-backtrace.c
index 171cfce..b1708b3 100644
--- a/malloc/tst-malloc-backtrace.c
+++ b/malloc/tst-malloc-backtrace.c
@@ -35,8 +35,8 @@ call_free (void *ptr)
int
do_test (void)
{
- void *ptr1 = malloc (SIZE);
- void *ptr2 = malloc (SIZE);
+ void *volatile ptr1 = malloc (SIZE);
+ void *volatile ptr2 = malloc (SIZE);
/* Avoid unwanted output to TTY after an expected memory corruption. */
ignore_stderr();
diff --git a/malloc/tst-malloc-too-large.c b/malloc/tst-malloc-too-large.c
index 10fb136..bdd2a9e 100644
--- a/malloc/tst-malloc-too-large.c
+++ b/malloc/tst-malloc-too-large.c
@@ -69,7 +69,7 @@ test_setup (void)
static void
test_large_allocations (size_t size)
{
- void * ptr_to_realloc;
+ void *volatile ptr_to_realloc;
test_setup ();
TEST_VERIFY (malloc (size) == NULL);
diff --git a/malloc/tst-malloc.c b/malloc/tst-malloc.c
index aa1aa2a..bd10351 100644
--- a/malloc/tst-malloc.c
+++ b/malloc/tst-malloc.c
@@ -33,7 +33,7 @@ merror (const char *msg)
static int
do_test (void)
{
- void *p, *q;
+ void *volatile p, *volatile q;
int save;
errno = 0;
diff --git a/malloc/tst-mcheck.c b/malloc/tst-mcheck.c
index 18b0d59..d4c427b 100644
--- a/malloc/tst-mcheck.c
+++ b/malloc/tst-mcheck.c
@@ -33,7 +33,7 @@ merror (const char *msg)
static int
do_test (void)
{
- void *p, *q;
+ void *volatile p, *volatile q;
errno = 0;
diff --git a/malloc/tst-valloc.c b/malloc/tst-valloc.c
index ba57d95..b28163a 100644
--- a/malloc/tst-valloc.c
+++ b/malloc/tst-valloc.c
@@ -34,7 +34,7 @@ merror (const char *msg)
static int
do_test (void)
{
- void *p;
+ void *volatile p;
unsigned long pagesize = getpagesize ();
unsigned long ptrval;
int save;
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=e86f9654cd840e2b1c855525b6a613ecebc3ba79
commit e86f9654cd840e2b1c855525b6a613ecebc3ba79
Author: Stan Shebs <stanshebs@google.com>
Date: Wed May 9 11:26:35 2018 -0700
Forestall optimization-out of a buffer.
diff --git a/string/tst-xbzero-opt.c b/string/tst-xbzero-opt.c
index cf7041f..e9c411b 100644
--- a/string/tst-xbzero-opt.c
+++ b/string/tst-xbzero-opt.c
@@ -110,11 +110,17 @@ prepare_test_buffer (unsigned char *buf)
abort ();
}
+/* Use a volatile global to ensure that aggressive compilers don't
+ decide that the test buffer is unused and evaporate it. */
+
+volatile unsigned char *vol_glob;
+
static void
setup_no_clear (void)
{
unsigned char buf[TEST_BUFFER_SIZE];
prepare_test_buffer (buf);
+ vol_glob = buf;
}
static void
@@ -123,6 +129,7 @@ setup_ordinary_clear (void)
unsigned char buf[TEST_BUFFER_SIZE];
prepare_test_buffer (buf);
memset (buf, 0, TEST_BUFFER_SIZE);
+ vol_glob = buf;
}
static void
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f4da58077d2c26e2c4ef19a9217c5651375ab233
commit f4da58077d2c26e2c4ef19a9217c5651375ab233
Author: Stan Shebs <stanshebs@google.com>
Date: Wed May 9 11:25:42 2018 -0700
Add a clang/lld workaround for symbol not being overridden
diff --git a/elf/unload4mod4.c b/elf/unload4mod4.c
index ba5a144..bfff34f 100644
--- a/elf/unload4mod4.c
+++ b/elf/unload4mod4.c
@@ -3,6 +3,8 @@
int
__attribute__((noinline))
+/* Workaround for clang/lld failing to override this from a module. */
+__attribute__((weak))
baz (int x)
{
abort ();
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=66a3de79d3683c715b2980f778bc82fa2701b526
commit 66a3de79d3683c715b2980f778bc82fa2701b526
Author: Stan Shebs <stanshebs@google.com>
Date: Fri Apr 20 14:44:54 2018 -0700
Work around clang mishandling of assert functions in resolver buffer allocation, fixes random error returns in resolv/ tests.
diff --git a/include/alloc_buffer.h b/include/alloc_buffer.h
index 4167584..a06980e 100644
--- a/include/alloc_buffer.h
+++ b/include/alloc_buffer.h
@@ -213,6 +213,10 @@ alloc_buffer_alloc_bytes (struct alloc_buffer *buf, size_t length)
static __always_inline size_t
__alloc_buffer_assert_size (size_t size)
{
+ /* clang does not presently support the __error__ attribute, and for
+ some reason the fallback case for __errordecl results in error()
+ being called unconditionally. So skip over this for now. */
+#ifndef __clang__
if (!__builtin_constant_p (size))
{
__errordecl (error, "type size is not constant");
@@ -223,6 +227,7 @@ __alloc_buffer_assert_size (size_t size)
__errordecl (error, "type size is zero");
error ();
}
+#endif
return size;
}
@@ -231,6 +236,8 @@ __alloc_buffer_assert_size (size_t size)
static __always_inline size_t
__alloc_buffer_assert_align (size_t align)
{
+ /* As above - skip until we have a better idea for clang here. */
+#ifndef __clang__
if (!__builtin_constant_p (align))
{
__errordecl (error, "type alignment is not constant");
@@ -246,6 +253,7 @@ __alloc_buffer_assert_align (size_t align)
__errordecl (error, "type alignment is not a power of two");
error ();
}
+#endif
return align;
}
-----------------------------------------------------------------------
Summary of changes:
elf/unload4mod4.c | 2 ++
include/alloc_buffer.h | 8 ++++++++
malloc/tst-malloc-backtrace.c | 4 ++--
malloc/tst-malloc-too-large.c | 2 +-
malloc/tst-malloc.c | 2 +-
malloc/tst-mcheck.c | 2 +-
malloc/tst-valloc.c | 2 +-
string/tst-xbzero-opt.c | 7 +++++++
8 files changed, 23 insertions(+), 6 deletions(-)
hooks/post-receive
--
GNU C Library master sources