bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] tests: fix signed overflow issues


From: Bruno Haible
Subject: Re: [PATCH] tests: fix signed overflow issues
Date: Mon, 22 Mar 2021 01:28:00 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-203-generic; KDE/5.18.0; x86_64; ; )

> * tests/test-dynarray.c (value_at): Avoid undefined behavior
> in signed integer multiplication.

Thanks. Indeed with N=100000 the multiplication would overflow.
If I had used CC="gcc -ftrapv", I would have noticed.

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]