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

Ben Laurie benl at google.com
Tue Feb 17 07:08:09 PST 2009

This test fails on FreeBSD, and the following patch fixes it:

Index: test/Analysis/null-deref-ps.c
--- test/Analysis/null-deref-ps.c       (revision 64762)
+++ test/Analysis/null-deref-ps.c       (working copy)
@@ -129,6 +129,8 @@

 int* qux();

+void __assert(const char *, const char *, int, const char *)
 int f9(unsigned len) {
   assert (len != 0);
   int *p = 0;

the problem being, of course, that the analyzer has to understand that
a failed assert does not return...

But how would I go about fixing this properly?

More information about the cfe-commits mailing list