From 7430e249ea4f6988b972209e8fa52c0f6a8c6910 Mon Sep 17 00:00:00 2001 From: relapids Date: Mon, 15 Aug 2022 05:55:25 -0700 Subject: [PATCH] Fix for incorrect argument types passed to uc_ctl_request_cache/uc_ctl_remove_cache in test_uc_ctl_tb_cache. --- samples/sample_ctl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/sample_ctl.c b/samples/sample_ctl.c index bf55c02a..f154f24e 100644 --- a/samples/sample_ctl.c +++ b/samples/sample_ctl.c @@ -243,7 +243,7 @@ static void test_uc_ctl_tb_cache() // Now we request cache for all TBs. for (int i = 0; i < TB_COUNT; i++) { - err = uc_ctl_request_cache(uc, ADDRESS + i * TCG_MAX_INSNS, &tb); + err = uc_ctl_request_cache(uc, (uint64_t)(ADDRESS + i * TCG_MAX_INSNS), &tb); printf(">>> TB is cached at 0x%" PRIx64 " which has %" PRIu16 " instructions with %" PRIu16 " bytes.\n", tb.pc, tb.icount, tb.size); @@ -258,8 +258,8 @@ static void test_uc_ctl_tb_cache() // Now we clear cache for all TBs. for (int i = 0; i < TB_COUNT; i++) { - err = uc_ctl_remove_cache(uc, ADDRESS + i * TCG_MAX_INSNS, - ADDRESS + i * TCG_MAX_INSNS + 1); + err = uc_ctl_remove_cache(uc, (uint64_t)(ADDRESS + i * TCG_MAX_INSNS), + (uint64_t)(ADDRESS + i * TCG_MAX_INSNS + 1)); if (err) { printf("Failed on uc_ctl() with error returned: %u\n", err); return;