[all-commits] [llvm/llvm-project] 7e4b8a: [BOLT] Make .debug_names emission reproducible (#2...

Rafael Auler via All-commits all-commits at lists.llvm.org
Wed Sep 23 16:37:07 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7e4b8ae111298941e0c31052a7124ab36f5365b5
      https://github.com/llvm/llvm-project/commit/7e4b8ae111298941e0c31052a7124ab36f5365b5
  Author: Rafael Auler <rafael at rafaelauler.cc>
  Date:   2026-09-23 (Wed, 23 Sep 2026)

  Changed paths:
    M bolt/include/bolt/Core/DebugNames.h
    M bolt/lib/Core/DebugNames.cpp

  Log Message:
  -----------
  [BOLT] Make .debug_names emission reproducible (#225218)

--update-debug-sections does not produce the same binary twice when the
input has a .debug_names section, or is given one with
--create-debug-names-section. Three sections vary from run to run:
.debug_str, .debug_names and .debug_str_offsets. On a two-CU split-DWARF
test binary, ten runs of the same llvm-bolt produced three different
outputs.

PR #197859 made the per-bucket work merge in partition order precisely
so the output would be reproducible, but missed this section. Two
issues:

- .debug_str offsets were handed out from the workers, so main.dwo.dwo
added by the merge step lands in a different place in each run. The
string offsets stored in .debug_names follow from it, and so does
.debug_str_offsets;
- hash colliding names were ordered by insertion (worker) order, also
non-deterministic.

We now determine string positions in the non-concurrent finalize step(),
and order collisions.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list