Article 6C04J Malcolm: Improvements to static analysis in the GCC 13 compiler

Malcolm: Improvements to static analysis in the GCC 13 compiler

by
corbet
from LWN.net on (#6C04J)
David Malcolm writesabout a number of new features that have been added to the staticanalyzer in the GCC 13 release.

The above example makes the common mistake with C-style strings offorgetting the null terminator when computing how much space toallocate for str.

GCC 13's -fanalyzer option now keeps track of the sizes ofdynamically allocated buffers, and for many cases it checks thesimulated memory reads and writes against the sizes of the relevantbuffers. With this new work it detects the above problem.

External Content
Source RSS or Atom Feed
Feed Location http://lwn.net/headlines/rss
Feed Title LWN.net
Feed Link https://lwn.net/
Reply 0 comments