develooper Front page | perl.perl5.porters | Postings from December 2018

Re: regexec.c: LGTM analysis warns about two comparisons, butweactually need them

Thread Previous | Thread Next
Karl Williamson
December 6, 2018 19:54
Re: regexec.c: LGTM analysis warns about two comparisons, butweactually need them
Message ID:
On 12/6/18 6:30 AM, Dominic Hargreaves wrote:
> On Thu, Dec 06, 2018 at 08:20:50AM -0500, James E Keenan wrote:
>> On 12/6/18 3:16 AM, Tony Cook wrote:
>>> On Wed, Dec 05, 2018 at 10:28:54PM -0500, James E Keenan wrote:
>>>> Here is a case where the analysis of the Perl 5 source code
>>>> produces results that are at first plausible but ultimately incorrect.
>>>> The following section of regexec.c is cited (
>>>> with the warning-level alert "Comparison result is always the same":
>>> This was discussed in #133686, the comparison needs to stay to allow
>>> for local configuration of larger values of NUM_ANYOF_CODE_POINTS.
>> Would it be okay if I inserted a comment to that effect into regexec.c so
>> that we don't stumble upon this again in the future?

I have pushed a branch with this commit that changes those numbers to 
symbols to make things clear
> That sounds sensible to me regardless of systems like LGTM. You *could*
> even use the LGTM suppression syntax (in addition to a human-readable
> explanation); this would mean that if in the future we can implement
> /* */ suppression comments in LGTM, they would be recognised.
> You can watch this topic for more updates on that feature request:
> In case you weren't aware, if you think that a certain type of alert
> will *never* be interesting for a given code-base you can disable it
> entirely in .lgtm.yml:
> Cheers,
> Dominic.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About