• Paul Eggert's avatar
    misc: port better to gcc -fsanitize=address · 54615b95
    Paul Eggert authored
    Without these patches, ./configure CFLAGS='-fsanitize=address'
    would compute incorrect values.  This patch fixes some (but not all)
    test failures with recent glibc, with this configuration.
    * m4/acl.m4 (gl_ACL_GET_FILE):
    * m4/calloc.m4 (_AC_FUNC_CALLOC_IF):
    * m4/canonicalize.m4 (gl_FUNC_REALPATH_WORKS):
    * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO):
    * m4/duplocale.m4 (gl_FUNC_DUPLOCALE):
    * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
    * m4/getdelim.m4 (gl_FUNC_GETDELIM):
    * m4/getgroups.m4 (gl_FUNC_GETGROUPS):
    * m4/getline.m4 (gl_FUNC_GETLINE):
    * m4/malloc.m4 (_AC_FUNC_MALLOC_IF):
    * m4/realloc.m4 (_AC_FUNC_REALLOC_IF):
    * m4/regex.m4 (gl_REGEX):
    * m4/strndup.m4 (gl_FUNC_STRNDUP):
    * tests/test-calloc-gnu.c (main):
    * tests/test-duplocale.c (main):
    * tests/test-getgroups.c (main):
    * tests/test-getline.c (main):
    * tests/test-inttostr.c (main):
    * tests/test-localename.c (test_locale_name)
    (test_locale_name_thread, test_locale_name_environ)
    (test_locale_name_default):
    * tests/test-regex.c (main):
    * tests/test-setlocale1.c (main):
    * tests/test-stat.h (test_stat_func):
    Free heap-allocated storage before exiting.
    * m4/asm-underscore.m4 (gl_ASM_SYMBOL_PREFIX):
    Don't match *_foo symbols inserted by AddressSanitizer.
    * tests/test-regex.c, tests/test-stat.c: Include stdlib.h, for 'free'.
    54615b95
getdelim.m4 2.49 KB