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.25-589-gd54bb9b
- From: tuliom at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 26 Jun 2017 13:34:52 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.25-589-gd54bb9b
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 d54bb9b1d3fd25779fba2c403003c5097ba9af73 (commit)
from d9660db223630591739f3313b46faa5687eaf075 (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=d54bb9b1d3fd25779fba2c403003c5097ba9af73
commit d54bb9b1d3fd25779fba2c403003c5097ba9af73
Author: Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
Date: Mon Jun 26 09:55:41 2017 -0300
Prevent an implicit int promotion in malloc/tst-alloc_buffer.c
According to ISO C11, section 6.5.3.3 "Unary arithmetic operators", the
result of the ~ operator is the bitwise complement of its (promoted)
operand.
This can lead to a comparison of a char with another integer type.
Tested on powerpc, powerpc64 and powerpc64le.
* malloc/tst-alloc_buffer.c (test_misaligned): Cast to char
before comparing with another char.
diff --git a/ChangeLog b/ChangeLog
index b213e7c..9e19f62 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-06-26 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
+
+ * malloc/tst-alloc_buffer.c (test_misaligned): Cast to char
+ before comparing with another char.
+
2017-06-25 Rical Jasan <ricaljasan@pacific.net>
* manual/math.texi: Fix a grammatical error.
diff --git a/malloc/tst-alloc_buffer.c b/malloc/tst-alloc_buffer.c
index 1c14399..9b2bd20 100644
--- a/malloc/tst-alloc_buffer.c
+++ b/malloc/tst-alloc_buffer.c
@@ -429,7 +429,7 @@ test_misaligned (char pad)
}
/* Verify that padding was not overwritten. */
- TEST_VERIFY (backing[0] == ~pad);
+ TEST_VERIFY (backing[0] == (char) ~pad);
TEST_VERIFY (backing[SIZE + 1] == pad);
free (backing);
}
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 +++++
malloc/tst-alloc_buffer.c | 2 +-
2 files changed, 6 insertions(+), 1 deletions(-)
hooks/post-receive
--
GNU C Library master sources