3 ms·
Something like https://aur.archlinux.org/packages/electricfence/ https://aur.archlinux.org/packages/electricfence/ or do I misunderstand you?
by hendry 6y ago
Something like https://aur.archlinux.org/packages/electricfence/ https://aur.archlinux.org/packages/electricfence/ or do I misunderstand you?
- tonyarkles 6y agoWhen you mmap, it gives you back a pointer that you can read from, but doesn’t necessarily populate your process’s page table with all of the data you can read. Instead, when you go to access it, there will be a page fault if the page you’re trying to read hasn’t been read from disk yet. The kernel catches the page fault, allocates a page, does the read from disk, and restarts your read as if nothing happened. The user process has no indication that any of this happened other than perhaps a bit of latency.
- nitrogen 6y agoI'm curious now if electricfence could be configured to detect mmap faults, since it's described as using the virtual memory hardware for malloc debugging. I haven't used -lefence since well before I learned about Valgrind though.
- tonyarkles 6y agoI’m curious now too!