From d66094161df7b932b5f3d67707d1187d35a6b532 Mon Sep 17 00:00:00 2001 From: Ryan Fleury Date: Mon, 28 Sep 2026 08:31:05 -0600 Subject: [PATCH] rdi_from_dwarf: do not assume non-zero root tags in each unit --- src/rdi_from_dwarf/rdi_from_dwarf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rdi_from_dwarf/rdi_from_dwarf.c b/src/rdi_from_dwarf/rdi_from_dwarf.c index ff5d9571..84831699 100644 --- a/src/rdi_from_dwarf/rdi_from_dwarf.c +++ b/src/rdi_from_dwarf/rdi_from_dwarf.c @@ -1102,7 +1102,7 @@ d2r_convert(Arena *arena, D2R_ConvertParams *params) { U64 root_tags_in_this_unit = unit_info_root_tag_offs[unit_idx].count; U64 root_tags_per_work = (root_tags_in_this_unit + lane_count()-1) / lane_count(); - U64 works_per_this_unit = (root_tags_in_this_unit+root_tags_per_work-1) / root_tags_per_work; + U64 works_per_this_unit = root_tags_per_work ? ((root_tags_in_this_unit+root_tags_per_work-1) / root_tags_per_work) : 0; if(build) { D2R_SubUnitWork *works = sub_unit_works + sub_unit_work_idx;