Work around false positive Wuninitialized warning with gcc-11
This commit is contained in:
parent
e75f344455
commit
8af01a1435
32
memkind-gcc11.patch
Normal file
32
memkind-gcc11.patch
Normal file
@ -0,0 +1,32 @@
|
||||
diff --git a/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc b/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc
|
||||
index 1120ce8..5d29d98 100644
|
||||
--- a/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc
|
||||
+++ b/memkind-1.10.1/test/gtest_fused/gtest/gtest-all.cc
|
||||
@@ -7944,9 +7944,9 @@ void StackLowerThanAddress(const void* ptr, bool* result) {
|
||||
// Make sure AddressSanitizer does not tamper with the stack here.
|
||||
GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_
|
||||
bool StackGrowsDown() {
|
||||
- int dummy;
|
||||
+ volatile int dummy = 0;
|
||||
bool result;
|
||||
- StackLowerThanAddress(&dummy, &result);
|
||||
+ StackLowerThanAddress((const void *)&dummy, &result);
|
||||
return result;
|
||||
}
|
||||
|
||||
diff --git a/test/gtest_fused/gtest/gtest-all.cc b/test/gtest_fused/gtest/gtest-all.cc
|
||||
index 1120ce8..5d29d98 100644
|
||||
--- a/test/gtest_fused/gtest/gtest-all.cc
|
||||
+++ b/test/gtest_fused/gtest/gtest-all.cc
|
||||
@@ -7944,9 +7944,9 @@ void StackLowerThanAddress(const void* ptr, bool* result) {
|
||||
// Make sure AddressSanitizer does not tamper with the stack here.
|
||||
GTEST_ATTRIBUTE_NO_SANITIZE_ADDRESS_
|
||||
bool StackGrowsDown() {
|
||||
- int dummy;
|
||||
+ volatile int dummy = 0;
|
||||
bool result;
|
||||
- StackLowerThanAddress(&dummy, &result);
|
||||
+ StackLowerThanAddress((const void *)&dummy, &result);
|
||||
return result;
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
Name: memkind
|
||||
Summary: User Extensible Heap Manager
|
||||
Version: 1.10.1
|
||||
Release: 1%{?checkout}%{?dist}
|
||||
Release: 2%{?checkout}%{?dist}
|
||||
License: BSD
|
||||
URL: http://memkind.github.io/memkind
|
||||
BuildRequires: automake libtool numactl-devel systemd gcc gcc-c++ daxctl-devel
|
||||
@ -13,6 +13,8 @@ BuildRequires: automake libtool numactl-devel systemd gcc gcc-c++ daxctl-devel
|
||||
ExclusiveArch: x86_64 ppc64 ppc64le s390x aarch64
|
||||
|
||||
Source0: https://github.com/%{name}/%{name}/archive/%{gittag0}/%{name}-%{version}.tar.gz
|
||||
# Work around false positive Wuninitialized warning with gcc-11
|
||||
Patch0: memkind-gcc11.patch
|
||||
|
||||
%description
|
||||
The memkind library is an user extensible heap manager built on top of
|
||||
@ -44,6 +46,7 @@ alpha release. Feedback on design or implementation is greatly appreciated.
|
||||
|
||||
%prep
|
||||
%setup -q -a 0 -n %{name}-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
# It is required that we configure and build the jemalloc subdirectory
|
||||
@ -91,6 +94,9 @@ rm -f %{buildroot}/%{_docdir}/%{name}/VERSION
|
||||
%{_mandir}/man3/pmemallocator.3.*
|
||||
|
||||
%changelog
|
||||
* Thu Oct 15 2020 Rafael Aquini <aquini@linux.com> - 1.10.1-2
|
||||
- Work around false positive warning with gcc-11
|
||||
|
||||
* Wed Oct 07 2020 Rafael Aquini <aquini@linux.com> - 1.10.1-1
|
||||
- Update memkind source file to 1.10.1 upstream
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user