[all-commits] [llvm/llvm-project] 402981: [OpenMP][libomp] Remove false positive for memory ...
Jonathan Peyton via All-commits
all-commits at lists.llvm.org
Mon Feb 6 07:30:55 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 402981ee25fe135d63226a7de17dbb14c437c71b
https://github.com/llvm/llvm-project/commit/402981ee25fe135d63226a7de17dbb14c437c71b
Author: Jonathan Peyton <jonathan.l.peyton at intel.com>
Date: 2023-02-06 (Mon, 06 Feb 2023)
Changed paths:
M openmp/runtime/src/kmp_safe_c_api.h
M openmp/runtime/src/kmp_str.cpp
Log Message:
-----------
[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
More information about the All-commits
mailing list