Skip to content

[OpenMP][libomp] Fix tasking debug assert #95823

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

jpeyton52
Copy link
Contributor

The debug assert is meant to check that the index is a valid which means the runtime needs to check against the size of the array instead of the number of threads. A free()-ed thread put back in the thread pool may index into anywhere inside the task team's available array from 0 to tt_max_threads potentially.

Fixes: #94260

The debug assert is meant to check that the index is a valid
which means the runtime needs to check against the size of the array
instead of the number of threads. A free()-ed thread put back in the
thread pool may index into anywhere inside the task team's available
array from 0 to tt_max_threads potentially.

Fixes: llvm#94260
@llvmbot llvmbot added the openmp:libomp OpenMP host runtime label Jun 17, 2024
@jpeyton52 jpeyton52 requested a review from TerryLWilmarth June 17, 2024 18:15
Copy link
Contributor

@shiltian shiltian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG

@jpeyton52 jpeyton52 merged commit 2e57e63 into llvm:main Jul 24, 2024
7 checks passed
yuxuanchen1997 pushed a commit that referenced this pull request Jul 25, 2024
Summary:
The debug assert is meant to check that the index is a valid which means
the runtime needs to check against the size of the array instead of the
number of threads. A free()-ed thread put back in the thread pool may
index into anywhere inside the task team's available array from 0 to
tt_max_threads potentially.

Fixes: #94260

Test Plan: 

Reviewers: 

Subscribers: 

Tasks: 

Tags: 


Differential Revision: https://phabricator.intern.facebook.com/D60250622
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
openmp:libomp OpenMP host runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[OpenMP] Debug assert hit with nesting parallels
3 participants