mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 10:05:29 +00:00
Fixes related to Bug 392331
1. Added C++17 check to configure.ac 2. Needed Linux version of suppression 3. Added a filter for pthread_cond_signal
This commit is contained in:
parent
67bb7eeec9
commit
4dcfc05c20
20
configure.ac
20
configure.ac
@ -2009,6 +2009,26 @@ AC_MSG_RESULT([no])
|
||||
# clang 3.3 cannot process <thread> from e.g.
|
||||
# gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
|
||||
|
||||
AC_MSG_CHECKING([that C++ compiler can compile C++17 code])
|
||||
AC_LANG(C++)
|
||||
safe_CXXFLAGS=$CXXFLAGS
|
||||
CXXFLAGS=-std=c++17
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
|
||||
int x;
|
||||
])],
|
||||
[
|
||||
ac_have_cxx_17=yes
|
||||
AC_MSG_RESULT([yes])
|
||||
], [
|
||||
ac_have_cxx_17=no
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
CXXFLAGS=$safe_CXXFLAGS
|
||||
AC_LANG(C)
|
||||
|
||||
AM_CONDITIONAL(HAVE_CXX17, test x$ac_have_cxx_17 = xyes)
|
||||
|
||||
AC_MSG_CHECKING([that C++ compiler can include <thread> header file])
|
||||
AC_LANG(C++)
|
||||
safe_CXXFLAGS=$CXXFLAGS
|
||||
|
||||
@ -142,7 +142,6 @@ noinst_HEADERS = safe-pthread.h safe-semaphore.h
|
||||
# should be conditionally compiled like tc20_verifywrap is.
|
||||
check_PROGRAMS = \
|
||||
annotate_hbefore \
|
||||
bug392331 \
|
||||
cond_init_destroy \
|
||||
cond_timedwait_invalid \
|
||||
cond_timedwait_test \
|
||||
@ -242,6 +241,9 @@ annotate_hbefore_CFLAGS = $(AM_CFLAGS)
|
||||
endif
|
||||
|
||||
bug322621_SOURCES = bug322621.cpp
|
||||
if HAVE_CXX17
|
||||
check_PROGRAMS += bug392331
|
||||
bug392331_SOURCES = bug392331.cpp
|
||||
bug392331_CXXFLAGS = $(AM_CXXFLAGS) -std=c++17
|
||||
endif
|
||||
|
||||
|
||||
@ -1,7 +1,25 @@
|
||||
{
|
||||
Check that Dubious suppression works
|
||||
Check that Dubious suppression works FreeBSD
|
||||
Helgrind:Dubious
|
||||
fun:pthread_cond_signal_WRK
|
||||
fun:pthread_cond_signal
|
||||
fun:_ZNSt3__118condition_variable10notify_oneEv
|
||||
}
|
||||
{
|
||||
Check that Dubious suppression works Linux standalone
|
||||
Helgrind:Dubious
|
||||
fun:pthread_cond_signal_WRK
|
||||
fun:pthread_cond_signal@*
|
||||
fun:__gthread_cond_signal
|
||||
fun:UnknownInlinedFun
|
||||
fun:_ZNSt18condition_variable10notify_oneEv
|
||||
}
|
||||
# for some very strange reason the suppression is different
|
||||
# when running under regtest
|
||||
{
|
||||
Check that Dubious suppression works Linux regtest
|
||||
Helgrind:Dubious
|
||||
fun:pthread_cond_signal_WRK
|
||||
fun:pthread_cond_signal@*
|
||||
fun:_ZNSt18condition_variable10notify_oneEv
|
||||
}
|
||||
|
||||
@ -1,2 +1,3 @@
|
||||
prereq: test -e bug392331
|
||||
vgopts: -q
|
||||
prog: bug392331
|
||||
|
||||
@ -1,2 +1,3 @@
|
||||
prereq: test -e bug392331
|
||||
vgopts: -q --suppressions=bug392331.supp
|
||||
prog: bug392331
|
||||
|
||||
@ -60,6 +60,9 @@ $SED \
|
||||
# Some arches return ENOSYS instead of EINVAL for undefined futex operations.
|
||||
$SED -e "s/with error code 38 (ENOSYS: Function not implemented)/with error code 22 (EINVAL: Invalid argument)/" |
|
||||
|
||||
# filter differences in pthread_cond_signal
|
||||
$SED -e "s/pthread_cond_signal@\*/pthread_cond_signal/" |
|
||||
|
||||
$dir/../../helgrind/tests/filter_helgrind "$@"
|
||||
|
||||
exit 0
|
||||
|
||||
@ -124,7 +124,7 @@ Thread #x's call to pthread_cond_wait failed
|
||||
|
||||
Thread #x: pthread_cond_{signal,broadcast}: dubious: associated lock is not held by any thread
|
||||
at 0x........: pthread_cond_signal_WRK (hg_intercepts.c:...)
|
||||
by 0x........: pthread_cond_signal@* (hg_intercepts.c:...)
|
||||
by 0x........: pthread_cond_signal (hg_intercepts.c:...)
|
||||
by 0x........: main (tc20_verifywrap.c:167)
|
||||
|
||||
|
||||
|
||||
@ -116,7 +116,7 @@ Thread #x's call to pthread_cond_wait failed
|
||||
|
||||
Thread #x: pthread_cond_{signal,broadcast}: dubious: associated lock is not held by any thread
|
||||
at 0x........: pthread_cond_signal_WRK (hg_intercepts.c:...)
|
||||
by 0x........: pthread_cond_signal@* (hg_intercepts.c:...)
|
||||
by 0x........: pthread_cond_signal (hg_intercepts.c:...)
|
||||
by 0x........: main (tc20_verifywrap.c:167)
|
||||
|
||||
|
||||
|
||||
@ -124,7 +124,7 @@ Thread #x's call to pthread_cond_wait failed
|
||||
|
||||
Thread #x: pthread_cond_{signal,broadcast}: dubious: associated lock is not held by any thread
|
||||
at 0x........: pthread_cond_signal_WRK (hg_intercepts.c:...)
|
||||
by 0x........: pthread_cond_signal@* (hg_intercepts.c:...)
|
||||
by 0x........: pthread_cond_signal (hg_intercepts.c:...)
|
||||
by 0x........: main (tc20_verifywrap.c:167)
|
||||
|
||||
|
||||
|
||||
@ -124,7 +124,7 @@ Thread #x's call to pthread_cond_wait failed
|
||||
|
||||
Thread #x: pthread_cond_{signal,broadcast}: dubious: associated lock is not held by any thread
|
||||
at 0x........: pthread_cond_signal_WRK (hg_intercepts.c:...)
|
||||
by 0x........: pthread_cond_signal@* (hg_intercepts.c:...)
|
||||
by 0x........: pthread_cond_signal (hg_intercepts.c:...)
|
||||
by 0x........: main (tc20_verifywrap.c:167)
|
||||
|
||||
|
||||
|
||||
@ -124,7 +124,7 @@ Thread #x's call to pthread_cond_wait failed
|
||||
|
||||
Thread #x: pthread_cond_{signal,broadcast}: dubious: associated lock is not held by any thread
|
||||
at 0x........: pthread_cond_signal_WRK (hg_intercepts.c:...)
|
||||
by 0x........: pthread_cond_signal@* (hg_intercepts.c:...)
|
||||
by 0x........: pthread_cond_signal (hg_intercepts.c:...)
|
||||
by 0x........: main (tc20_verifywrap.c:167)
|
||||
|
||||
|
||||
|
||||
@ -126,7 +126,7 @@ Thread #x's call to pthread_cond_wait failed
|
||||
|
||||
Thread #x: pthread_cond_{signal,broadcast}: dubious: associated lock is not held by any thread
|
||||
at 0x........: pthread_cond_signal_WRK (hg_intercepts.c:...)
|
||||
by 0x........: pthread_cond_signal@* (hg_intercepts.c:...)
|
||||
by 0x........: pthread_cond_signal (hg_intercepts.c:...)
|
||||
by 0x........: main (tc20_verifywrap.c:167)
|
||||
|
||||
|
||||
|
||||
@ -116,7 +116,7 @@ Thread #x's call to pthread_cond_wait failed
|
||||
|
||||
Thread #x: pthread_cond_{signal,broadcast}: dubious: associated lock is not held by any thread
|
||||
at 0x........: pthread_cond_signal_WRK (hg_intercepts.c:...)
|
||||
by 0x........: pthread_cond_signal@* (hg_intercepts.c:...)
|
||||
by 0x........: pthread_cond_signal (hg_intercepts.c:...)
|
||||
by 0x........: main (tc20_verifywrap.c:167)
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user