[Bug analyzer/106595] New: False positive Wanalyzer-out-of-bounds warnings in yacc generated files
tlange at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Aug 12 12:46:15 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106595
Bug ID: 106595
Summary: False positive Wanalyzer-out-of-bounds warnings in
yacc generated files
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: analyzer
Assignee: dmalcolm at gcc dot gnu.org
Reporter: tlange at gcc dot gnu.org
Target Milestone: ---
Created attachment 53445
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53445&action=edit
reduced httpd log with Wanalyzer-out-of-bounds false positives
The out-of-bounds checker emits some false-positives related to negative
offsets on the 'yyvsa' variable, also called 'semantic value stack'. The
analyzer isn't able to infer that the stack always has enough elements. An
exemplary log from building httpd is attached to this report.
David & I decided to leave it as is for now and merge the checker. Dependent on
how often the false-positives occur, we might auto-disable the warning on code
that looks like yacc generated code.
More information about the Gcc-bugs
mailing list