From 6d8cbe8e6015d5f3de410c0abf9095b227bc0585 Mon Sep 17 00:00:00 2001 From: Nikita Smith Date: Tue, 3 Feb 2026 15:34:01 -0800 Subject: [PATCH] fix stack reference --- src/lib_rdi_make/rdi_make.c | 2 +- src/lib_rdi_make/rdi_make.h | 2 +- src/rdi_make/rdi_make_local.c | 13 +++++++------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/lib_rdi_make/rdi_make.c b/src/lib_rdi_make/rdi_make.c index e07100f6..961005f5 100644 --- a/src/lib_rdi_make/rdi_make.c +++ b/src/lib_rdi_make/rdi_make.c @@ -2131,7 +2131,7 @@ rdim_serialized_section_bundle_from_bake_results(RDIM_BakeResults *results) { RDIM_SerializedSectionBundle bundle; rdim_memzero_struct(&bundle); - bundle.sections[RDI_SectionKind_TopLevelInfo] = rdim_serialized_section_make_unpacked_struct(&results->top_level_info.top_level_info); + bundle.sections[RDI_SectionKind_TopLevelInfo] = rdim_serialized_section_make_unpacked_struct(results->top_level_info.top_level_info); bundle.sections[RDI_SectionKind_StringData] = rdim_serialized_section_make_unpacked_array(results->strings.string_data, results->strings.string_data_size); bundle.sections[RDI_SectionKind_StringTable] = rdim_serialized_section_make_unpacked_array(results->strings.string_offs, results->strings.string_offs_count); bundle.sections[RDI_SectionKind_IndexRuns] = rdim_serialized_section_make_unpacked_array(results->idx_runs.idx_runs, results->idx_runs.idx_count); diff --git a/src/lib_rdi_make/rdi_make.h b/src/lib_rdi_make/rdi_make.h index 9eb8829d..fcc3f9fd 100644 --- a/src/lib_rdi_make/rdi_make.h +++ b/src/lib_rdi_make/rdi_make.h @@ -1285,7 +1285,7 @@ struct RDIM_LineRec typedef struct RDIM_TopLevelInfoBakeResult RDIM_TopLevelInfoBakeResult; struct RDIM_TopLevelInfoBakeResult { - RDI_TopLevelInfo top_level_info; + RDI_TopLevelInfo *top_level_info; }; typedef struct RDIM_BinarySectionBakeResult RDIM_BinarySectionBakeResult; diff --git a/src/rdi_make/rdi_make_local.c b/src/rdi_make/rdi_make_local.c index c5658272..3d3e27b1 100644 --- a/src/rdi_make/rdi_make_local.c +++ b/src/rdi_make/rdi_make_local.c @@ -2990,12 +2990,13 @@ rdim_bake(Arena *arena, RDIM_BakeParams *params) { if(lane_idx() == lane_from_task_idx(0)) ProfScope("bake top level info") { - rdim_shared->baked_top_level_info.top_level_info.arch = params->top_level_info.arch; - rdim_shared->baked_top_level_info.top_level_info.exe_name_string_idx = rdim_bake_idx_from_string(bake_strings, params->top_level_info.exe_name); - rdim_shared->baked_top_level_info.top_level_info.exe_hash = params->top_level_info.exe_hash; - rdim_shared->baked_top_level_info.top_level_info.voff_max = params->top_level_info.voff_max; - rdim_shared->baked_top_level_info.top_level_info.guid = params->top_level_info.guid; - rdim_shared->baked_top_level_info.top_level_info.producer_name_string_idx = rdim_bake_idx_from_string(bake_strings, params->top_level_info.producer_name); + rdim_shared->baked_top_level_info.top_level_info = push_array(arena, RDI_TopLevelInfo, 1); + rdim_shared->baked_top_level_info.top_level_info->arch = params->top_level_info.arch; + rdim_shared->baked_top_level_info.top_level_info->exe_name_string_idx = rdim_bake_idx_from_string(bake_strings, params->top_level_info.exe_name); + rdim_shared->baked_top_level_info.top_level_info->exe_hash = params->top_level_info.exe_hash; + rdim_shared->baked_top_level_info.top_level_info->voff_max = params->top_level_info.voff_max; + rdim_shared->baked_top_level_info.top_level_info->guid = params->top_level_info.guid; + rdim_shared->baked_top_level_info.top_level_info->producer_name_string_idx = rdim_bake_idx_from_string(bake_strings, params->top_level_info.producer_name); } if(lane_idx() == lane_from_task_idx(1)) ProfScope("bake binary sections") {