[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: missing backslash escaping in AC_TRY_EVAL yields binary data in conf
Re: missing backslash escaping in AC_TRY_EVAL yields binary data in config.log with dash
Tue, 2 Oct 2018 09:31:33 -0400
On 10/2/18, Vincent Lefevre <address@hidden> wrote:
> I originally reported this bug in libtool:
> but this actually seems to be a bug in AC_TRY_EVAL (or another macro
> it uses).
AC_TRY_EVAL is not documented in the Autoconf manual.
Drilling into the Autoconf source, we find that this is intentional:
# The AC_TRY_EVAL and AC_TRY_COMMAND macros are dangerous and
# undocumented, and should not be used.
# They may be removed or their API changed in a future release.
# Autoconf itself no longer uses these two macros; they are present
# only for backward compatibility with previous versions of Autoconf.
# Not every shell command will work due to problems with eval
# and quoting, and the rules for exactly what does work are tricky.
# Worse, due to double-expansion during evaluation, arbitrary unintended
# shell commands could be executed in some situations.
If libtool is still using this macro, and it is causing problems,
then this does seem like a bug in libtool. The solution would seem
to be for libtool to stop using AC_TRY_EVAL.