3 ms·
OpenSSL is just bad code. You can keep a reference around to memory in every garbage collected code. What OpenSSL needs to do is to throw away all the extra co
by tomjen3 12y ago
OpenSSL is just bad code. You can keep a reference around to memory in every garbage collected code.
What OpenSSL needs to do is to throw away all the extra code that makes it run on a billion obsolete platforms, remove support for things that aren't needed (renegociating encryption algorithms? Really if a client supported it before it can support them now), wrap the internal parts of the library and port it to C++ so that they can use smart pointers, then ban malloc.
Manual memory management isn't dangerous, malloc and low level primitives are (e.g you should never manually append strings, other than in your string library, which should automatically resize the strings as needed).
- Someone1234 12y ago> Manual memory management isn't dangerous, malloc and low level primitives are That is somewhat self-contradictory. Those "low level primitives" are manual memory management, so even by your own admission it is dangerous. Even Wikipedia calls smart pointers "automatic memory management."
- AnthonyMouse 12y agoThere is a distinction to be drawn between a) malloc/free, b) RAII as with Rust or modern C++ and c) garbage collection. We can have a debate about whether RAII is "manual memory management" or not, but it's clearly safer than malloc/free without the inefficiency of garbage collection.
- bandrami 12y ago>> What OpenSSL needs to do is ... port it to C++ Awful idea. The absolute last thing we want is for memory management to be out of OpenSSL's explicit control (then we would have two audit trails to worry about). Automatic memory management is manual memory management you've outsourced to somebody else. (By this same argument, you also shouldn't turn on compiler optimizations when you build openssl.)