* Failed to configure Guile due to dirty iConvert
@ 2019-05-14 0:44 Jeffrey Walton
2019-05-14 5:45 ` Mark H Weaver
0 siblings, 1 reply; 2+ messages in thread
From: Jeffrey Walton @ 2019-05-14 0:44 UTC (permalink / raw)
To: guile-devel
Hi Everyone,
I'm attempting to test GnuTLS using Asan. All dependent libraries need
to be built with Asan, too. That caught Guile in the net.
Guile 2.2.4 is failing to configure due to resource leaks in the M4
macro for iconv. See below.
Please update m4/iconv to something that has been patched. I don't
where the patched m4/iconv test is. However, I know GnuPG is using one
because it had the same problem. You can find the check-ins of
interest at https://dev.gnupg.org/T4504 .
=====
checking whether mpz_inits is declared... yes
checking whether libunistring was built with iconv support... no
configure: error: No iconv support. Please recompile libunistring
with iconv enabled.
Failed to configure Guile
And:
configure:11684: checking for working iconv
configure:11760: gcc -o conftest -g2 -O2 -fsanitize=address
-fno-omit-frame-pointer -march=native -fPIC -pthread
-I/var/sanitize/include -DNDEBUG -L/var/sanitize/lib64
-fsanitize=address -Wl,-R,/var/sanitize/lib64 -Wl,--enable-new-dtags
conftest.c /var/sanitize/lib64/libiconv.so -Wl,-rpath
-Wl,/var/sanitize/lib64 >&5
configure:11760: $? = 0
configure:11760: ./conftest
=================================================================
==22607==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 144 byte(s) in 1 object(s) allocated from:
#0 0x7f76f02be008 in malloc (/lib64/libasan.so.5+0xef008)
#1 0x7f76efee6f5e in libiconv_open iconv.c:234
#2 0x400a03 in main /home/build/gnupg-2.2.15/conftest.c:117
#3 0x7f76ef8e711a in __libc_start_main (/lib64/libc.so.6+0x2311a)
Direct leak of 144 byte(s) in 1 object(s) allocated from:
#0 0x7f76f02be008 in malloc (/lib64/libasan.so.5+0xef008)
#1 0x7f76efee6f5e in libiconv_open iconv.c:234
#2 0x4008ce in main /home/build/gnupg-2.2.15/conftest.c:78
#3 0x7f76ef8e711a in __libc_start_main (/lib64/libc.so.6+0x2311a)
SUMMARY: AddressSanitizer: 288 byte(s) leaked in 2 allocation(s).
configure:11760: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "gnupg"
| #define PACKAGE_TARNAME "gnupg"
| #define PACKAGE_VERSION "2.2.15"
| #define PACKAGE_STRING "gnupg 2.2.15"
| #define PACKAGE_BUGREPORT "https://bugs.gnupg.org"
| #define PACKAGE_URL ""
| #define GNUPG_SWDB_TAG "gnupg22"
| #define PACKAGE "gnupg"
| #define VERSION "2.2.15"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| #define PACKAGE "gnupg"
| #define PACKAGE_GT "gnupg2"
| #define VERSION "2.2.15"
| #define PACKAGE_BUGREPORT "https://bugs.gnupg.org"
| #define NEED_LIBGCRYPT_VERSION "1.7.0"
| #define NEED_KSBA_VERSION "1.3.4"
| #define NEED_NTBTLS_VERSION "0.1.0"
| #define SECMEM_BUFFER_SIZE 32768
| #define AGENT_S2K_CALIBRATION 100
| #define USE_LIBDNS 1
| #define GPG_USE_RSA 1
| #define GPG_USE_ECDH 1
| #define GPG_USE_ECDSA 1
| #define GPG_USE_EDDSA 1
| #define GPG_USE_IDEA 1
| #define GPG_USE_CAST5 1
| #define GPG_USE_BLOWFISH 1
| #define GPG_USE_AES128 1
| #define GPG_USE_AES192 1
| #define GPG_USE_AES256 1
| #define GPG_USE_TWOFISH 1
| #define GPG_USE_CAMELLIA128 1
| #define GPG_USE_CAMELLIA192 1
| #define GPG_USE_CAMELLIA256 1
| #define GPG_USE_MD5 1
| #define GPG_USE_RMD160 1
| #define GPG_USE_SHA224 1
| #define GPG_USE_SHA384 1
| #define GPG_USE_SHA512 1
| #define PK_UID_CACHE_SIZE 4096
| #define ENABLE_CARD_SUPPORT 1
| #define USE_DIRMNGR_AUTO_START 1
| #define HAVE_PSELECT_NO_EINTR 1
| #define EXEEXT ""
| #define GNUPG_LIBASSUAN_VERSION "2.5.3"
| #define ENCFS "/usr/bin/encfs"
| #define FUSERMOUNT "/bin/fusermount"
| #define HAVE_LIBUTIL 1
| #define SHRED "/bin/shred"
| #define HAVE_NPTH 1
| #define USE_NPTH 1
| #define HTTP_USE_NTBTLS 1
| #define PRINTABLE_OS_NAME "GNU/Linux"
| /* end confdefs.h. */
|
| #include <iconv.h>
| #include <string.h>
| int main ()
| {
| /* Test against AIX 5.1 bug: Failures are not distinguishable from
successful
| returns. */
| {
| iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
| if (cd_utf8_to_88591 != (iconv_t)(-1))
| {
| static const char input[] = "\342\202\254"; /* EURO SIGN */
| char buf[10];
| const char *inptr = input;
| size_t inbytesleft = strlen (input);
| char *outptr = buf;
| size_t outbytesleft = sizeof (buf);
| size_t res = iconv (cd_utf8_to_88591,
| (char **) &inptr, &inbytesleft,
| &outptr, &outbytesleft);
| if (res == 0)
| return 1;
| }
| }
| #if 0 /* This bug could be worked around by the caller. */
| /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
| {
| iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
| if (cd_88591_to_utf8 != (iconv_t)(-1))
| {
| static const char input[] = "\304rger mit b\366sen
B\374bchen ohne Augenma\337";
| char buf[50];
| const char *inptr = input;
| size_t inbytesleft = strlen (input);
| char *outptr = buf;
| size_t outbytesleft = sizeof (buf);
| size_t res = iconv (cd_88591_to_utf8,
| (char **) &inptr, &inbytesleft,
| &outptr, &outbytesleft);
| if ((int)res > 0)
| return 1;
| }
| }
| #endif
| /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
| provided. */
| if (/* Try standardized names. */
| iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
| /* Try IRIX, OSF/1 names. */
| && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
| /* Try AIX names. */
| && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
| /* Try HP-UX names. */
| && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
| return 1;
| return 0;
| }
configure:11772: result: no
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Failed to configure Guile due to dirty iConvert
2019-05-14 0:44 Failed to configure Guile due to dirty iConvert Jeffrey Walton
@ 2019-05-14 5:45 ` Mark H Weaver
0 siblings, 0 replies; 2+ messages in thread
From: Mark H Weaver @ 2019-05-14 5:45 UTC (permalink / raw)
To: Jeffrey Walton; +Cc: guile-devel
Hi Jeffrey,
Jeffrey Walton <noloader@gmail.com> writes:
> I'm attempting to test GnuTLS using Asan. All dependent libraries need
> to be built with Asan, too. That caught Guile in the net.
>
> Guile 2.2.4 is failing to configure due to resource leaks in the M4
> macro for iconv. See below.
Fixed in commit 65d98d8fd290f985e49994f784b02b8e5ce01dd6 on the
stable-2.2 branch.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-05-14 5:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-14 0:44 Failed to configure Guile due to dirty iConvert Jeffrey Walton
2019-05-14 5:45 ` Mark H Weaver
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).