[zfs-discuss] Clang static analyze of zfs code

Richard Yao ryao at cs.stonybrook.edu
Tue May 1 08:29:14 EDT 2012

On 05/01/12 07:27, Marcin Mirosław wrote:
> I've made new analyze with fresh clang and fresh zfs sources:
> http://mejor.pl/zfs-710114089/
> I noticed new kind of error "memory leak", unfortunately i have no C
> skills to verify it.
> Regards,
> Marcin

I looked at the first memory leak report and I can confirm that Clang's
report is correct. The reported leaks are in userland programs. Those
programs (usually) do not run very long, so memory leaks in them are
minor issues.

On the other hand, Clang is reporting "Dereference of null pointer" in
kernel code, which are far more serious. For instance, the following
issue that Clang highlighted shows that ARC can do a null pointer
dereference if a memory allocation fails, which would result in a kernel


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL: <http://list.zfsonlinux.org/pipermail/zfs-discuss/attachments/20120501/3a7dc13c/attachment.sig>

More information about the zfs-discuss mailing list