@@ -632,7 +632,7 @@ static void test_x86_smc_add(void)
632
632
{
633
633
uc_engine * uc ;
634
634
uint64_t stack_base = 0x20000 ;
635
- int r_rsp ;
635
+ uint64_t r_rsp ;
636
636
/*
637
637
* mov qword ptr [rip+0x10], rax
638
638
* mov word ptr [rip], 0x0548
@@ -647,6 +647,8 @@ static void test_x86_smc_add(void)
647
647
r_rsp = stack_base + 0x1800 ;
648
648
OK (uc_reg_write (uc , UC_X86_REG_RSP , & r_rsp ));
649
649
OK (uc_emu_start (uc , code_start , -1 , 0 , 0 ));
650
+
651
+ OK (uc_close (uc ));
650
652
}
651
653
652
654
static void test_x86_smc_mem_hook_callback (uc_engine * uc , uc_mem_type t ,
@@ -667,7 +669,7 @@ static void test_x86_smc_mem_hook(void)
667
669
uc_engine * uc ;
668
670
uc_hook hook ;
669
671
uint64_t stack_base = 0x20000 ;
670
- int r_rsp ;
672
+ uint64_t r_rsp ;
671
673
unsigned int i = 0 ;
672
674
/*
673
675
* mov qword ptr [rip+0x29], rax
@@ -689,6 +691,8 @@ static void test_x86_smc_mem_hook(void)
689
691
r_rsp = stack_base + 0x1800 ;
690
692
OK (uc_reg_write (uc , UC_X86_REG_RSP , & r_rsp ));
691
693
OK (uc_emu_start (uc , code_start , -1 , 0 , 0 ));
694
+
695
+ OK (uc_close (uc ));
692
696
}
693
697
694
698
static uint64_t test_x86_mmio_uc_mem_rw_read_callback (uc_engine * uc ,
0 commit comments