[Top][All Lists]

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

Re: uninorm/composition.c:75:22: runtime error

From: Paul Eggert
Subject: Re: uninorm/composition.c:75:22: runtime error
Date: Sun, 13 Mar 2022 19:07:55 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

On 3/13/22 00:04, Simon Josefsson wrote:
Reading the ideas in your responses, I think gnulib could help
developers to use ASan/UBSan in their project by assisting with these
choices.  I'll see if I can come up with anything that is generally
useful, once I get a couple of projects to build and self-test reliably
with ASan/UBSan.

Something like --enable-gcc-warnings, but --enable-sanitizer? That would be helpful.

For what it's worth, I just now built GNU Emacs with 'clang -fsanitize=undefined' and it complained several times about adding 0 to a null pointer, due to code that's in Emacs not in Gnulib. I worked around the problem by compiling with '-fsanitize=undefined -fno-sanitize=pointer-overflow'. Of course this disables some useful checks.

It is a pain that Clang is wrongheadedly pedantic here. Adding 0 to a null pointer is well-defined in C++17, and there's no realistic possibility of Clang being ported to a platform where it's undefined behavior in C.

reply via email to

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