Skip to content

Commit a8af9cb

Browse files
Merge pull request #44 from dlmarrero/add-dlerror
Add dlerror message on dlopen failure
2 parents fa07ebf + ddc51ea commit a8af9cb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

accel/tcg/cpu-exec.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,9 @@ void afl_setup(void) {
517517
void *plib = dlopen(getenv("AFL_QEMU_PERSISTENT_HOOK"), RTLD_NOW);
518518
if (!plib) {
519519

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

524525
}

0 commit comments

Comments
 (0)