[Openmp-commits] [PATCH] D102584: [OpenMP] Fixed Bug 49356
Shilei Tian via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Sun May 16 12:45:10 PDT 2021
tianshilei1992 created this revision.
Herald added subscribers: guansong, yaxunl.
tianshilei1992 requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: openmp-commits, sstefan1.
Herald added a project: OpenMP.
Bug 49356 (https://bugs.llvm.org/show_bug.cgi?id=49356) reports crash in
the test case `tasking/bug_taskwait_detach.cpp`, which is caused by the wrong
function declaration. `gtid` in `__kmpc_omp_task` should be `kmp_int32`.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D102584
Files:
openmp/runtime/test/tasking/bug_taskwait_detach.cpp
Index: openmp/runtime/test/tasking/bug_taskwait_detach.cpp
===================================================================
--- openmp/runtime/test/tasking/bug_taskwait_detach.cpp
+++ openmp/runtime/test/tasking/bug_taskwait_detach.cpp
@@ -3,6 +3,7 @@
#include <omp.h>
#include <chrono>
+#include <cstdint>
#include <iostream>
#include <thread>
@@ -10,7 +11,8 @@
#define PTASK_FLAG_DETACHABLE 0x40
// OpenMP RTL interfaces
-typedef long long kmp_int64;
+using kmp_int64 = int64_t;
+using kmp_int32 = int32_t;
typedef struct ID {
int reserved_1;
@@ -59,7 +61,8 @@
extern int __kmpc_global_thread_num(void *id_ref);
extern int **__kmpc_omp_task_alloc(id *loc, int gtid, int flags, size_t sz,
size_t shar, task_entry_t rtn);
-extern int __kmpc_omp_task(id *loc, kmp_int64 gtid, kmp_task_t *task);
+extern kmp_int32 __kmpc_omp_task(ident_t *loc_ref, kmp_int32 gtid,
+ kmp_task_t *new_task);
extern omp_event_handle_t __kmpc_task_allow_completion_event(ident_t *loc_ref,
int gtid,
kmp_task_t *task);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102584.345723.patch
Type: text/x-patch
Size: 1211 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210516/2efbf96c/attachment.bin>
More information about the Openmp-commits
mailing list