[all-commits] [llvm/llvm-project] 953d67: Fix accsessing "PresentModifierLocs" array beyond ...
jyu2-git via All-commits
all-commits at lists.llvm.org
Wed Nov 29 08:02:11 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 953d675c42c254676ca446951bd728abefecf436
https://github.com/llvm/llvm-project/commit/953d675c42c254676ca446951bd728abefecf436
Author: jyu2-git <jennifer.yu at intel.com>
Date: 2023-11-29 (Wed, 29 Nov 2023)
Changed paths:
M clang/lib/Sema/SemaOpenMP.cpp
M clang/test/OpenMP/target_ast_print.cpp
Log Message:
-----------
Fix accsessing "PresentModifierLocs" array beyond its end. (#73579)
Currently PresentModifierLocs defined with size DefaultmapKindNum; where
DefaultmapKindNum = OMPC_DEFAULTMAP_pointer + 1
Before 5.0 variable-category can not be omitted. For the test like
\#pragma omp target map(tofrom: errors) defaultmap(present)
error would be mitted.
After 5.0 that is allowd.
When try to:
PresentModifierLocs[DMC->getDefaultmapKind()] =
DMC->getDefaultmapModifierLoc();
It is accessed beyond array end.
To fix this using OMPC_DEFAULTMAP_unknow instead OMPC_DEFAULTMAP_poiner.
More information about the All-commits
mailing list