From: Paul Floyd Date: Sun, 6 Apr 2025 18:47:39 +0000 (+0200) Subject: Illumos helgrind: redir, filter and suppresions X-Git-Tag: VALGRIND_3_25_0~55 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c87f1f3c667c280f490996e254caae441079e4f1;p=thirdparty%2Fvalgrind.git Illumos helgrind: redir, filter and suppresions Add a redir for sem_timedwait (Solaris redirects sema_timedwait which seems to have been replaced on Illumos). Filter the arena size for the free_is_write test Use the Illumos expected for gone_abrt_xml Add Helgrind suppressions for printf, pthread_barrier_init and pthread_barrier_destroy. --- diff --git a/helgrind/hg_intercepts.c b/helgrind/hg_intercepts.c index 54711d8f2..d41cb6604 100644 --- a/helgrind/hg_intercepts.c +++ b/helgrind/hg_intercepts.c @@ -3402,6 +3402,11 @@ LIBC_FUNC(int, semZutimedwait, sem_t* sem, const struct timespec* abs_timeout) { PTH_FUNC(int, semaZutimedwait, sem_t *sem, const struct timespec* abs_timeout) { /* sema_timedwait */ return sem_timedwait_WRK(sem, abs_timeout); } +#if defined(__illumos__) +PTH_FUNC(int, semZutimedwait, sem_t *sem, const struct timespec* abs_timeout) { /* sem_timedwait */ + return sem_timedwait_WRK(sem, abs_timeout); +} +#endif #else # error "Unsupported OS" #endif diff --git a/helgrind/tests/filter_stderr_solaris b/helgrind/tests/filter_stderr_solaris index 56ecfb3fb..b82dde943 100755 --- a/helgrind/tests/filter_stderr_solaris +++ b/helgrind/tests/filter_stderr_solaris @@ -33,3 +33,9 @@ my $check = join "|", keys %regex; if (! /: pthread_/ && ! /WRK/) { s/($check)(.*hg_intercepts.c)/$regex{$1}$2/g; } + +# this is for free_is_write on Illumos +# on other platforms a 10 byte alloc results in a 16 byte arena +# on Illumos there are many other allocations resulting in a +# 4Mbyte arena +s/4,194,208 in arena/16 in arena/; diff --git a/memcheck/tests/gone_abrt_xml.stderr.exp-solaris b/memcheck/tests/gone_abrt_xml.stderr.exp-solaris index db2109f4d..a6c88df27 100644 --- a/memcheck/tests/gone_abrt_xml.stderr.exp-solaris +++ b/memcheck/tests/gone_abrt_xml.stderr.exp-solaris @@ -37,6 +37,11 @@ aborting ... SIGABRT 0 + + 0x........ + ... + _start_crt + 0x........ ... diff --git a/solaris11.supp b/solaris11.supp index e3ef0b784..c772df395 100644 --- a/solaris11.supp +++ b/solaris11.supp @@ -62,4 +62,24 @@ fun:gomp_team_start fun:GOMP_parallel } +# conflict between printf and _setorientation on data symbol "_iob" +{ + Illumos:printf + Helgrind:Race + fun:printf +} +# conflict between pthread_barrier_init and pthread_barrier_wait +{ + Illumos:pthread_barrier_init + Helgrind:Race + fun:pthread_barrier_init +} +# conflict between pthread_barrier_destroy and pthread_barrier_wait +{ + Illumos:pthread_barrier_destroy + Helgrind:Race + fun:memset + fun:pthread_barrier_destroy + fun:pthread_barrier_destroy +}