We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4cafaa9 commit 141d520Copy full SHA for 141d520
linux-user/riscv/cpu_loop.c
@@ -32,13 +32,34 @@ void cpu_loop(CPURISCVState *env)
32
int trapnr;
33
target_ulong ret;
34
35
+//// --- Begin LibAFL code ---
36
+
37
+ libafl_exit_signal_vm_start();
38
39
+//// --- End LibAFL code ---
40
41
for (;;) {
42
43
44
45
+ if (libafl_exit_asap()) return;
46
47
48
49
cpu_exec_start(cs);
50
trapnr = cpu_exec(cs);
51
cpu_exec_end(cs);
52
process_queued_cpu_work(cs);
53
54
switch (trapnr) {
55
56
57
58
+ case EXCP_LIBAFL_EXIT:
59
+ return;
60
61
62
63
case EXCP_INTERRUPT:
64
/* just indicate that signals should be handled asap */
65
break;
0 commit comments