[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: Sat, 5 Mar 2022 13:18:10 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

On 3/4/22 05:58, Simon Josefsson via Gnulib discussion list wrote:
Below that is a patch for another UBSAN complaint about a NULL + 0
operation -- I recall that being discussed before too, but don't recall
the conclusion.

(char *)0 + 0 is undefined behavior, so clang's complaint about it is more justifiable than its complaint about assigning an unsigned char value to a char. But even with (char *)0 + 0 my feeling was that Clang is wrong, as adding 0 to (char *)0 works just fine on all platforms of practical interest; so we're better off overall by asking people to use -fno-sanitize=pointer-overflow when compiling Gnulib, if they also compile with -fsanitize=undefined. See the thread starting here:


and ending here:


reply via email to

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