fix starved bug in vanilla kvm mode (caused by reading of uninitialized memory)
This commit is contained in:
parent
d4ba169bea
commit
108fa3baf9
@ -349,8 +349,8 @@ void handle_hypercall_kafl_release(struct kvm_run *run, CPUState *cpu, uint64_t
|
|||||||
if (init_state){
|
if (init_state){
|
||||||
init_state = false;
|
init_state = false;
|
||||||
} else {
|
} else {
|
||||||
//printf(CORE_PREFIX, "Got STARVED notification (num=%llu)\n", run->hypercall.args[0]);
|
//printf(CORE_PREFIX, "Got STARVED notification (num=%llu)\n", hypercall_arg);
|
||||||
if (run->hypercall.args[0] > 0) {
|
if (hypercall_arg > 0) {
|
||||||
GET_GLOBAL_STATE()->starved = 1;
|
GET_GLOBAL_STATE()->starved = 1;
|
||||||
} else {
|
} else {
|
||||||
GET_GLOBAL_STATE()->starved = 0;
|
GET_GLOBAL_STATE()->starved = 0;
|
||||||
@ -561,7 +561,7 @@ static void handle_hypercall_kafl_create_tmp_snapshot(struct kvm_run *run, CPUSt
|
|||||||
//handle_hypercall_kafl_acquire(run, cpu);
|
//handle_hypercall_kafl_acquire(run, cpu);
|
||||||
//fprintf(stderr, "%s: CREATE DONE at %lx\n", __func__, get_rip(cpu));
|
//fprintf(stderr, "%s: CREATE DONE at %lx\n", __func__, get_rip(cpu));
|
||||||
|
|
||||||
handle_hypercall_kafl_release(run, cpu, (uint64_t)run->hypercall.args[0]);
|
handle_hypercall_kafl_release(run, cpu, hypercall_arg);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
//fprintf(stderr, "%s: LOAD Continue at %lx\n", __func__, get_rip(cpu));
|
//fprintf(stderr, "%s: LOAD Continue at %lx\n", __func__, get_rip(cpu));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user