Skip to content

Conversation

nikic
Copy link
Contributor

@nikic nikic commented Jul 4, 2024

For the case where baseTypeSize does not match the size of T, read the value into a separate char buffer first. This avoids accessing buf using two different types.

Fixes #94616.

For the case where baseTypeSize does not match the size of T,
read the value into a separate char buffer first. This avoids
accessing buf using two different types.
@nikic nikic requested a review from jprotze July 4, 2024 15:23
@llvmbot llvmbot added openmp:libomp OpenMP host runtime openmp:libomptarget OpenMP offload runtime labels Jul 4, 2024
Copy link
Collaborator

@jprotze jprotze left a comment

Choose a reason for hiding this comment

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

Lgtm

@nikic nikic merged commit 8101cbf into llvm:main Jul 5, 2024
@nikic nikic deleted the ompd-strict-aliasing branch July 5, 2024 07:26
kbluck pushed a commit to kbluck/llvm-project that referenced this pull request Jul 6, 2024
…#97739)

For the case where baseTypeSize does not match the size of T, read the
value into a separate char buffer first. This avoids accessing buf using
two different types.

Fixes llvm#94616.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
openmp:libomp OpenMP host runtime openmp:libomptarget OpenMP offload runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[OpenMP] Strict aliasing violation in TargetValue::getValue()
3 participants