On Mon, Nov 1, 2021 at 4:02 PM Paul Eggert <[email protected]> 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

Reply via email to