bug-libtool
[Top][All Lists]
Advanced

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

bug#18458: Wrapper binary (.libs/lt-PROG.c) corrupts wide character argu


From: Pavel Raiskup
Subject: bug#18458: Wrapper binary (.libs/lt-PROG.c) corrupts wide character arguments
Date: Fri, 12 Sep 2014 10:25:52 +0200
User-agent: KMail/4.13.3 (Linux/3.15.10-201.fc20.x86_64; KDE/4.13.3; x86_64; ; )

Hello,

recently I got a bug report in Fedora:
https://bugzilla.redhat.com/show_bug.cgi?id=1124436
Short summary:  On windows, the 'argv' in main() function is filled
by "preprocessed" content.  When `./wrapper.exe I ♥ lt`, the argv gets
filled by ["./wrapper.exe", "I", "?", "lt"].  Libtool wrapper parses this
argv[] content and based on this broken arguments it spawns the original
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 fix
and whether there is somebody interested in patch-review.  Secondly, TBH,
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 be
glad to do the review and testing.

Thanks for ideas!
Pavel






reply via email to

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