paulfloyd / freebsd_valgrind

Git repo used to Upstream the FreeBSD Port of Valgrind
GNU General Public License v2.0
15 stars 4 forks source link

drd/tests/trylock is failing [FreeBSD 13.0 amd64, gcc] #171

Closed paulfloyd closed 1 year ago

paulfloyd commented 2 years ago
--- trylock.stderr.exp  2020-05-08 13:24:22.505849000 +0200
+++ trylock.stderr.out  2021-11-07 13:50:09.082547000 +0100
@@ -7,7 +7,7 @@
 Locking rwlock via pthread_rwlock_timedrdlock().
 Attempt to lock for writing recursively (not allowed).
 Recursive writer locking not allowed: rwlock 0x.........
-   at 0x........: pthread_rwlock_trywrlock (drd_pthread_intercepts.c:?)
+   at 0x........: pthread_rwlock_wrlock (drd_pthread_intercepts.c:?)
    by 0x........: main (trylock.c:?)
 rwlock 0x........ was first observed at:
    at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?)

Not a big deal. Probably.

Without the filtering

==16070== Recursive writer locking not allowed: rwlock 0x7fc0002c8. ==16070== at 0x4A51FE4: pthread_rwlock_wrlock_intercept (drd_pthread_intercepts.c:1710) ==16070== by 0x4A51FE4: pthread_rwlock_wrlock (drd_pthread_intercepts.c:1724) ==16070== by 0x4012DD: main (trylock.c:60) ==16070== rwlock 0x7fc0002c8 was first observed at: ==16070== at 0x4A51B44: pthread_rwlock_init_intercept (drd_pthread_intercepts.c:1603) ==16070== by 0x4A51B44: pthread_rwlock_init (drd_pthread_intercepts.c:1611) ==16070== by 0x400EE4: main (trylock.c:31)

and with clang

==16080== Recursive writer locking not allowed: rwlock 0x7fc0002e8. ==16080== at 0x485E8E0: pthread_rwlock_trywrlock_intercept (drd_pthread_intercepts.c:1830) ==16080== by 0x485E8E0: pthread_rwlock_trywrlock (drd_pthread_intercepts.c:1844) ==16080== by 0x2025FB: main (trylock.c:60) ==16080== rwlock 0x7fc0002e8 was first observed at: ==16080== at 0x485D0B0: pthread_rwlock_init_intercept (drd_pthread_intercepts.c:1603) ==16080== by 0x485D0B0: pthread_rwlock_init (drd_pthread_intercepts.c:1611) ==16080== by 0x202079: main (trylock.c:31)

This seems to be down to whether Valgrind was built with GCC or clang and not the test exe.

paulfloyd commented 2 years ago

Need to look at the disasm for these.

paulfloyd commented 1 year ago

Not sure I'll ever have time to work on GCC related problems.