Subject: bug#21309: closed (Re: bug#21309: libtool generates binary data in config.log due to buggy escaping)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 18 Oct 2024 14:53:02 +0000

Your bug report

#21309: libtool should not use the dangerous, undocumented AC_TRY_EVAL macro, currently broken

which was filed against the libtool package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
21309: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21309
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#21309: libtool generates binary data in config.log due to buggy escaping
From: Ileana Dumitrescu <[email-masked]>
To: [email-masked]
Cc: Vincent Lefevre <[email-masked]>
Date: Fri, 18 Oct 2024 17:50:35 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

Thank you (again :) for the bug report and patch!

The fix you provided has been applied to the development branch:
https://git.savannah.gnu.org/cgit/libtool.git/commit/?h=development&id=f7d11c71dbf23b6a7bc8a273782d3aa3dab08b23

-- 
Ileana Dumitrescu

GPG Public Key: FA26 CA78 4BE1 8892 7F22 B99F 6570 EA01 146F 7354

Subject: libtool generates binary data in config.log due to buggy escaping
From: Vincent Lefevre <[email-masked]>
To: [email-masked]
Date: Thu, 20 Aug 2015 03:56:02 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

I've reported the following bug in the Debian BTS:

  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=796180

but I can reproduce it with the official libtool 2.4.6.

When I run "./configure" with MPFR, the generated config.log file
contains binary data:

configure:9458: /usr/bin/nm -B conftest.o \| sed -n -e 's/^.*[ ]\([ABCDGIRSTW][ABCDGIRSTW]*\)[ ][ ]*\([_A-Za-z][_A-Za-z0-9]*\)$/^A ^B ^B/p' | sed '/ __gnu_lto/d' \> conftest.nm

where ^A and ^B are the ASCII characters of code 1 and 2 respectively.
Thus, the "file" utility thinks that this is a binary file, so that
"less" + "lesspipe" mangles the file. Rather annoying!

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.

-- 
Vincent Lefèvre <[email-masked]> - 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)