[sr #111191] libtool mistakes a directory as an executable
Takashi Yano <[email protected]> Wed, 19 Feb 2025 18:37:31 -0500 (EST)
| Newsgroups | gmane.comp.gnu.libtool.general |
|---|---|
| Message-ID | <[email protected]> |
URL:
<https://savannah.gnu.org/support/?111191>
Summary: libtool mistakes a directory as an executable
Group: GNU Libtool
Submitter: tyan0
Submitted: Wed 19 Feb 2025 11:37:27 PM UTC
Category: None
Priority: 5 - Normal
Severity: 3 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Operating System: Microsoft Windows
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Wed 19 Feb 2025 11:37:27 PM UTC By: Takashi Yano <tyan0>
In cygwin mailing list, the maintainer of gdbm package reported test suite
failure in that package.
https://cygwin.com/pipermail/cygwin/2025-February/257349.html
I looked into this issue, and found the root cause is in libtool.
https://cygwin.com/pipermail/cygwin/2025-February/257416.html
A simple test case (reproducer.sh) is attached.
The expected output of the test case is:
Hello 1
Hello 2
However, with cygwin libtool, the output is:
Hello 1
127
This is caused because find_executable() returns the directory whose name is
the same as the target executable if it appears earlier in the environment
PATH. This issue arises from a bug in check_executable() that returns 1 for
the directory.
The patch (check-executable.patch) to fix this issue is attached. I confirmed
that both the test case attached, and gdbm test suite work as expected with
this patch.
This issue does not occur in Linux because these functions are not used for
some reason. I'm not sure what is the difference in cygwin and Linux.
Thanks in advance.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Name: reproducer.sh Size: 399B
<https://file.savannah.gnu.org/file/reproducer.sh?file_id=56928>
-------------------------------------------------------
Name: check-executable.patch Size: 429B
<https://file.savannah.gnu.org/file/check-executable.patch?file_id=56929>
AGPL NOTICE
These attachments are served by Savane. You can download the corresponding
source code of Savane at
https://savannah.gnu.org/source/savane-513955078e56c124c506c834d031bbe09cbf4040.tar.gz
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/support/?111191>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
(application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCZ7ZrOwAKCRCqLAuaBUf3 TnQuAQDJIChv7X2SniVRE5IZOlPXX8q4F5Z087Ic8P3kol/YiAD9HHFcQr4AR6XV 4eKDrNKsC0kqcWRiIkk7vNARF9E97w8= =ouSN -----END PGP SIGNATURE-----