[all-commits] [llvm/llvm-project] 0ace6e: [OpenMP][FIX] Ensure we do not read outside the de...

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Wed Dec 6 14:58:11 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0ace6ee73a6b7047d16f23170c67cdf358f34c34
      https://github.com/llvm/llvm-project/commit/0ace6ee73a6b7047d16f23170c67cdf358f34c34
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2023-12-06 (Wed, 06 Dec 2023)

  Changed paths:
    M openmp/libomptarget/plugins-nextgen/common/src/GlobalHandler.cpp
    M openmp/libomptarget/plugins-nextgen/common/src/PluginInterface.cpp
    M openmp/libomptarget/test/offloading/barrier_fence.c
    A openmp/libomptarget/test/offloading/bug74582.c

  Log Message:
  -----------
  [OpenMP][FIX] Ensure we do not read outside the device image (#74669)

Before we expected all symbols in the device image to be backed up with
data that we could read. However, uninitialized values are not. We now
check for this case and avoid reading random memory.

This also replaces the correct readGlobalFromImage call with a
isSymbolInImage check after
https://github.com/llvm/llvm-project/pull/74550 picked the wrong one.

Fixes: https://github.com/llvm/llvm-project/issues/74582




More information about the All-commits mailing list