Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8288399

MacOS debug symbol files not always deterministic in reproducible builds

XMLWordPrintable

    • b03
    • os_x

        When reproducible builds is enabled for MacOS clang compilation, the
        debug symbol information contains the full build directory paths, making the
        builds non-deterministic when built in different folders.
        eg.
         DW_AT_name ("/Users/jenkins/workspace/build-scripts/jobs/jdk/jdk-mac-aarch64-temurin/workspace/build/src/src/java.base/unix/native/libnio/ch/DatagramDispatcher.c")
         DW_AT_comp_dir ("/Users/jenkins/workspace/build-scripts/jobs/jdk/jdk-mac-aarch64-temurin/workspace/build/src/make")

        When ENABLE_REPRODUCIBLE_BUILD is enabled and
        ALLOW_ABSOLUTE_PATHS_IN_OUTPUT is false the debug symbol paths
        should be mapped using --fdebug-prefix-map, just like for gcc.
        Assembly file symbol paths should also be relative.

        Also the random seeded compiler generated symbol names are not deterministically seeded,
        thus leading to potential non-determinism for these entries:
            DW_AT_linkage_name ("_ZN16AbstractCompiler19should_perform_initEv")

              aleonard Andrew Leonard
              aleonard Andrew Leonard
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: