[all-commits] [llvm/llvm-project] 701e6f: [libc][fix] Fix buffer overrun in initialization o...

Joseph Huber via All-commits all-commits at lists.llvm.org
Sat Sep 2 15:59:46 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 701e6f7630474b637e0bc45d009bf2ec47f2d3fd
      https://github.com/llvm/llvm-project/commit/701e6f7630474b637e0bc45d009bf2ec47f2d3fd
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2023-09-02 (Sat, 02 Sep 2023)

  Changed paths:
    M libc/utils/gpu/loader/amdgpu/Loader.cpp

  Log Message:
  -----------
  [libc][fix] Fix buffer overrun in initialization of GPU return value

Summary:
The HSA API explicitly states that the size is a count of uint32_t's not
a byte count. This was erroneously being used as a simple memcpy,
causing some weird behaviour. Fix this by correctly passing `1` to
initialize a single integer to zero.




More information about the All-commits mailing list