[Openmp-commits] [PATCH] D129872: [clang][OpenMP] Fix runtime crash in the call to __kmp_alloc.

Jennifer Yu via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Jul 15 09:08:21 PDT 2022


jyu2 created this revision.
jyu2 added reviewers: ddpagan, ABataev, mikerice.
jyu2 added projects: clang, OpenMP.
Herald added subscribers: guansong, yaxunl.
Herald added a project: All.
jyu2 requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: openmp-commits, cfe-commits, sstefan1.

The problem is that "alloctor" from omp_init_allocator gets truncated before passing to __kmp_alloc.

To fix this, when generate AllocrVal, call to IgnoreImpCasts to skip 'trunc'


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D129872

Files:
  clang/lib/CodeGen/CGOpenMPRuntime.cpp
  clang/test/OpenMP/omp_init_allocator.c
  openmp/runtime/test/api/omp_init_allocator.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129872.445006.patch
Type: text/x-patch
Size: 3597 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20220715/280af09d/attachment.bin>


More information about the Openmp-commits mailing list