[valgrind] [Bug 428035] drd: dont need to intercept duplicate libc definitions if run with musl

2020-10-21 Thread Bart Van Assche
https://bugs.kde.org/show_bug.cgi?id=428035

Bart Van Assche  changed:

   What|Removed |Added

 Status|REPORTED|RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Bart Van Assche  ---
Thanks for confirming!

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 428035] drd: dont need to intercept duplicate libc definitions if run with musl

2020-10-21 Thread Stacy
https://bugs.kde.org/show_bug.cgi?id=428035

--- Comment #2 from Stacy  ---
(In reply to Bart Van Assche from comment #1)
> Does the following patch help?
> 
> 
> diff --git a/drd/drd_pthread_intercepts.c b/drd/drd_pthread_intercepts.c
> index 62c466f508ad..585aafe22e41 100644
> --- a/drd/drd_pthread_intercepts.c
> +++ b/drd/drd_pthread_intercepts.c
> @@ -174,6 +174,13 @@ static int never_true;
> ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBC_SONAME,zf) argl_decl\
> { return implf argl; }
>  #else
> +#ifdef MUSL_LIBC
> +/* musl provides a single library that includes pthreads functions. */
> +#define PTH_FUNC(ret_ty, zf, implf, argl_decl, argl)\
> +   ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBPTHREAD_SONAME,zf) argl_decl; \
> +   ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBPTHREAD_SONAME,zf) argl_decl  \
> +   { return implf argl; }
> +#else
>  /*
>   * On Linux, intercept both the libc and the libpthread functions. At
>   * least glibc 2.32.9000 (Fedora 34) has an implementation of all pthread
> @@ -188,6 +195,7 @@ static int never_true;
> ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBPTHREAD_SONAME,zf) argl_decl  \
> { return implf argl; }
>  #endif
> +#endif
>  
>  /**
>   * Macro for generating three Valgrind interception functions: one with the

Yes it does; thank you.

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 428035] drd: dont need to intercept duplicate libc definitions if run with musl

2020-10-20 Thread Bart Van Assche
https://bugs.kde.org/show_bug.cgi?id=428035

Bart Van Assche  changed:

   What|Removed |Added

 CC||bvanass...@acm.org

--- Comment #1 from Bart Van Assche  ---
Does the following patch help?


diff --git a/drd/drd_pthread_intercepts.c b/drd/drd_pthread_intercepts.c
index 62c466f508ad..585aafe22e41 100644
--- a/drd/drd_pthread_intercepts.c
+++ b/drd/drd_pthread_intercepts.c
@@ -174,6 +174,13 @@ static int never_true;
ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBC_SONAME,zf) argl_decl\
{ return implf argl; }
 #else
+#ifdef MUSL_LIBC
+/* musl provides a single library that includes pthreads functions. */
+#define PTH_FUNC(ret_ty, zf, implf, argl_decl, argl)\
+   ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBPTHREAD_SONAME,zf) argl_decl; \
+   ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBPTHREAD_SONAME,zf) argl_decl  \
+   { return implf argl; }
+#else
 /*
  * On Linux, intercept both the libc and the libpthread functions. At
  * least glibc 2.32.9000 (Fedora 34) has an implementation of all pthread
@@ -188,6 +195,7 @@ static int never_true;
ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBPTHREAD_SONAME,zf) argl_decl  \
{ return implf argl; }
 #endif
+#endif

 /**
  * Macro for generating three Valgrind interception functions: one with the

-- 
You are receiving this mail because:
You are watching all bug changes.

[valgrind] [Bug 428035] drd: dont need to intercept duplicate libc definitions if run with musl

2020-10-20 Thread Stacy
https://bugs.kde.org/show_bug.cgi?id=428035

Stacy  changed:

   What|Removed |Added

   Assignee|bvanass...@acm.org  |stacy.gaikovaia@windriver.c
   ||om

-- 
You are receiving this mail because:
You are watching all bug changes.