[OpenMP] ElementTypeSize may be used uninitialized
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
Static analysis flagged this line:
https://github.com/llvm/llvm-project/blob/2ada4b8fb0914ebdddc386130db24bcc074b3554/clang/lib/CodeGen/CGOpenMPRuntime.cpp#L8532-L8533
because it looks like `ElementTypeSize` could be uninitialized in some cases.
It looks like this was brought in by 0cab911
I can't tell all the assumptions here but it could not prove to myself it has to be initialized.
CC @chichunchen @alexey-bataev @zahiraam
Contributor guide
Research direction
Start in clang/lib/CodeGen/CGOpenMPRuntime.cpp around lines 8532-8533 and trace the control flow that assigns ElementTypeSize, including the change introduced by commit 0cab911. Determine whether every path initializes it and document or correct the issue so the static-analysis concern is resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100