News for hackers. Stuff that matters.
Re:Stranger Strings: An exploitable flaw in SQLite by pclmulqdq on Tuesday October 25, 2022 @03:25PM (#33335008)
For most of the world, though, that code is decades old, with decades of testing and battle-hardening.

You will lose all of that in a rewrite, which is why people don't do it.

Re:Stranger Strings: An exploitable flaw in SQLite by jjnoakes on Tuesday October 25, 2022 @04:58PM (#33336107)
I'm not arguing for or against, but:

> You will lose all of that in a rewrite

I don't think you lose everything in a rewrite in general - you still have all of the edge cases and business logic in the old code that you translate to the new code. It's not like you are implementing whatever it is from scratch.

Sure, there are opportunities for the translation to introduce regressions, but that's a vastly different argument (and I think a much more minor downside).

Re:Stranger Strings: An exploitable flaw in SQLite by pittmajp on Wednesday October 26, 2022 @08:25AM (#33342613)
I’m not sure what you’d gain is worth the cost. What’s the cost in dollars and cents of SQLite cves over the past 20 years, and what would the cost be of rewriting that entire codebase?

At some point you have to come to terms with the fact that some bugs shouldn’t be fixed.

Re:Stranger Strings: An exploitable flaw in SQLite by jjnoakes on Wednesday October 26, 2022 @11:10AM (#33344909)
I think the cost savings is more than just the cves. You also get faster features and have to write fewer tests. You can use higher level abstractions with fewer rough edges. You may even be able to take advantage of the ecosystem more.

And you don't have to rewrite everything at once, you can do it at the function or file level bit by bit. Perhaps the parts that are changing the most are done first, or perhaps the parts with the most bugs.

I'm still not saying rewriting is always right or wrong, but I think it isn't as cut and dry as some make it sound.