[Bug bootstrap/81397] New: mistakes in .opt files not detected
msebor at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jul 11 14:54:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81397
Bug ID: 81397
Summary: mistakes in .opt files not detected
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: bootstrap
Assignee: unassigned at gcc dot gnu.org
Reporter: msebor at gcc dot gnu.org
Target Milestone: ---
As discussed in the thread below, the option processing scripts accept option
attributes with out-of-bounds or otherwise invalid parameters that are then
rejected (or not processed correctly) at runtime, leading to subtle and not so
subtle bugs that are easy to miss if not exercised during testing. Even when
they are caught during testing, detecting and flagging them earlier in the
process (i.e., when the script runs) would be better.
An example of one such problem (discussed in the thread below) is the
Init(value) attribute which requires that the open parenthesis not be separated
by a space from Init. If there is a space it's accepted but not handled
correctly.
Another example (also discussed there) is setting the initial value of an
option in a LangEnabledBy() attribute to a value that's outside the range
specified for the option by the IntegerRange() attribute.
There are other, more subtle problems that can even lead to GCC crashing at
runtime. Better error checking would also help prevent those.
https://gcc.gnu.org/ml/gcc-patches/2017-07/msg00469.html
More information about the Gcc-bugs
mailing list