# 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
# should be conditionally compiled like tc20_verifywrap is.
check_PROGRAMS = \
annotate_hbefore \
- bug392331 \
cond_init_destroy \
cond_timedwait_invalid \
cond_timedwait_test \
endif
bug322621_SOURCES = bug322621.cpp
+if HAVE_CXX17
+check_PROGRAMS += bug392331
bug392331_SOURCES = bug392331.cpp
bug392331_CXXFLAGS = $(AM_CXXFLAGS) -std=c++17
+endif
{
- 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
+}
+prereq: test -e bug392331
vgopts: -q
prog: bug392331
+prereq: test -e bug392331
vgopts: -q --suppressions=bug392331.supp
prog: bug392331
# 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
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)
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)
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)
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)
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)
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)
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)