bug#21309: libtool generates binary data in config.log due to buggy escaping

Vincent Lefevre <[email protected]>
Newsgroups gmane.comp.gnu.libtool.bugs
Message-ID <[email protected]>
retitle 21309 libtool should not use the dangerous, undocumented AC_TRY_EVAL macro, currently broken
thanks

On 2018-10-02 11:12:52 +0200, Vincent Lefevre wrote:
> In libtool.m4, this corresponds to:
> 
>     nlist=conftest.nm
>     if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
> 
> Thus the problem seems to come from AC_TRY_EVAL, i.e. an autoconf bug.

I've seen in the autoconf source that AC_TRY_EVAL should not be used:

# AC_TRY_EVAL(VARIABLE)
# ---------------------
# Evaluate $VARIABLE, which should be a valid shell command.
# The purpose of this macro is to write "configure:123: command line"
# into config.log for every test run.
#
# 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.

-- 
Vincent Lefèvre <[email protected]> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.