GNU bug report logs - #18458
Wrapper binary (.libs/lt-PROG.c) corrupts wide character arguments

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: libtool; Reported by: Pavel Raiskup <praiskup@HIDDEN>; dated Fri, 12 Sep 2014 08:27:02 UTC; Maintainer for libtool is bug-libtool@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 12 Sep 2014 08:26:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 12 04:26:20 2014
Received: from localhost ([127.0.0.1]:38845 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1XSMBQ-0000VT-67
	for submit <at> debbugs.gnu.org; Fri, 12 Sep 2014 04:26:20 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51916)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <praiskup@HIDDEN>) id 1XSMBO-0000VL-8x
 for submit <at> debbugs.gnu.org; Fri, 12 Sep 2014 04:26:19 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <praiskup@HIDDEN>) id 1XSMBE-0006mR-To
 for submit <at> debbugs.gnu.org; Fri, 12 Sep 2014 04:26:17 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:34952)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <praiskup@HIDDEN>) id 1XSMBE-0006mN-Qf
 for submit <at> debbugs.gnu.org; Fri, 12 Sep 2014 04:26:08 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:53610)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <praiskup@HIDDEN>) id 1XSMB8-0001zW-Kr
 for bug-libtool@HIDDEN; Fri, 12 Sep 2014 04:26:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <praiskup@HIDDEN>) id 1XSMB2-0006lg-Gl
 for bug-libtool@HIDDEN; Fri, 12 Sep 2014 04:26:02 -0400
Received: from mx1.redhat.com ([209.132.183.28]:10461)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <praiskup@HIDDEN>) id 1XSMB2-0006lb-9b
 for bug-libtool@HIDDEN; Fri, 12 Sep 2014 04:25:56 -0400
Received: from int-mx11.intmail.prod.int.phx2.redhat.com
 (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24])
 by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8C8PrM6015504
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL)
 for <bug-libtool@HIDDEN>; Fri, 12 Sep 2014 04:25:54 -0400
Received: from nb.usersys.redhat.com (unused-4-133.brq.redhat.com
 [10.34.4.133])
 by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id
 s8C8PrTt017898
 for <bug-libtool@HIDDEN>; Fri, 12 Sep 2014 04:25:53 -0400
From: Pavel Raiskup <praiskup@HIDDEN>
To: bug-libtool@HIDDEN
Subject: Wrapper binary (.libs/lt-PROG.c) corrupts wide character arguments
Date: Fri, 12 Sep 2014 10:25:52 +0200
Message-ID: <1895523.UWpBuUkueD@HIDDEN>
User-Agent: KMail/4.13.3 (Linux/3.15.10-201.fc20.x86_64; KDE/4.13.3; x86_64; ;
 )
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="utf-8"
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

Hello,

recently I got a bug report in Fedora:
https://bugzilla.redhat.com/show_bug.cgi?id=3D1124436
Short summary:  On windows, the 'argv' in main() function is filled
by "preprocessed" content.  When `./wrapper.exe I =E2=99=A5 lt`, the ar=
gv gets
filled by ["./wrapper.exe", "I", "?", "lt"].  Libtool wrapper parses th=
is
argv[] content and based on this broken arguments it spawns the origina=
l
binary.  That way, original binary has different arguments and it
complicates testing, for example.

I tried to look at how it is done in the wrapper;  and I believe the
possible fix is non-trivial enough.  We need probably use the
GetcommandLineW and CommandLineToArgvW functions to obtain wide version=
 of
argv.  That way, however, after removing --lt* arguments, you need to
escape the wide argv same way as for non-wide version (and pass it into=

the _wspawnv call, instead of _spawnv).  I am not familiar with windows=

api, so if you see that there is simpler/better solution, please say.

Firstly, I would like to know whether upstream is interested in such fi=
x
and whether there is somebody interested in patch-review.  Secondly, TB=
H,
I'm not perfect example of guy to do such change (I could give it a try=
,
thought, through wine the problem seems to be reproducible).  If there =
was
somebody familiar with windows who wanted to write the patch, I would b=
e
glad to do the review and testing.

Thanks for ideas!
Pavel





Acknowledgement sent to Pavel Raiskup <praiskup@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-libtool@HIDDEN. Full text available.
Report forwarded to bug-libtool@HIDDEN:
bug#18458; Package libtool. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.