Powered by Linux
Re: smatch "unreachable code" — Semantic Matching Tool

Re: smatch "unreachable code"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2013-12-19 at 11:38 +0300, Dan Carpenter wrote:
> On Thu, Dec 19, 2013 at 09:15:23AM +0100, Johannes Berg wrote:
> > > Also even for the --spammy output, I changed the code so it doesn't
> > > warn about unreachable break statements and empty statements like
> > > "return ;;".
> > 
> > Heh, ok. FWIW, the latter does trigger coverity and klocwork, I believe
> > (we use the latter internally).
> > 
> 
> Coccinelle can find those and generate patches as well so it's pointless
> to try compete.  :P

True :)


> >                 temp = kmemdup(file_sec->data, section_size,
...
> > It looks like smatch is missing the memory leak here, but I don't know
> > how well the memory leak detection code really works anyway.
> 
> The leak detection code is only looking at kmalloc() and kzalloc()...
> 
> The whole thing probably needs to be re-written.

Fair enough, I don't actually care all that much - such bugs seem to be
rare anyway :)

johannes

--
To unsubscribe from this list: send the line "unsubscribe smatch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux