tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] undefined sanitizer


From: Christian Jullien
Subject: Re: [Tinycc-devel] undefined sanitizer
Date: Sun, 23 Jun 2019 12:56:34 +0200

#if does not help to deal with different processors when only some of them have 
performance penalties.
The benefit of a warning is to question the developer about its code and 
possible way to fix it.
At least, he knows it code has the prerequisite to support misaligned memory of 
given types. 


-----Original Message-----
From: Tinycc-devel [mailto:tinycc-devel-bounces+eligis=address@hidden] On 
Behalf Of Vincent Lefevre
Sent: Sunday, June 23, 2019 12:42
To: address@hidden
Subject: Re: [Tinycc-devel] undefined sanitizer

On 2019-06-23 06:51:04 +0200, Christian Jullien wrote:
> > Yes, it's implementation defined, but I assume that -fsanitize=undefined 
> > warns only when the implementation has decided that this was incorrectly 
> > aligned.
> 
> It's nice to have this warning even if implementation supports incorrect 
> alignment. Suppose I provide a portable C library which will be compiled with 
> on different architectures. As developer, I want what has a high risk to hang 
> on machines I'm not even aware of.

The code may have #ifdef's or similar code to enable misaligned
accesses only when supported. In such a case, a warning would not
be useful, unless explicitly requested.

-- 
Vincent Lefèvre <address@hidden> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

_______________________________________________
Tinycc-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/tinycc-devel




reply via email to

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