On 2014-04-14 13:11:12 +0200, Jakub Wilk wrote:
> * Vincent Lefevre <vinc...@vinc17.net>, 2014-04-14, 12:56:
> >IMHO, in general, for security, it is better to run code with a sanitizer
> >(such as "clang -fsanitize=undefined -fno-sanitize-recover", assuming that
> >the code does not use floating point),
> 
> gcc has also -ftrapv, which might be what you want.

But it it just supports +, - and *, and has various bugs and
limitations:

  http://gcc.gnu.org/bugzilla/buglist.cgi?quicksearch=trapv&list_id=87725

clang's sanitizer covers much more operations.

-- 
Vincent Lefèvre <vinc...@vinc17.net> - 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)


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140414120408.gc5...@ypig.lip.ens-lyon.fr

Reply via email to