Commit 791a2ecc authored by Jonathan Peyton's avatar Jonathan Peyton Committed by Tom Stellard
Browse files

[OpenMP][libomp] Remove false positive for memory sanitizer

The memory sanitizer intercepts the memcpy() call but not the direct
assignment of last byte to 0. This leads the sanitizer to believe the
last byte of a string based on the kmp_str_buf_t type is uninitialized.
Hence, the eventual strlen() inside __kmp_env_dump() leads to an
use-of-uninitialized-value warning.

Using strncat() instead gives the sanitizer the information it needs.

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

Fixes #60501

(cherry picked from commit 4ce32d2f)
parent 7917b15d
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment