bug-autoconf
[Top][All Lists]
Advanced

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

missing backslash escaping in AC_TRY_EVAL yields binary data in config.l


From: Vincent Lefevre
Subject: missing backslash escaping in AC_TRY_EVAL yields binary data in config.log with dash
Date: Tue, 2 Oct 2018 11:22:50 +0200
User-agent: Mutt/1.10.1+101 (b181996c) vl-108074 (2018-09-27)

I originally reported this bug in libtool:

  https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21309

but this actually seems to be a bug in AC_TRY_EVAL (or another macro
it uses).

Under Debian/unstable, with autoconf 2.69, I get binary data in the
config.log for MPFR due to \1 and \2 in echo strings (POSIX says
"if any of the operands contain a <backslash> character, the results
are implementation-defined.", thus dash is not broken here).

When doing "sh -x ./configure" (-x to get a trace), I get:

[...]
+ nlist=conftest.nm
+ eval echo "$as_me":7267: "/usr/bin/nm -B conftest.o \| sed -n -e 's/^.*[ 
]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | 
sed '/ __gnu_lto/d' \> conftest.nm"
+ echo configure:7267: /usr/bin/nm -B conftest.o \| sed -n -e 's/^.*[ 
]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2 \2/p' | 
sed '/ __gnu_lto/d' \> conftest.nm
[...]

In libtool.m4, this comes from:

    nlist=conftest.nm
    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> 
$nlist) && test -s "$nlist"; then

the buggy output being done by AC_TRY_EVAL.

-- 
Vincent Lefèvre <address@hidden> - 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)



reply via email to

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