Commit 024841b2 authored by Rob Latham's avatar Rob Latham
Browse files

support pmem's experimental rpmem

rpmem requires a fairly new libfabirc and a patch to make gcc7 happy
parent d576e12c
From 7e180535a3c3e3c38270474168aba4492feaa14a Mon Sep 17 00:00:00 2001
From: Krzysztof Czurylo <krzysztof.czurylo@intel.com>
Date: Tue, 18 Jul 2017 13:14:50 +0200
Subject: [PATCH] benchmark: fix buffer overflow in rpmem_persist
Ref: pmem/issues#600
---
src/benchmarks/rpmem_persist.cpp | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/src/benchmarks/rpmem_persist.cpp b/src/benchmarks/rpmem_persist.cpp
index 8f10a5c4..a7872ae5 100644
--- a/src/benchmarks/rpmem_persist.cpp
+++ b/src/benchmarks/rpmem_persist.cpp
@@ -284,11 +284,7 @@ rpmem_poolset_init(const char *path, struct rpmem_bench *mb,
struct rpmem_pool_attr attr;
memset(&attr, 0, sizeof(attr));
- int ret = snprintf(attr.signature, sizeof(attr.signature), "PMEMBENCH");
- if (ret < 0) {
- perror("snprintf");
- return -1;
- }
+ memcpy(attr.signature, "PMEMBNCH", sizeof(attr.signature));
/* read and validate poolset */
if (util_poolset_read(&set, path)) {
--
2.14.1
......@@ -36,5 +36,10 @@ class Pmem(Package):
version('1.2.3', '5e3fba2bf4fd6b0c16db4e91d32df4b0')
version('1.2.2', 'f02832e9e0e2617e2c996f7b83b2e5ec')
# experimental rpmem
depends_on('libfabric@1.4.2:')
# gcc7 warns about buffer overflows
patch('0001-benchmark-fix-buffer-overflow-in-rpmem_persist.patch')
def install(self, spec, prefix):
make("install", "prefix=%s" % prefix)
Markdown is supported
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