[Top][All Lists]

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

Re: [Tinycc-devel] undefined sanitizer

From: Vincent Lefevre
Subject: Re: [Tinycc-devel] undefined sanitizer
Date: Sun, 23 Jun 2019 12:42:26 +0200
User-agent: Mutt/1.12.1+33 (6a74e24e) vl-117499 (2019-06-23)

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)

reply via email to

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