Quantcast

Bug in autogenerated 'autoscan' Perl script

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Bug in autogenerated 'autoscan' Perl script

Ken Cotterill
   I encountered a bug in the autogenerated 'autoconf-2.69/bin/autoscan'
   script which caused 'make check' to fail on test 503.
   The statement causing the problem is:
   s/\${[^\}]*}//g;
   which was at line 361 in my version.
   The diagnostic message was:
   "Unescaped left brace in regex is deprecated, ..."
   You can search [1]perldiag for that string (without the "...") to see
   the full message and its explanation.
   That deprecation was intoduced in v5.22: "[2]perl5220delta: A literal
   "{" should now be escaped in a pattern".
   Furthermore, the right brace in the character class does not need to be
   escaped. See "[3]perlrecharclass: Special Characters Inside a Bracketed
   Character Class".
   So, that problem line would be better as:
   s/\$\{[^}]*}//g;
   I did a quick test to demonstrate those points:
   $ perl -v | head -2 | tail -1
   This is perl 5, version 24, subversion 0 (v5.24.0) built for
   darwin-thread-multi-2level
   $ perl -E 'say q/a${b}c/ =~ s/\${[^\}]*}//r'
   Unescaped left brace in regex is deprecated, passed through in regex;
   marked by <-- HERE in m/\${ <-- HERE [^\}]*}/ at -e line 1.
   ac
   $ perl -E 'say q/a${b}c/ =~ s/\$\{[^}]*}//r'
   ac
   I edited my version of the 'autoscan' script manually; reran 'make
   check'; it completed without further problems.
   Cheers,
   Ken.

References

   1. http://perldoc.perl.org/perldiag.html
   2. http://perldoc.perl.org/perl5220delta.html#A-literal-%22%7b%22-should-now-be-escaped-in-a-pattern
   3. http://perldoc.perl.org/perlrecharclass.html#Special-Characters-Inside-a-Bracketed-Character-Class
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Bug in autogenerated 'autoscan' Perl script

Eric Blake-3
On 12/12/2016 12:07 AM, Ken Cotterill wrote:
>    I encountered a bug in the autogenerated 'autoconf-2.69/bin/autoscan'
>    script which caused 'make check' to fail on test 503.
>    The statement causing the problem is:
>    s/\${[^\}]*}//g;
>    which was at line 361 in my version.

Thanks; I'll get that patched before autoconf 2.70 (which I hope to
release this year).

--
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


signature.asc (617 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Bug in autogenerated 'autoscan' Perl script

Eric Blake-3
On 12/21/2016 08:36 AM, Eric Blake wrote:
> On 12/12/2016 12:07 AM, Ken Cotterill wrote:
>>    I encountered a bug in the autogenerated 'autoconf-2.69/bin/autoscan'
>>    script which caused 'make check' to fail on test 503.
>>    The statement causing the problem is:
>>    s/\${[^\}]*}//g;
>>    which was at line 361 in my version.
>
> Thanks; I'll get that patched before autoconf 2.70 (which I hope to
> release this year).

In fact, the patch is already applied, and we are just waiting on the
release:

http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=e5654

--
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


signature.asc (617 bytes) Download Attachment
Loading...