Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1106984

Bug#1013035: sgt-puzzles: ftbfs with GCC-12

From Ben Hutchings <ben@decadent.org.uk>
Newsgroups linux.debian.bugs.dist
Subject Bug#1013035: sgt-puzzles: ftbfs with GCC-12
Date 2022-06-19 13:10 +0200
Message-ID <EA0Yx-5OY8-7@gated-at.bofh.it> (permalink)
References <EA0Yx-5OY8-9@gated-at.bofh.it> <EA0Yx-5OY8-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Thu, 2022-06-16 at 12:13 +0000, Matthias Klose wrote:
[...]
> In file included from /usr/include/string.h:519,
>                  from mines.c:12:
> In function ‘memset’,
>     inlined from ‘new_game’ at mines.c:2257:2:
> /usr/include/x86_64-linux-gnu/bits/string_fortified.h:59:10: error: ‘__builtin_memset’ specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=]
>    59 |   return __builtin___memset_chk (__dest, __ch, __len,
>       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    60 |                                  __glibc_objsize0 (__dest));
>       |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~
> mines.c: In function ‘new_game’:
> mines.c:2257:29: note: destination object allocated here
>  2257 |         memset(state->layout->mines, 0, wh * sizeof(bool));
>       |                ~~~~~~~~~~~~~^~~~~~~
[...]

This warning is nonsense, isn't it?  It's claiming that memset() is the
allocation site.  And the length (wh) is the result of multiplying two
integers that have been range-checked (though not in this function).

I should patch out the use of -Werror in this package though.

Ben.

-- 
Ben Hutchings
The most exhausting thing in life is being insincere.
                                                 - Anne Morrow Lindberg

Back to linux.debian.bugs.dist | Previous | Next | Find similar | Unroll thread


Thread

Bug#1013035: sgt-puzzles: ftbfs with GCC-12 Ben Hutchings <ben@decadent.org.uk> - 2022-06-19 13:10 +0200

csiph-web