This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][ASAN][OPENMP] Size Mismatch issue occurs when a global entry used in the target region is instrumented with ASAN specifically on AMDGPU occurs at Libomptarget level. There are trailing red zone for global variables mapped on the target...
Needs ReviewPublic

Authored by ampandey-AMD on Oct 13 2021, 5:39 AM.

Details

Summary

...region when instrumentation is enabled for AMDGPU. This global variable has entry as a struct global of type __tgt_offload_entry as an instance of struct omp_offloading_entry which stores the size info in bytes for mapped globals on the target device. This patch aims to fix the trailing redzones added for mapped globals so the the host code has correct information of global with trailing redzones.

Diff Detail

Event Timeline

ampandey-AMD created this revision.Oct 13 2021, 5:39 AM
ampandey-AMD requested review of this revision.Oct 13 2021, 5:39 AM
Herald added a project: Restricted Project. · View Herald Transcript

Updated the patch to resolve clang-format linting.

JonChesterfield added inline comments.
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
101

could we lose the unrelated whitespace changes? git-clang-format HEAD^ may be useful for formatting only the parts you've changed

Removing unrelated white space changes.

ampandey-AMD marked an inline comment as done.

Updated the patch to resolve clang-format linting