Bug 504904 - Hide "bad act handler address" warnings when -q (quiet) flag is set
Summary: Hide "bad act handler address" warnings when -q (quiet) flag is set
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (other bugs)
Version First Reported In: 3.25 GIT
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Paul Floyd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-28 10:22 UTC by mcermak
Modified: 2025-05-30 06:45 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
proposed patch (1.65 KB, patch)
2025-05-28 10:22 UTC, mcermak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mcermak 2025-05-28 10:22:10 UTC
Created attachment 181820 [details]
proposed patch

The `make ltpchecks` target reports a failure in the rt_sigaction02 test case. This failure occurs because the test triggers Valgrind to log warnings such as:

==318275== Warning: bad act handler address 0xFFFFFFFFFFFFFFFF in rt_sigaction()

Since the tests are run with the -q (quiet) flag, warnings like this should ideally be suppressed. The attached patch ensures that these messages are hidden as expected.
Comment 1 Paul Floyd 2025-05-28 19:55:18 UTC
For these quiet changes, why not.

The messages are really only for Valgrind developers for syscalls that are fairly fundamental to programs running. Usually users just get confused when they see this kind of warning.

The changes will be needed on other platforms as well - I'll deal with FreeBSD which will also need some regtest expecteds to be updated.
Comment 2 Mark Wielaard 2025-05-29 22:05:19 UTC
Agreed this is a good cleanup since the messages might just confuse users.

Pushed as:

commit ad6ca3e69358e440b4841cecf0ebed5aa7351d69
Author: Martin Cermak <mcermak@redhat.com>
Date:   Wed May 28 12:09:44 2025 +0200

    Hide bad act handler address warning when -q is set
    
    When valgrind is run with -q, messages like "Warning: bad act
    handler address 0xFFFFFFFFFFFFFFFF in rt_sigaction()" should
    be hidden.
    
    https://bugs.kde.org/show_bug.cgi?id=504904

Leaving open because Paul might want to do the same thing for Freebsd.
Comment 3 Paul Floyd 2025-05-30 06:34:25 UTC
Done for FreeBSD as well

commit ebc73366045855c6cf5069ae6841d3a887bd0ba0 (HEAD -> master, origin/master, origin/HEAD)
Author: Paul Floyd <pjfloyd@wanadoo.fr>
Date:   Fri May 30 08:31:48 2025 +0200

    FreeBSD sigprocmask syscall: do not print warnings when -q is set
    
    Equivalent to bug504904 and bug504909
Comment 4 mcermak 2025-05-30 06:45:34 UTC
Thank-you, guys.