GCC Undefined Behavior Sanitizer

Paulo Pinto via Digitalmars-d digitalmars-d at puremagic.com
Fri Oct 17 01:38:11 PDT 2014


On Thursday, 16 October 2014 at 21:00:18 UTC, bearophile wrote:
> Just found with Reddit. C seems one step ahead of D with this:
>
> http://developerblog.redhat.com/2014/10/16/gcc-undefined-behavior-sanitizer-ubsan/
>
> Bye,
> bearophile

The sad thing about this tools is that they are all about fixing 
the holes introduced by C into the wild.

So in the end when using C and C++, we need to have compiler + 
static analyzer + sanitizers, in a real life example of "Worse is 
Better", instead of fixing the languages.

At least, C++ is on the path of having less undefined behaviors, 
as the work group clearly saw the benefits don't outweigh the 
costs and is now the process of cleaning the standard in that 
regard.

As an outsider, I think D would be better by having only defined 
behaviors.

--
Paulo


More information about the Digitalmars-d mailing list