3 ms·
Man, there's so much irony with using OpenBSD (an OS designed with security in mind) with a web app written in C. While half asleep the other night, I randomly
by Hydraulix989 10y ago
Man, there's so much irony with using OpenBSD (an OS designed with security in mind) with a web app written in C.
While half asleep the other night, I randomly found a very obscure but also dangerous remotely exploitable buffer overflow in C++11 code I had written a while ago -- it's still very possible even with a modern C++ codebase.
- Sanddancer 10y agoKeep in mind that OpenBSD also has a very much locked down malloc in addition to everything else, so buffer overflows are more likely to crash loudly and quickly than to corrupt data and/or allow for exploits. The malloc used in glibc -- ptmalloc2 -- is absolutely terrible for pretty much anything modern, and really should be set on fire and pushed off a cliff.
- Hydraulix989 10y agoOut of curiosity, does the Android OS use ptmalloc2? I'm using the NDK for my current project. How performant is the OpenBSD allocator in comparison?
- Sanddancer 10y agoAndroid uses dlmalloc, which is basically the parent of ptmalloc2 and rather similar. With using the NDK, I have doubts that you'd be able to mix and match mallocs. I'm not finding any benchmarks one way or another with OpenBSD's malloc, other than the caveat that in debug mode, it becomes a lot slower, so I imagine that performance is similar.