[all-commits] [llvm/llvm-project] 046e23: [llvm lib] Fix endian bug in #189098 (#189778)

Roy Shi via All-commits all-commits at lists.llvm.org
Wed Apr 1 08:59:25 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 046e23fa4adaf4cdee23f4f3416d7d57009f19d5
      https://github.com/llvm/llvm-project/commit/046e23fa4adaf4cdee23f4f3416d7d57009f19d5
  Author: Roy Shi <royitaqi at users.noreply.github.com>
  Date:   2026-04-01 (Wed, 01 Apr 2026)

  Changed paths:
    M llvm/lib/DebugInfo/GSYM/FileWriter.cpp
    M llvm/lib/Support/DataExtractor.cpp

  Log Message:
  -----------
  [llvm lib] Fix endian bug in #189098 (#189778)

The bug was added in #189098. Both functions that I added/changed
assumed little-endian host memory layout when reading/writing
non-power-of-two byte sizes (3, 5, 6, 7). On big-endian hosts (SPARC,
s390x), memcpy copies bytes into the MSB end of a uint64_t, leaving the
value in the wrong bit position. Fix by offsetting the memcpy/write
pointer to always target the LSB bytes.



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