[PATCH][4.3] Deprecate -ftrapv

Frank Ch. Eigler fche@redhat.com
Sun Mar 2 14:24:00 GMT 2008


Mark Mitchell <mark@codesourcery.com> writes:

> [...]  You seem to be focusing on making -ftrapv capture 100% of
> overflows, so that people could depend on their programs crashing if
> they had an overflow.  That might be useful in two circumstances:
> (a) getting bugs out (though for an example like the one above, I
> can well imagine many people not considering that a bug worth
> fixing), and (b) in safety-critical situations where it's better to
> die than do the wrong thing.

Are you including in "safety-critical" all the security-related
software, where signed-overflow is a popular exploit?  If so, you are
undervaluing the "better to die than do the wrong thing" principle.
(This has come up several times here in the past, but not recently
AFAICT.)

- FChE



More information about the Gcc-patches mailing list