From 41d504cccbc4cc658cf112dbfe6f001db1e54c5b Mon Sep 17 00:00:00 2001 From: York Jasper Niebuhr Date: Sun, 5 Apr 2026 18:15:06 +0200 Subject: [PATCH] Added subject static edge case --- not functional --- subject/main.c | 2 +- subject/task_struct.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/subject/main.c b/subject/main.c index b5081c9..42263f5 100644 --- a/subject/main.c +++ b/subject/main.c @@ -13,7 +13,7 @@ struct task_struct global = { .pid = 42, .comm = "main_global", .arrfun = { { .a = 9, .b = 10, .c = 11, .d = 12.0 }, { .a = 13, .b = 14, .c = 15, .d = 16.0 }, { .a = 17, .b = 18, .c = 19, .d = 20.0 } -} }; +}, .tasks = LIST_HEAD_SELF(global.tasks) }; static void print_layout() { // TODO -> Make builtin __spslr_initial_offsetof(type, field) that is not patched diff --git a/subject/task_struct.h b/subject/task_struct.h index 0af3bc6..98b84c3 100644 --- a/subject/task_struct.h +++ b/subject/task_struct.h @@ -43,6 +43,8 @@ static inline void list_add_tail(struct list_head *new, struct list_head *head) #define list_for_each(pos, head) \ for (pos = (head)->next; pos != (head); pos = pos->next) +#define LIST_HEAD_SELF(name) { .next = &(name), .prev = &(name)} + struct ArrayFun { int a, b, c; double d;