Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print actual error on common mmap/malloc failures #34

Open
il-steffen opened this issue Oct 2, 2022 · 0 comments
Open

Print actual error on common mmap/malloc failures #34

il-steffen opened this issue Oct 2, 2022 · 0 comments

Comments

@il-steffen
Copy link
Contributor

Lets add proper checks for common mmap/malloc failure modes such as #27 or this (from discord):

qemu-system-x86_64: /home/user/kAFL/kafl/qemu/nyx/snapshot/memory/shadow_memory.c:288: shadow_memory_init_from_snapshot: Assertion `mmap(host_addr, self->ram_regions[i].size, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_FIXED, self->snapshot_ptr_fd, self->ram_regions[i].offset) != MAP_FAILED' failed.

Printing errno followed by exit() is probably more useful than assert().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant