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

[contrib][linux-kernel] Fix stack detection for newer gcc #3348

Merged
merged 1 commit into from
Dec 13, 2022
Merged
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
6 changes: 5 additions & 1 deletion contrib/linux-kernel/test/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,14 @@ static void __attribute__((noinline)) use(void *x) {
asm volatile("" : "+r"(x));
}

static void __attribute__((noinline)) fill_stack(void) {
memset(g_stack, 0x33, 8192);
}

static void __attribute__((noinline)) set_stack(void) {

char stack[8192];
g_stack = stack;
memset(g_stack, 0x33, 8192);
use(g_stack);
}

Expand All @@ -208,6 +211,7 @@ static void __attribute__((noinline)) check_stack(void) {

static void test_stack_usage(test_data_t const *data) {
set_stack();
fill_stack();
test_f2fs();
test_btrfs(data);
test_decompress_unzstd(data);
Expand Down