[Openmp-commits] [PATCH] D90078: [OpenMP] Fix potentially inconsistent OMPT return address
Hansang Bae via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Fri Oct 23 14:56:07 PDT 2020
hbae created this revision.
hbae added reviewers: AndreyChurbanov, jlpeyton, tlwilmar.
hbae added a project: OpenMP.
Herald added subscribers: guansong, yaxunl.
hbae requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added a subscriber: sstefan1.
Current OMPT_STORE_RETURN_ADDRESS() is not allowed to overwrite the return
address of the thread, opening the possibility for the thread to keep
obsolete information when it encounters the next construct without consuming
the information. Return address should be overwritten to avoid this.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D90078
Files:
openmp/runtime/src/ompt-specific.h
Index: openmp/runtime/src/ompt-specific.h
===================================================================
--- openmp/runtime/src/ompt-specific.h
+++ openmp/runtime/src/ompt-specific.h
@@ -76,8 +76,7 @@
}
#define OMPT_STORE_RETURN_ADDRESS(gtid) \
- if (ompt_enabled.enabled && gtid >= 0 && __kmp_threads[gtid] && \
- !__kmp_threads[gtid]->th.ompt_thread_info.return_address) \
+ if (ompt_enabled.enabled && gtid >= 0 && __kmp_threads[gtid]) \
__kmp_threads[gtid]->th.ompt_thread_info.return_address = \
__builtin_return_address(0)
#define OMPT_LOAD_RETURN_ADDRESS(gtid) __ompt_load_return_address(gtid)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90078.300418.patch
Type: text/x-patch
Size: 729 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20201023/7d2940ab/attachment.bin>
More information about the Openmp-commits
mailing list