News for hackers. Stuff that matters.
Re:Why Is SQLite Coded in C? (2017) by kennydude on Wednesday March 14, 2018 @11:28AM (#16585408)
OpenSSL was thought to be "bulletproof" and the "go to" option. And look where we are now
Re:Why Is SQLite Coded in C? (2017) by jcranmer on Wednesday March 14, 2018 @11:51AM (#16585623)
SQLite has a much more thorough testing process than OpenSSL did. Their acceptance tests have 100% MC/DC coverage [1], for example. While previous things like the IOC tester did find issues with SQLite, SQLite is very aggressive about including these sorts of tools into their ongoing testing process.

[1] MC/DC coverage is a slightly more rigorous form than branch coverage. A condition if (a && b) requires that you only test one of (a false, b true) and (a false, b false) for 100% coverage, whereas MC/DC coverage would insist on both being tested.

Re:Why Is SQLite Coded in C? (2017) by nathell on Wednesday March 14, 2018 @11:31AM (#16585441)
OpenSSL has always been nowhere near the level of robustness and bulletproofness that SQLite is at. Just look at how it's tested: https://www.sqlite.org/testing.html
Re:Why Is SQLite Coded in C? (2017) by vbezhenar on Wednesday March 14, 2018 @11:39AM (#16585515)
It's too bad some part of tests are proprietary. I think it someone would want to rewrite SQLite (keeping compatibility), those tests would be of huge value.
Re:Why Is SQLite Coded in C? (2017) by krylon on Wednesday March 14, 2018 @12:48PM (#16586110)
Yes, but that is also a source of funding for the project.
Re:Why Is SQLite Coded in C? (2017) by jeremiep on Wednesday March 14, 2018 @11:40AM (#16585524)
And how many more critical flaws would OpenSSL have if people kept rewriting it in the trending language of the week?

Rewriting just for the sake of rewriting or because you like another language better is an almost certain recipe for disaster.

Re:Why Is SQLite Coded in C? (2017) by jagger27 on Wednesday March 14, 2018 @11:42AM (#16585545)
I have a hard time believing this. It was common knowledge and lamented before Heartbleed that OpenSSL was bloated an unwieldy. People were surprised by the severity, not that it happened.
Re:Why Is SQLite Coded in C? (2017) by Sir_Cmpwn on Wednesday March 14, 2018 @11:33AM (#16585468)
I don't think this comparison is fair. SQLite is widely regarded as one of the best codebases in the world and it has 100% test coverage.
Re:Why Is SQLite Coded in C? (2017) by sidlls on Wednesday March 14, 2018 @11:44AM (#16585561)
That level of test coverage isn't as meaningful as people think. I'd bet that a significant fraction (> 10%) of those tests are redundant or cost more (in terms of maintenance, for one example) than the value they provide.
Re:Why Is SQLite Coded in C? (2017) by Sir_Cmpwn on Wednesday March 14, 2018 @11:51AM (#16585615)
I think you should read the full write-up on sqlite testing:

https://www.sqlite.org/testing.html

There's no question that sqlite is one of the most well understood and reliable codebases in the world.

Re:Why Is SQLite Coded in C? (2017) by saagarjha on Wednesday March 14, 2018 @04:10PM (#16587867)
OpenSSL is known to have a poorly documented, spaghetti codebase. The same is not true for SQLite.
Re:Why Is SQLite Coded in C? (2017) by protomyth on Wednesday March 14, 2018 @04:54PM (#16588206)
Bob Beck during his LibreSSL talk had a good overview of what was thought of OpenSSL https://youtu.be/GnBbhXBDmwU?t=2m11s

"we are all guilty"

Re:Why Is SQLite Coded in C? (2017) by d33 on Wednesday March 14, 2018 @11:32AM (#16585459)
I suspect there's a huge code quality difference between OpenSSL and SQLite. Also, keep in mind that SQLite was much easier to fuzz - it's basically one of the libraries that AFL has specific features for (dictionary-based coverage-guided fuzzing).
Re:Why Is SQLite Coded in C? (2017) by IncRnd on Wednesday March 14, 2018 @11:39AM (#16585516)
OpenSSL was never thought to be bulletproof. It is, however, the best of the worst for many scenarios.
Re:Why Is SQLite Coded in C? (2017) by lghh on Wednesday March 14, 2018 @11:32AM (#16585450)
But it was bulletproof until proven otherwise.