bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: bug-gnulib@gnu.org
Subject: Re: [PATCH] base32, base64: prefer signed to unsigned integers
Date: Sat, 28 Aug 2021 16:12:09 +0200	[thread overview]
Message-ID: <22573827.hxa6pUQ8Du@omega> (raw)
In-Reply-To: <3048976.kXSN5OTJKJ@omega>

> 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	other threads:[~2021-08-28 14:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-27 22:27 [PATCH] base32, base64: prefer signed to unsigned integers Paul Eggert
2021-08-28 12:45 ` Bruno Haible
2021-08-28 14:12   ` Bruno Haible [this message]
2021-08-29  7:57     ` Paul Eggert
2021-08-29 10:16       ` Bruno Haible
2021-08-29 17:25         ` Paul Eggert
2021-08-29 18:36           ` Bruno Haible
2021-08-29 20:01             ` Paul Eggert
2021-08-29  7:49   ` Paul Eggert
2021-09-19 22:07     ` ialloc: relicense Bruno Haible
2021-08-29  8:20 ` [PATCH] base32, base64: prefer signed to unsigned integers Simon Josefsson via Gnulib discussion list
2021-08-29  9:56   ` Bruno Haible
2021-08-30 14:12     ` Simon Josefsson via Gnulib discussion list
2021-08-30 18:17       ` Paul Eggert
2021-08-30 18:58         ` Simon Josefsson via Gnulib discussion list
2021-09-04 10:06         ` autoupdate again Bruno Haible
2021-09-04 16:47           ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=22573827.hxa6pUQ8Du@omega \
    --to=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    --cc=eggert@cs.ucla.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).