Bugzilla – Bug 240922
Enable "array subscript is above array bounds" gcc warnings?
Last modified: 2008-10-27 23:08:29 UTC
I wonder whether we should we enable "array subscript is above array bounds" gcc warnings (RPM_OPT_FLAGS) and even trigger a fatal build error? I think we could safe David's resources (rebuilding each package and filing bugreports) and Novell's resources (bugreport handling) as well.
*** Bug 240890 has been marked as a duplicate of this bug. ***
*** Bug 240891 has been marked as a duplicate of this bug. ***
*** Bug 240893 has been marked as a duplicate of this bug. ***
*** Bug 240894 has been marked as a duplicate of this bug. ***
*** Bug 240898 has been marked as a duplicate of this bug. ***
We're planning this, lets just give it time to see if we have false positives with the warning (one is known already) and then we'll patch it in. it is in -Wall anyway.
*** Bug 240901 has been marked as a duplicate of this bug. ***
*** Bug 239170 has been marked as a duplicate of this bug. ***
*** Bug 239491 has been marked as a duplicate of this bug. ***
*** Bug 239954 has been marked as a duplicate of this bug. ***
there are several valid fixes, but also quite some false positives (well, not actually false positives, but code written in a way where the array overflow will just "work"). currently this can't be enabled unconditionally.
*** Bug 242365 has been marked as a duplicate of this bug. ***
*** Bug 242268 has been marked as a duplicate of this bug. ***
*** Bug 242363 has been marked as a duplicate of this bug. ***
*** Bug 240197 has been marked as a duplicate of this bug. ***
*** Bug 245534 has been marked as a duplicate of this bug. ***
*** Bug 245535 has been marked as a duplicate of this bug. ***
*** Bug 239956 has been marked as a duplicate of this bug. ***
*** Bug 239174 has been marked as a duplicate of this bug. ***
*** Bug 239958 has been marked as a duplicate of this bug. ***
Egbert, JFYI. Since Matthias or me is in Cc of this bugreport or the reported itself, it might be interesting for you as well.
JFYI, Matthias. This is a bugreport, which is assigned to Egbert/me or with Egbert/me in CC or reported by Egbert/me.
at least gcc42 in autobuild is generating them. $ cd ~meissner/xx $ grep array.subscript Logfile.*|wc -l 1743 $ quite some matches (some false positives though I think).
needs occasional review, but nothing we can do right now
submitted a post-build-checks with this as "W"arning detection.