[cfe-commits] [cfe-dev] How to fix null-deref-ps.c on FreeBSD?

Ben Laurie benl at google.com
Tue Feb 17 09:49:16 PST 2009

On Tue, Feb 17, 2009 at 5:43 PM, Ted Kremenek <kremenek at apple.com> wrote:
> On Feb 17, 2009, at 9:37 AM, Ben Laurie wrote:
> On Tue, Feb 17, 2009 at 4:45 PM, Ted Kremenek <kremenek at apple.com> wrote:
> Hi Ben,
> The analyzer knows that all functions with the 'noreturn' attribute don't
> return.  What does the assert macro expand to on FreeBSD?
> The problem is that __assert does not have noreturn set on FreeBSD.
> I'm in the process of getting that fixed - but as an apprentice
> FreeBSD committer that's probably harder for me than anyone else, so
> it may take a while :-)
> In the meantime, I think the right answer is for me to patch
> /usr/include/assert.h.
> __assert isn't the only "panic" function that isn't marked with noreturn.
>  Since it occurs so frequently, I can just add it to the list of hard-coded
> functions that the analyzer knows about.

I wondered if such a thing existed. Where is it?

>  That will also make the analyzer
> more applicable to earlier versions of FreeBSD (should you want to see how
> far a bug goes back, for example).

More information about the cfe-commits mailing list