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

runtime: use __attribute__((__noreturn__)) instead of _Noreturn to avoid errors #431

Merged
merged 1 commit into from
Oct 14, 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 runtime/libia2/include/ia2_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ int ia2_mprotect_with_tag(void *addr, size_t len, int prot, int tag);
char *allocate_stack(int i);
void verify_tls_padding(void);
void ensure_pkeys_allocated(int *n_to_alloc);
_Noreturn void ia2_reinit_stack_err(int i);
__attribute__((__noreturn__)) void ia2_reinit_stack_err(int i);

#define _IA2_INIT_RUNTIME(n) \
int ia2_n_pkeys_to_alloc = n; \
Expand Down
2 changes: 1 addition & 1 deletion runtime/libia2/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void ensure_pkeys_allocated(int *n_to_alloc) {
}

/* Forbid overwriting an existing stack. */
_Noreturn void ia2_reinit_stack_err(int i) {
__attribute__((__noreturn__)) void ia2_reinit_stack_err(int i) {
printf("compartment %d in thread %d tried to allocate existing stack\n",
i, gettid());
exit(1);
Expand Down