diff options
author | jyu2-git <jennifer.yu@intel.com> | 2023-11-29 08:01:57 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-29 08:01:57 -0800 |
commit | 953d675c42c254676ca446951bd728abefecf436 (patch) | |
tree | 56a6e8728183c9833735c08eaec796adda838ca5 /flang/lib/Frontend/CompilerInvocation.cpp | |
parent | db96a9c3b7f1855a586c23328bfa073dde6f1352 (diff) | |
download | llvm-953d675c42c254676ca446951bd728abefecf436.zip llvm-953d675c42c254676ca446951bd728abefecf436.tar.gz llvm-953d675c42c254676ca446951bd728abefecf436.tar.bz2 |
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.
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions