[all-commits] [llvm/llvm-project] aab62a: [OpenMP][Offloading] Fixed a crash caused by deref...

Shilei Tian via All-commits all-commits at lists.llvm.org
Wed Jan 5 20:04:42 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: aab62aab043162a03e2693dca1be2194bccdeee4
      https://github.com/llvm/llvm-project/commit/aab62aab043162a03e2693dca1be2194bccdeee4
  Author: Shilei Tian <i at tianshilei.me>
  Date:   2022-01-05 (Wed, 05 Jan 2022)

  Changed paths:
    M openmp/libomptarget/src/device.cpp

  Log Message:
  -----------
  [OpenMP][Offloading] Fixed a crash caused by dereferencing nullptr

In function `DeviceTy::getTargetPointer`, `Entry` could be `nullptr` because of
zero length array section. We need to check if it is a valid iterator before
using it.

Reviewed By: ronlieb

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




More information about the All-commits mailing list