https://bugs.kde.org/show_bug.cgi?id=517487
Bug ID: 517487
Summary: Different blocked signal mask for process run with
valgrind
Classification: Developer tools
Product: valgrind
Version First 3.26.0
Reported In:
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
SUMMARY
Trivial program which blocks all signals behaves differently when run through
valgrind. The highest SIGRT signal (SIGRTMAX) is not blocked. Consider
following example which blocks all signals and outputs /proc/self/status to
stdout:
#include <pthread.h>
#include <signal.h>
#include <stddef.h>
#include <stdio.h>
int main() {
sigset_t mask;
sigfillset(&mask);
pthread_sigmask(SIG_SETMASK, &mask, NULL);
char buf[4097];
FILE* status = fopen("/proc/self/status", "r");
size_t n = fread(buf, sizeof(char), 4096, status);
buf[n]='\0';
printf("%s", buf);
}
STEPS TO REPRODUCE
1. Compile code
2. Run program with and without valgrind
3. Compare SigBlk: in both cases
OBSERVED RESULT
Without valgrind it's set correctly to:
SigBlk: fffffffe7ffbfeff
With valgrind highest bit is not set:
SigBlk: 7ffffffe7ffbfeff
EXPECTED RESULT
Both masks are the same.
SOFTWARE/OS VERSIONS
Linux: 6.19.6/arm64
ADDITIONAL INFORMATION
--
You are receiving this mail because:
You are watching all bug changes.