[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21309: libtool generates binary data in config.log due to buggy esca
From: |
Vincent Lefevre |
Subject: |
bug#21309: libtool generates binary data in config.log due to buggy escaping |
Date: |
Mon, 8 Feb 2016 17:44:39 +0100 |
User-agent: |
Mutt/1.5.24-6554-vl-r83103 (2016-01-26) |
I actually get these binary data with dash (when setting
CONFIG_SHELL=/bin/sh in my environment, where /bin/sh is dash).
On 2015-08-20 03:56:02 +0200, Vincent Lefevre wrote:
> The generated "libtool" script contains:
>
> global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[
> ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p' | sed '/
> __gnu_lto/d'"
>
> So, I suppose that the binary data come from the \\1 and \\2.
The problem is that it yields, for instance:
+ echo configure:10030: /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
With bash:
$ echo '\1' | hd
00000000 5c 31 0a |\1.|
00000003
With dash:
$ echo '\1' | hd
00000000 01 0a |..|
00000002
POSIX[*] says:
if any of the operands contain a <backslash> character, the results
are implementation-defined.
So, the above code is not portable.
[*] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/echo.html
--
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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#21309: libtool generates binary data in config.log due to buggy escaping,
Vincent Lefevre <=