From: Paul F. <pa...@so...> - 2025-04-06 18:51:50
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=c87f1f3c667c280f490996e254caae441079e4f1 commit c87f1f3c667c280f490996e254caae441079e4f1 Author: Paul Floyd <pj...@wa...> Date: Sun Apr 6 20:47:39 2025 +0200 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: --- helgrind/hg_intercepts.c | 5 +++++ helgrind/tests/filter_stderr_solaris | 6 ++++++ memcheck/tests/gone_abrt_xml.stderr.exp-solaris | 5 +++++ solaris11.supp | 20 ++++++++++++++++++++ 4 files changed, 36 insertions(+) diff --git a/helgrind/hg_intercepts.c b/helgrind/hg_intercepts.c index 54711d8f26..d41cb66048 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 56ecfb3fb0..b82dde943f 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 db2109f4df..a6c88df27e 100644 --- a/memcheck/tests/gone_abrt_xml.stderr.exp-solaris +++ b/memcheck/tests/gone_abrt_xml.stderr.exp-solaris @@ -37,6 +37,11 @@ aborting ... <signame>SIGABRT</signame> <sicode>0</sicode> <stack> + <frame> + <ip>0x........</ip> + <obj>...</obj> + <fn>_start_crt</fn> + </frame> <frame> <ip>0x........</ip> <obj>...</obj> diff --git a/solaris11.supp b/solaris11.supp index e3ef0b7843..c772df3955 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 +} |