[Openmp-commits] [openmp] [OpenMP] Fix issue of indirect function call in `__kmpc_fork_call_if` (PR #65436)
chandan singh via Openmp-commits
openmp-commits at lists.llvm.org
Sat Dec 16 20:42:16 PST 2023
================
@@ -352,10 +351,29 @@ void __kmpc_fork_call_if(ident_t *loc, kmp_int32 argc, kmpc_micro microtask,
} else {
__kmpc_serialized_parallel(loc, gtid);
+#ifdef OMPT_SUPPORT
+ void *exit_frame_ptr;
+#endif
+
if (args)
- microtask(>id, &zero, args);
+ __kmp_invoke_microtask(VOLATILE_CAST(microtask_t) microtask, gtid,
+ /*npr=*/0,
+ /*argc=*/1, &args
+#ifdef OMPT_SUPPORT
+ ,
+ &exit_frame_ptr
+#endif
+ );
else
- microtask(>id, &zero);
+ __kmp_invoke_microtask(VOLATILE_CAST(microtask_t) microtask, gtid,
+ /*npr=*/0,
+ /*argc=*/0,
+ /*args=*/nullptr
----------------
chandankds wrote:
@shiltian This null pointer is causing segmentation fault in one of the flang test. I am new to Openmp runtimes, Could you please share what was the intention behind using nullptr here and can it be replaced with &args ?
https://github.com/llvm/llvm-project/pull/65436
More information about the Openmp-commits
mailing list