Skip to content
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

[OpenMP] fopen is not used correctly in kmp_runtime.cpp #60934

Closed
shiltian opened this issue Feb 22, 2023 · 6 comments · Fixed by llvm/llvm-project-release-prs#330
Closed

[OpenMP] fopen is not used correctly in kmp_runtime.cpp #60934

shiltian opened this issue Feb 22, 2023 · 6 comments · Fixed by llvm/llvm-project-release-prs#330

Comments

@shiltian
Copy link
Contributor

shiltian commented Feb 22, 2023

This is very obviously wrong (mixing fopen and O_RDONLY), and doesn't build:

/<<PKGBUILDDIR>>/openmp/runtime/src/kmp_runtime.cpp:6920:16: error: no matching function for call to 'fopen'
    FILE *tf = fopen(temp_reg_status_file_name, O_RDONLY);
               ^~~~~
/usr/include/stdio.h:270:26: note: candidate function not viable: no known conversion from 'int' to 'const char *__restrict' for 2nd argumen
extern FILE *__REDIRECT (fopen, (const char *__restrict __filename,
@shiltian shiltian added this to the LLVM 16.0.0 Release milestone Feb 22, 2023
@shiltian shiltian self-assigned this Feb 22, 2023
@llvmbot
Copy link
Collaborator

llvmbot commented Feb 22, 2023

@llvm/issue-subscribers-openmp

CarlosAlbertoEnciso pushed a commit to SNSystems/llvm-debuginfo-analyzer that referenced this issue Feb 24, 2023
This patch fixes the wrong use of `fopen`.

Fix llvm/llvm-project#60934

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D144601
@shiltian
Copy link
Contributor Author

/cherry-pick 22cd105

@llvmbot
Copy link
Collaborator

llvmbot commented Feb 24, 2023

Failed to cherry-pick: 22cd105

https://github.com/llvm/llvm-project/actions/runs/4264109671

Please manually backport the fix and push it to your github fork. Once this is done, please add a comment like this:

/branch <user>/<repo>/<branch>

@tstellar
Copy link
Collaborator

tstellar commented Mar 1, 2023

/cherry-pick 22cd105

@llvmbot
Copy link
Collaborator

llvmbot commented Mar 1, 2023

/branch llvm/llvm-project-release-prs/issue60934

llvmbot pushed a commit to llvm/llvm-project-release-prs that referenced this issue Mar 1, 2023
This patch fixes the wrong use of `fopen`.

Fix llvm/llvm-project#60934

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D144601

(cherry picked from commit 22cd105)
@llvmbot
Copy link
Collaborator

llvmbot commented Mar 1, 2023

/pull-request llvm/llvm-project-release-prs#330

tstellar pushed a commit to llvm/llvm-project-release-prs that referenced this issue Mar 10, 2023
This patch fixes the wrong use of `fopen`.

Fix llvm/llvm-project#60934

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D144601

(cherry picked from commit 22cd105)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants