Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xfail sighandler test for now #316

Merged
merged 3 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Check
run: |
pushd build
ninja -v check-ia2
ninja -v check
popd
build-nginx:
runs-on: self-hosted
Expand Down
8 changes: 7 additions & 1 deletion libia2/include/permissive_mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ static pthread_t logging_thread IA2_SHARED_DATA;
typeof(IA2_IGNORE(pthread_create)) __real_pthread_create;

// The constructor that installs the signal handlers
__attribute__((constructor)) void install_permissive_mode_handler(void) {
void install_permissive_mode_handler(void) {
struct sigaction act = {
.sa_sigaction = IA2_IGNORE(permissive_mode_trampoline),
.sa_flags = SA_SIGINFO,
Expand All @@ -446,9 +446,15 @@ __attribute__((constructor)) void install_permissive_mode_handler(void) {
// Create the logging thread
__real_pthread_create(&logging_thread, NULL, IA2_IGNORE(log_mpk_violations),
NULL);
}

// The constructor that installs the signal handlers
__attribute__((constructor)) void permissive_mode_init(void) {
// When the process forks call this function again to reinstall these signal
// handlers and call pthread_atfork again
pthread_atfork(NULL, NULL, IA2_IGNORE(install_permissive_mode_handler));

install_permissive_mode_handler();
}

/*
Expand Down
1 change: 1 addition & 0 deletions rewriter/tests/sighandler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ define_test(
NEEDS_LD_WRAP
PKEY 1
CRITERION_TEST
NOT_IN_CHECK_IA2
)

define_ia2_wrapper()