From: Jeffrey Walton <noloader@gmail.com>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: "bug-gnulib@gnu.org List" <bug-gnulib@gnu.org>
Subject: Re: gl_array_list.c:452:29: runtime error: applying zero offset to null pointer
Date: Mon, 1 Nov 2021 20:46:14 -0400 [thread overview]
Message-ID: <CAH8yC8km8rq+TL1Or8JUBWngRiQ83cGkW6SYF7+BzyFT=MiWFw@mail.gmail.com> (raw)
In-Reply-To: <9ddce3aa-26de-3e4e-a586-e55bf6918457@cs.ucla.edu>
On Mon, Nov 1, 2021 at 4:02 PM Paul Eggert <eggert@cs.ucla.edu> wrote:
>
> On 10/21/21 12:38, Paweł Krawczyk wrote:
>
> > gl_array_list.c:452:29: runtime error: applying zero offset to null pointer
> > SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior gl_array_list.c:452:29 in
>
> The Gnulib portability assumptions
> <https://www.gnu.org/software/gnulib/manual/html_node/Other-portability-assumptions.html>
> say it's OK to add 0 to a null pointer. If you have a real platform
> (i.e., not a pedantic testing framework) where this is an issue, please
> let us know. Otherwise you might look into some way to have clang not
> nag you about this non-problem.
I believe that's undefined behavior. NULL is not a valid object. I
think the tools are correct in producing a finding.
https://stackoverflow.com/questions/26906621
Jeff
next prev parent reply other threads:[~2021-11-02 0:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-21 19:38 gl_array_list.c:452:29: runtime error: applying zero offset to null pointer Paweł Krawczyk
2021-11-01 19:21 ` Paul Eggert
2021-11-02 0:46 ` Jeffrey Walton [this message]
2021-11-02 1:13 ` Paul Eggert
2022-02-26 19:57 ` 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='CAH8yC8km8rq+TL1Or8JUBWngRiQ83cGkW6SYF7+BzyFT=MiWFw@mail.gmail.com' \
--to=noloader@gmail.com \
--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).