This is an archive of the discontinued LLVM Phabricator instance.

[OPENMP]Fix PR48885: Crash in passing firstprivate args to tasks on Apple M1.
ClosedPublic

Authored by ABataev on Mar 29 2021, 10:55 AM.

Details

Summary

Need to bitcast the function pointer passed as a parameter to the real
type to avoid possible problem with calling conventions.

Diff Detail

Event Timeline

ABataev created this revision.Mar 29 2021, 10:55 AM
ABataev requested review of this revision.Mar 29 2021, 10:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 29 2021, 10:55 AM

This patch appears to fix the problem on my Mac Mini M1 machine (at least, it passes the trivial test in the bug report). I cannot comment on the code itself, which someone else should review.

jdoerfert accepted this revision.Mar 31 2021, 6:40 AM

LGTM. I assume we can soon get rid of the variadic function type if we never use it as such.

This revision is now accepted and ready to land.Mar 31 2021, 6:40 AM