[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: test-argp and clang's ASAN
From: |
Bruno Haible |
Subject: |
Re: test-argp and clang's ASAN |
Date: |
Thu, 09 May 2024 01:27:10 +0200 |
In <https://lists.gnu.org/archive/html/bug-gnulib/2023-12/msg00035.html>
I wrote:
> What should we do?
> (A) Ensure that glibc and gnulib argp behave the same:
> - Push Sergey's lowercase commit into glibc?
> - Revert Sergey's lowercase commit in gnulib?
> or
> (B) Ensure that gnulib overrides glibc:
> - Use '#define argp_parse rpl_argp_parse' so that clang doesn't
> insert its interceptor?
There wasn't an agreement regarding (A). So I'm committing (B).
2024-05-08 Bruno Haible <bruno@clisp.org>
argp: Fix test failure with clang's ASAN.
Reported in
<https://lists.gnu.org/archive/html/bug-gnulib/2023-12/msg00035.html>.
* m4/argp.m4 (gl_ARGP): Rename argp_parse to rpl_argp_parse.
diff --git a/m4/argp.m4 b/m4/argp.m4
index 3df651b270..a093c4d745 100644
--- a/m4/argp.m4
+++ b/m4/argp.m4
@@ -1,5 +1,5 @@
# argp.m4
-# serial 16
+# serial 17
dnl Copyright (C) 2003-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -11,6 +11,12 @@ AC_DEFUN([gl_ARGP]
AC_REQUIRE([AC_C_RESTRICT])
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ dnl Rename argp_parse to another symbol, so that clang's ASAN does not
+ dnl intercept it.
+ dnl See
<https://lists.gnu.org/archive/html/bug-gnulib/2023-12/msg00035.html>.
+ AC_DEFINE([argp_parse], [rpl_argp_parse],
+ [Define to the name of argp_parse outside libc.])
+
AC_CHECK_DECLS([program_invocation_name],
[],
[AC_DEFINE([GNULIB_PROGRAM_INVOCATION_NAME], [1],
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: test-argp and clang's ASAN,
Bruno Haible <=