svn commit: r357732 - user/uqs/coverity

Ulrich Spoerlein uqs at FreeBSD.org
Mon Feb 10 16:15:35 UTC 2020


Author: uqs
Date: Mon Feb 10 16:15:34 2020
New Revision: 357732
URL: https://svnweb.freebsd.org/changeset/base/357732

Log:
  ... and delete the model, because we currently no longer use it.
  
  Coverity apparently got smarter over time and will produce fewer false
  positives around kernel malloc when this model is *not* in use.

Modified:
  user/uqs/coverity/model.c

Modified: user/uqs/coverity/model.c
==============================================================================
--- user/uqs/coverity/model.c	Mon Feb 10 16:14:07 2020	(r357731)
+++ user/uqs/coverity/model.c	Mon Feb 10 16:15:34 2020	(r357732)
@@ -6,30 +6,5 @@
  * upload it via https://scan.coverity.com/projects/freebsd?tab=analysis_settings
  */
 
-/* From <sys/malloc.h>. */
-#define M_WAITOK 0x0002
 
-/*
- * If M_WAIT_OK is set, malloc() will always return something meaningful.
- */
-void *
-malloc(unsigned long size, struct malloc_type *mtp, int flags)
-{
-	int has_memory;
-
-	__coverity_negative_sink__(size);
-
-	if (flags & M_WAITOK || has_memory)
-		return __coverity_alloc__(size);
-
-	return 0;
-}
-
-/*
- * Don't complain about leaking FDs in unit tests.
- */
-static void
-leak(int fd)
-{
-	__coverity_close__(fd);
-}
+// Currently no special model is in use.


More information about the svn-src-user mailing list