Skip to content

Commit

Permalink
pmemcheck: port to VG 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
marcinslusarz committed May 29, 2019
1 parent f680384 commit b7476fb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
4 changes: 2 additions & 2 deletions pmemcheck/pmc_common.c
Expand Up @@ -30,8 +30,8 @@
Word
cmp_pmem_st(const void *key, const void *elem)
{
struct pmem_st *lhs = (struct pmem_st *) (key);
struct pmem_st *rhs = (struct pmem_st *) (elem);
const struct pmem_st *lhs = (const struct pmem_st *) (key);
const struct pmem_st *rhs = (const struct pmem_st *) (elem);

if (lhs->addr + lhs->size <= rhs->addr)
return -1;
Expand Down
15 changes: 5 additions & 10 deletions pmemcheck/pmc_main.c
Expand Up @@ -268,7 +268,7 @@ print_multiple_stores(void)
static void
print_store_stats(void)
{
VG_(umsg)("Number of stores not made persistent: %lu\n", VG_(OSetGen_Size)
VG_(umsg)("Number of stores not made persistent: %u\n", VG_(OSetGen_Size)
(pmem.pmem_stores));

if (VG_(OSetGen_Size)(pmem.pmem_stores) != 0) {
Expand Down Expand Up @@ -356,13 +356,8 @@ print_redundant_flush_error(UWord limit)
static Bool
is_ip_memset_memcpy(Addr ip)
{
#define BUF_LEN 4096

static HChar buf[BUF_LEN];

InlIPCursor *iipc = VG_(new_IIPC)(ip);
buf[BUF_LEN - 1] = '\0';
VG_(describe_IP)(ip, buf, BUF_LEN, iipc);
const HChar *buf = VG_(describe_IP)(ip, iipc);
Bool present = (VG_(strstr)(buf, "memcpy") != NULL);
present |= (VG_(strstr)(buf, "memset") != NULL);
VG_(delete_IIPC)(iipc);
Expand Down Expand Up @@ -1397,9 +1392,9 @@ static Bool handle_gdb_monitor_command(ThreadId tid, HChar *req)
static IRSB*
pmc_instrument(VgCallbackClosure *closure,
IRSB *bb,
VexGuestLayout *layout,
VexGuestExtents *vge,
VexArchInfo *archinfo_host,
const VexGuestLayout *layout,
const VexGuestExtents *vge,
const VexArchInfo *archinfo_host,
IRType gWordTy, IRType hWordTy)
{
Int i;
Expand Down

0 comments on commit b7476fb

Please sign in to comment.