2 ms·
Sanitizing static freestanding nolibc programs?
- matheusmoreira 3y agoI just bountied this stackoverflow question yesterday. I know for a fact there are people on HN who might be able to provide a detailed answer so I'm submitting it here. https://news.ycombinator.com/item?id=35760049 https://news.ycombinator.com/item?id=35760049
- fwsgonzo 3y agoFor undefined-sanitizer, you can implement your own at least. I did it here: https://github.com/fwsGonzo/barebones https://github.com/fwsGonzo/barebones Undefined-sanitizer also has a minimal-run-time mode designed to be able to run in production: https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#minimal-runtime https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#... As for ASan and MSan I think that will be quite a bit of work. I have worked in embedded a lot, and my advice here is to split off your project into static libraries, and make it so that you can run parts of it as a regular Linux program. I don't know if that's possible for you. For example, when I was fuzzing a network stack, I would just use TAP devices to fuzz almost all of it, except the actual devices. So I partially compiled the operating system as a regular Linux program.