Skip to content

Commit

Permalink
Merge pull request #44 from dlmarrero/add-dlerror
Browse files Browse the repository at this point in the history
Add dlerror message on dlopen failure
  • Loading branch information
vanhauser-thc committed Dec 4, 2022
2 parents fa07ebf + ddc51ea commit a8af9cb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions accel/tcg/cpu-exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,9 @@ void afl_setup(void) {
void *plib = dlopen(getenv("AFL_QEMU_PERSISTENT_HOOK"), RTLD_NOW);
if (!plib) {

fprintf(stderr, "[AFL] ERROR: invalid AFL_QEMU_PERSISTENT_HOOK=%s\n",
getenv("AFL_QEMU_PERSISTENT_HOOK"));
fprintf(stderr, "[AFL] ERROR: invalid AFL_QEMU_PERSISTENT_HOOK=%s - %s\n",
getenv("AFL_QEMU_PERSISTENT_HOOK"),
dlerror());
exit(1);

}
Expand Down

0 comments on commit a8af9cb

Please sign in to comment.