[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fix make check for outfashioned m4
From: |
Eric Blake |
Subject: |
Re: Fix make check for outfashioned m4 |
Date: |
Fri, 08 Sep 2006 07:19:16 -0600 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.5) Gecko/20060719 Thunderbird/1.5.0.5 Mnenhy/0.7.4.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Stepan Kasal on 9/8/2006 6:43 AM:
> Hello,
> the testsuite stumbled over my M4 1.4.3. I enhanced the
> reformatting in tests/local.at to fix that.
> When I was there, I updated the comment and added the missing
> explanation for s/ E[A-Z]*$//
>
> OK to commit?
Comments below.
>
> [I seem to recall a reasoning that this behaviour is half-wanted:
> it might make people to upgrade their m4. Well, feel free to add
> a warning to configure then.]
Every version of M4 prior to the (as-yet-unreleased) 1.4.7 has known input
sequences that will cause a core dump. And if you are unlucky enough to
be on a platform without ecvt(), M4 1.4.4 and earlier allow arbitrary code
execution via a stack overflow exploit. Maybe a configure warning is a
good idea. I'll let Paul weigh in on whether allowing older versions in
the test suite is a good idea.
> # AT_CHECK_M4(COMMAND, [EXIT-STATUS = 0], STDOUT, STDERR)
> # -------------------------------------------------------
> -# If stderr is specified, normalize the observed stderr. E.g. (GNU M4 1.5):
> +# If stderr is specified, normalize the observed stderr. E.g. (GNU M4 2.0):
> #
> -# /usr/local/bin/m4: script.4s: 1: Cannot open foo: No such file or
> directory
> +# /usr/local/bin/m4: script.4s: 1: cannot open `foo': No such file or
> directory
Actually, 1.4.6 and later (including the eventual 2.0) output the location as:
/usr/local/bin/m4:script.4s:1: cannot...
> # autom4te: /usr/local/bin/m4 failed with exit status: 1
> #
> # or (using gm4 as GNU M4 1.4):
> @@ -73,30 +73,42 @@
> # script.4s:1: /usr/local/bin/gm4: Cannot open foo: No such file or
> directory
> # autom4te: /usr/local/bin/gm4 failed with exit status: 1
> #
> +# or (using GNU M$ 1.4.6):
> +# /usr/local/bin/m4:script.4s:1: cannot open `foo': No such file or
> directory
> +#
> # becomes
> #
> -# m4: script.4s: 1: Cannot open foo: No such file or directory
> +# m4: script.4s: 1: cannot open `foo': No such file or directory
> # autom4te: m4 failed with exit status: 1
> #
> # We use the following sed patterns:
> #
> -# (file): (line): (m4):
> -# or (m4): (file): (line):
> +# (m4): (file): (line):
> +# or (file): (line): (m4):
So a better comment would be:
(file): (line): (m4):
or (m4): ?(file): ?(line):
> +[AT_CHECK([[sed 's/^[^:]*m4: *\([^:]*\): *\([0-9][0-9]*\): /m4: \1: \2: /
GNU Coding standards would recommend /m4:\1:\2: / in the end of that
replacement, although making that change would have a ripple effect on
other locations in the testsuite.
> + s/^\([^:]*\): *\([0-9][0-9]*\): *[^:]*m4: /m4: \1: \2: /
> + s/^\(m4: [^:]*: *[0-9][0-9]*: \)C\(annot open
> \)\([^`:]*\):/\1c\2`\3'\'':/
> + s/^autom4te: [^ ]*m4 /autom4te: m4 /
> + s/^autom4te: [^ ]*m4\.exe /autom4te: m4 /
> + s/ (E[A-Z]*)$//
> + ' stderr]], [0],[$4])])
> ])
>
> # AT_CHECK_AUTOM4TE(FLAGS, [EXIT-STATUS = 0], STDOUT, STDERR)
- --
Life is short - so eat dessert first!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFAW3T84KuGfSFAYARAkc9AKCz44+/UQpOEyZNFjImZsok2yd6lgCcDBZ/
TlYBgRNzLUxkKX4tzQOnSHk=
=OvFE
-----END PGP SIGNATURE-----