This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add a character size parameter to c_strlen/get_range_strlen


Standard procedure in this kind of situation where we have two patches
that are handling the same issue is to bake them off and choose one
based on the technical merits.  To that end...

It would be helpful if you could compare/contrast your patch to Bernd's.
 ie, are there cases that will be handled by one patch better than the
other.  Are there any implementation details that favor one patch over
the other.

I don't insist on any particular solution as long as it fixes
the bug and makes diagnosing the unterminated arrays possible.

I have put several days of effort now to make sure the patch
series does both well.  The bug fix alone adds over 200 lines
of test code (and changes 226 LOC of GCC code).  The missing
nul detection tests add another 1,150.  To make the detection
possible even for braced-list initialized constant arrays, I
have already committed an independent enhancement to transform
those into STRING_CSTs.  The extensive testing exposed a number
of missed optimization and warning opportunities: PR 86955,
86937, 86936, and 86919.  I will look into addressing those
at some point in the future.

I read the feedback I got and incorporated what made sense to
me into the most recent update.  To avoid escalation I won't
respond anymore to deliberately provocative comments or
personal attacks.

The patches proposed here just fix the bug without making any
attempt to enable diagnosing the missing nuls.  To make it
possible many further changes will be necessary (most of mine
or similar), including undoing some of the changes proposed
here.  I see that as the biggest problem and a waste of effort
that is only to the detriment of the project.

Besides the absence of support to detect the missing nuls and
the gratuitously disabled tests, there are changes in these
patches that don't seem necessary and that certainly aren't
exercised by the paltry 13 lines of test code they add for
the 170 changed lines of GCC code.

Martin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]