bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] base32, base64: prefer signed to unsigned integers


From: Bruno Haible
Subject: Re: [PATCH] base32, base64: prefer signed to unsigned integers
Date: Sat, 28 Aug 2021 16:12:09 +0200

> 2) The continuous integration reported a test failure (both with GCC and 
> clang):
> 
>    test-base64.c:131: assertion 'len == 0' failed
>    FAIL test-base64 (exit status: 134)
> 
>    But, strangely, I can't reproduce it locally. (Maybe it depends on the 
> glibc
>    version?)

Or maybe the cause is the line

  assume (0 <= inlen);

At the entry point of a public function, it is better to use 'assert' than
'assume', IMO. 'assume' means "feel free to crash or press the red button
if there is an invalid argument".

Bruno






reply via email to

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