[all-commits] [llvm/llvm-project] 32dc48: [OpenMP][DeviceRTL] Fix an issue that thread array...

Shilei Tian via All-commits all-commits at lists.llvm.org
Thu Oct 6 13:13:48 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 32dc48094b0c7074617a2b237927128ef148db6d
      https://github.com/llvm/llvm-project/commit/32dc48094b0c7074617a2b237927128ef148db6d
  Author: Shilei Tian <i at tianshilei.me>
  Date:   2022-10-06 (Thu, 06 Oct 2022)

  Changed paths:
    M openmp/libomptarget/DeviceRTL/src/State.cpp

  Log Message:
  -----------
  [OpenMP][DeviceRTL] Fix an issue that thread array might be corrupted

The shared memory stack in the device runtime assumes no intervined uses.
D135037 breaks the assumption, potentially causing the shared stack corruption.
This patch moves the thread array to heap memory. Since it is already the slow
path, it doesn't matter that much anyway.

Reviewed By: jhuber6

Differential Revision: https://reviews.llvm.org/D135391




More information about the All-commits mailing list