This is an archive of the discontinued LLVM Phabricator instance.

Fix for bug https://llvm.org/bugs/show_bug.cgi?id=30889
ClosedPublic

Authored by AndreyChurbanov on Feb 7 2017, 6:42 AM.

Details

Summary

Assertion should not work on exit from OpenMP teams construct where task team field can be different in thread structure and in team structure. Added check that a thread does not exit the teams.

Diff Detail

Repository
rL LLVM

Event Timeline

AndreyChurbanov created this revision.Feb 7 2017, 6:42 AM
grokos edited edge metadata.Feb 7 2017, 2:16 PM

I am not an expert here and I'm not sure exactly how this works, but it seems to fix the problem.

One question though: The same assertion can be found throughout kmp_runtime.cpp, do other instances need this patching as well? E.g. line 2050, where there is a comment about a forthcoming patch that fixes the preconditions which spuriously make assertions to trigger.

runtime/src/kmp_runtime.cpp
2050–2051 ↗(On Diff #87420)

What about here?

runtime/src/kmp_runtime.cpp
2050–2051 ↗(On Diff #87420)

This is a different problem related with inconsistent references to task team in thread and team structures. It was actually fixed by the commit r249711 (https://reviews.llvm.org/D13353).

I will submit separate patch to re-enable this assertion.

omalyshe accepted this revision.Mar 28 2017, 6:07 AM
omalyshe added a subscriber: omalyshe.

LGTM.

This revision is now accepted and ready to land.Mar 28 2017, 6:07 AM
This revision was automatically updated to reflect the committed changes.