Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion qemu/target-i386/misc_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ void helper_rdtsc(CPUX86State *env)
if (!HOOK_BOUND_CHECK(hook, env->eip))
continue;
if (hook->insn == UC_X86_INS_RDTSC)
((uc_cb_insn_syscall_t)hook->callback)(env->uc, &rdtsc_q, hook->user_data);
((uc_cb_insn_rdtsc_t)hook->callback)(env->uc, &rdtsc_q, hook->user_data);
}

env->regs[R_EAX] = rdtsc_q.eax;
Expand Down
10 changes: 6 additions & 4 deletions uc.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ uc_err uc_close(uc_engine *uc)
// finally, free uc itself.
memset(uc, 0, sizeof(*uc));
free(uc);

return UC_ERR_OK;
}

Expand Down Expand Up @@ -549,7 +549,7 @@ static void clear_deleted_hooks(uc_engine *uc)
struct list_item * cur;
struct hook * hook;
int i;

for (cur = uc->hooks_to_del.head; cur != NULL && (hook = (struct hook *)cur->data); cur = cur->next) {
assert(hook->to_delete);
for (i = 0; i < UC_HOOK_MAX; i++) {
Expand Down Expand Up @@ -866,7 +866,9 @@ static bool split_region(struct uc_struct *uc, MemoryRegion *mr, uint64_t addres
return false;

QTAILQ_FOREACH(block, &uc->ram_list.blocks, next) {
if (block->offset <= mr->addr && block->length >= (mr->end - mr->addr)) {
//if (block->offset <= mr->addr && block->length >= (mr->end - mr->addr)) {
/* backported fix according to commits c733bba and 9651863 */
if (block->mr->addr <= mr->addr && block->length + block->mr->addr >= mr->end) {
break;
}
}
Expand Down Expand Up @@ -1404,4 +1406,4 @@ uc_err uc_context_free(uc_context *context)
list_remove(&uc->saved_contexts, context);
}
return uc_free(context);
}
}