This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 06/25] Add struct scratch_buffer and its internal helper functions
- From: Florian Weimer <fweimer at redhat dot com>
- To: Stefan Liebler <stli at linux dot vnet dot ibm dot com>, libc-alpha at sourceware dot org
- Date: Thu, 09 Apr 2015 13:07:58 +0200
- Subject: Re: [PATCH 06/25] Add struct scratch_buffer and its internal helper functions
- Authentication-results: sourceware.org; auth=none
- References: <cover dot 1425285061 dot git dot fweimer at redhat dot com> <7a6fe503fb764beee3d5b89662d3bbf65242161c dot 1425285061 dot git dot fweimer at redhat dot com> <54F4BB15 dot 7070409 at cs dot ucla dot edu> <550C37F7 dot 10504 at redhat dot com> <550C4AE0 dot 60205 at cs dot ucla dot edu> <55103BEA dot 7070305 at redhat dot com> <5510505B dot 8060209 at cs dot ucla dot edu> <alpine dot DEB dot 2 dot 10 dot 1503231839380 dot 14930 at digraph dot polyomino dot org dot uk> <55105F2C dot 6040400 at redhat dot com> <alpine dot DEB dot 2 dot 10 dot 1503231845410 dot 14930 at digraph dot polyomino dot org dot uk> <55105FED dot 80004 at redhat dot com> <551C1C9B dot 1060807 at redhat dot com> <551D8AE1 dot 5000805 at redhat dot com> <551DE8EA dot 6080200 at cs dot ucla dot edu> <5522BC03 dot 5090300 at redhat dot com> <5523007D dot 9080906 at cs dot ucla dot edu> <55239F13 dot 5040700 at redhat dot com> <mg0lfr$ovf$1 at ger dot gmane dot org> <5523EABF dot 9050003 at redhat dot com> <5523FCA6 dot 2080504 at redhat dot com> <mg5jma$tuo$1 at ger dot gmane dot org>
On 04/09/2015 12:18 PM, Stefan Liebler wrote:
> I have another issue with tst-scratch_buffer.c on s390-32 where size_t
> is an unsigned long with only 4 bytes:
Dave Miller reported that as well, see the parallel thread.
I need to figure out how to build glibc for 32-bit in a multi-arch
environment. But 32-bit s390 could be tricky, again due to the binutils
2.24 environment.
> gcc tst-scratch_buffer.c -c
> ...
> tst-scratch_buffer.c: In function âdo_testâ:
> tst-scratch_buffer.c:133:8: error: large integer implicitly truncated to
> unsigned type [-Werror=overflow]
> && unchanged_array_size (&buf, 1ULL << 32, 0)
> ^
> tst-scratch_buffer.c:134:8: error: large integer implicitly truncated to
> unsigned type [-Werror=overflow]
> && unchanged_array_size (&buf, 0, 1ULL << 32)))
> ^
> cc1: all warnings being treated as errors
>
> Can you change the test and use "1ULL << 31" or make the usage of "1ULL
> << 32" conditionally?
I have a patch that adds a cast to size_t, which suppresses the warning
on 32-bit platforms.
Using 1ULL << 31 would invalidate the test.
Can you make a change to the test, so that it compiles, and check if you
get the same inlining failure as Dave?
--
Florian Weimer / Red Hat Product Security