Powered by Linux
min/max() changes — Semantic Matching Tool

min/max() changes

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

 



The kernel recently redefined min/max() and that triggered some issues
in Smatch.  So far I've noticed three bugs:

1) The kernel stopped building.  That should be fixed.  I have built all
   the files which failed for me last night, but I haven't done a
   complete rebuild yet.  I pushed my changes with very little testing
   because I figured that it can't be worse than not building at all.
   Hopefully, it's working.  I'm travelling this weekend so I might not
   be able to look at this again until Tuesday.

2) I get some weird precedence issues where Smatch is taking code like:
   "(a == b) == (c == d)" and changing it to "*a == b == *c == d".
   I don't even know how that's happening and how does Smatch think
   we're dereferencing integers?  I'm still working on this.

3) Smatch is not tracking comparisons between variables correctly now.
   I have not investigated what's happening with this.

4) Smatch thinks functions are dereferencing parameters when they are
   not.  Code like "foo = min(param ? param->bar : xxx, yyy);"  The
   "param" variable isn't dereferenced without checking.

Let me know if you run into any build issues or if you notice any other
bugs.

regards,
dan carpenter




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

  Powered by Linux