[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [csmith-bugs] Bug report: generated code has signed overflow



Fixed. Thanks!

- Yang

On 12/12/2014 07:34 AM, Oliver Stannard wrote:
Hi,

Git version: b6b32bbb9d43b47033c6a6ffe4b8016d924d1503
platform.info:
   integer size = 4
   pointer size = 4

Running csmith with these options:
   csmith --output test.c --seed 37317 --no-packed-struct

results in output (full file attached) with this global variable (line 52):
   static int32_t g_4 = 0x420452A2L;
and this loop (line 274):
   for (g_4 = 21; (g_4 >= 21); g_4++)

This loop will run for a long time, and eventually result in a signed
integer overflow in g_4. g_4 is not modified anywhere else in the function.

Oliver