https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108689

            Bug ID: 108689
           Summary: RFE: more precise handling of "fread"-style functions
                    in -fanalyzer
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: analyzer
          Assignee: dmalcolm at gcc dot gnu.org
          Reporter: dmalcolm at gcc dot gnu.org
  Target Milestone: ---

We currently handle calls to "fread" (in sm-file.cc's class kf_fread) by
assuming that any call to fread fully clobbers the memory region pointed to.

This misses cases where e.g. the code doesn't check that the read succeeded, or
that the sizes are wrong.

We should probably bifurcate the analysis to cover:
- errors
- full read
- partial read

or somesuch.

(and do the same for "read").
  • [Bug analyzer/108689] New: RFE:... dmalcolm at gcc dot gnu.org via Gcc-bugs

Reply via email to