This is the mail archive of the
mailing list for the GCC project.
Re: [RFC] Isolate & simplify paths with undefined behaviour
- From: Jeff Law <law at redhat dot com>
- To: Florian Weimer <fweimer at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 23 Oct 2013 07:33:01 -0600
- Subject: Re: [RFC] Isolate & simplify paths with undefined behaviour
- Authentication-results: sourceware.org; auth=none
- References: <52616BFC dot 6010205 at redhat dot com> <alpine dot DEB dot 2 dot 10 dot 1310182019300 dot 4203 at laptop-mg dot saclay dot inria dot fr> <52618D60 dot 9090101 at redhat dot com> <alpine dot DEB dot 2 dot 10 dot 1310182151270 dot 4203 at laptop-mg dot saclay dot inria dot fr> <5266CB40 dot 9000604 at redhat dot com> <526781B8 dot 2030009 at redhat dot com>
On 10/23/13 01:58, Florian Weimer wrote:
There's a lot of overlap between this and the change which originally
set me down this path -- namely a pass which would warn about potential
null pointer dereference (with suitable knobs which allowed the user to
control things like the non-nullness of a load of a pointer from memory).
Could you keep in mind that there is considerable interest in a
check_nonnull attribute which marks values (parameters, return values,
maybe even struct fields) that can be NULL and need to be checked
explictly prior to dereference? GCC would then warn if there is a path
on which the check is missing.
I don't have time at the moment to work on this, but it's on my
ever-growing TODO list. :)
I'd like to get back to that work, but it's definitely not a 4.9 thing.