autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fewer forks in AC_DEFINE


From: Eric Blake
Subject: Re: fewer forks in AC_DEFINE
Date: Thu, 20 Nov 2008 13:19:56 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.18) Gecko/20081105 Thunderbird/2.0.0.18 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Ralf Wildenhues on 11/20/2008 11:47 AM:
> What if there are already too many '('?  Will it loop endlessly and fill
> RAM with more '('?

In that case, argument collection for _m4_expand will consume text beyond
the m4_expand(foo) that sparked the extra '(', and you will likely end up
consuming all input until you get a cryptic "_m4_expand_: end of file in
argument list" message, and containing the line number where the m4_expand
started (if your m4 is >= 1.4.6).  But it doesn't infloop, and probably
won't run out of memory (depending on how much input there is left to
consume).  Thankfully, unbalanced '(' are somewhat more rare, especially
in shell code ;)

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkklxmwACgkQ84KuGfSFAYDkFACdHJxhUla314biT/QfHTtCl+aL
q6AAniansZgzu54Ok9vh0suFNuBvzpcA
=WwMX
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]