From 80215ce93b7e6110d14e82ac8e221573ad435657 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Mon, 6 Apr 2026 14:09:40 -0400 Subject: Convert from stack to heap based test allocation --- src/lib/core/template_func_proto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/core') diff --git a/src/lib/core/template_func_proto.c b/src/lib/core/template_func_proto.c index 3e1cd99..52a11b5 100644 --- a/src/lib/core/template_func_proto.c +++ b/src/lib/core/template_func_proto.c @@ -28,9 +28,9 @@ int get_github_release_notes_auto_tplfunc_entrypoint(void *frame, void *data_out const struct Delivery *ctx = (struct Delivery *) f->data_in; struct StrList *notes_list = strlist_init(); - for (size_t i = 0; i < sizeof(ctx->tests) / sizeof(*ctx->tests); i++) { + for (size_t i = 0; i < ctx->tests->num_used; i++) { // Get test context - const struct Test *test = &ctx->tests[i]; + const struct Test *test = ctx->tests->test[i]; if (test->name && test->version && test->repository) { char *repository = strdup(test->repository); char *match = strstr(repository, "spacetelescope/"); -- cgit From e6328bd75aee5d8fcc0c420fd6c736f95cbafd84 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Mon, 6 Apr 2026 19:00:24 -0400 Subject: Free platform array by length --- src/lib/core/include/core_mem.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/lib/core') diff --git a/src/lib/core/include/core_mem.h b/src/lib/core/include/core_mem.h index dd79e72..b67130c 100644 --- a/src/lib/core/include/core_mem.h +++ b/src/lib/core/include/core_mem.h @@ -22,4 +22,11 @@ guard_free(ARR); \ } while (0) +#define guard_array_n_free(ARR, LEN) do { \ + for (size_t ARR_I = 0; ARR && ARR_I < LEN ; ARR_I++) { \ + guard_free(ARR[ARR_I]); \ + } \ + guard_free(ARR); \ +} while (0) + #endif //STASIS_CORE_MEM_H -- cgit From f51c95ae0852dbe8f16b3869f5107e1499c35413 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Tue, 7 Apr 2026 09:42:07 -0400 Subject: Debug: Only report hangcheck value on error. * Too verbose --- src/lib/core/multiprocessing.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/core') diff --git a/src/lib/core/multiprocessing.c b/src/lib/core/multiprocessing.c index 298484a..7ae23c9 100644 --- a/src/lib/core/multiprocessing.c +++ b/src/lib/core/multiprocessing.c @@ -345,12 +345,12 @@ int mp_pool_join(struct MultiProcessingPool *pool, size_t jobs, size_t flags) { if (slot->pid == MP_POOL_PID_UNUSED) { // Child is already used up, skip it hang_check++; - SYSDEBUG("slot %zu: hang_check=%zu", i, hang_check); if (hang_check >= pool->num_used) { // If you join a pool that's already finished it will spin // forever. This protects the program from entering an // infinite loop. - fprintf(stderr, "%s is deadlocked\n", pool->ident); + SYSDEBUG("slot %zu: hang_check=%zu >= pool->num_used=%zu", i, hang_check, pool->num_used); + SYSERROR("%s is deadlocked\n", pool->ident); failures++; goto pool_deadlocked; } -- cgit