News for hackers. Stuff that matters.
Re:Chromium project finds that 70% of security defects are m... by mister_hn on Sunday May 24, 2020 @03:42AM (#23289874)
Just imagine that SQLite is written in C and the major of bugs are logical/optimization ones, not related to memory management.

And when talking about C++, since 2011 there are smart pointers to help developers managing memory kind of automatically.

I believe most of the problems are due the people typing on those keyboards such bad code, especially when it comes to "smart" code.

In 2020 we have plenty of tools supporting the developer job (memory sanitizers, static analysis tools, linting, profilers, etc.): The big problem is failing to / ignoring to use such tools.

Re:Chromium project finds that 70% of security defects are m... by _ph_ on Sunday May 24, 2020 @03:56AM (#23289941)
Ah, the "bad code" fallacy. If we hadn't had enough experiences already, the article we are disucssing here clearly shows, how difficult it is, to get C/C++ code reasonably error free. Yes, there exist a free applications, which are pretty good in that respect, but if your goal is to be error-free, the development time balloons. And you are often limited to very simple memory allocation schemas. If you think that "smart pointers" should be used, why not just use a memory-safe language?
Re:Chromium project finds that 70% of security defects are m... by winrid on Sunday May 24, 2020 @04:07AM (#23290004)
Well, smart pointers will still result in a more predictable program. Modern GCs are amazing. But it's hard to be super predictable with them.
Re:Chromium project finds that 70% of security defects are m... by thePunisher on Sunday May 24, 2020 @06:38AM (#23290613)
I would argue that most of the memory errors actually pertain to C programs, not C++ ones (providing they use proper encapsulation and libraries such as STL).

C is syntactically C++ being a subset of C++ and I've seen many programs which claim to be C++ but are actually programmed using C methodologies.

Re:Chromium project finds that 70% of security defects are m... by saagarjha on Sunday May 24, 2020 @03:50AM (#23289907)
Chrome is a heavy user of such tools and has many talented engineers working on it.
Re:Chromium project finds that 70% of security defects are m... by aylp on Sunday May 24, 2020 @09:54AM (#23291525)
Citation needed. I never see the same level of dedication in big Google or Facebook projects as in well run smaller projects like SQLite.

You are directly rewarded for "new" features (i.e. plagiarizing or rewriting old ones and selling them as new).

So I don't think the engineers are particularly talented, and the incentives are not the same as for SQLite.

Re:Chromium project finds that 70% of security defects are m... by ReactiveJelly on Sunday May 24, 2020 @10:59AM (#23291945)
If using Rust results in fewer bugs for less money, shouldn't we still do it?

The reason SQLite can test so thoroughly is that their requirements never change. I have tried to browse the web with SQLite but so far no luck.

Re:Chromium project finds that 70% of security defects are m... by zetafunction on Sunday May 24, 2020 @07:22AM (#23290781)
Actually, sqlite has its share of memory safety issues. https://bugs.chromium.org/p/chromium/issues/list?q=Type%3DBu... (and to be clear, this is just a coarse search, and the bugs there aren't necessarily all bugs in sqlite, but there are definitely some)
Re:Chromium project finds that 70% of security defects are m... by boccko on Sunday May 24, 2020 @03:52AM (#23289917)
Do you think issue at google is not knowing about/not using the proper tools?
Re:Chromium project finds that 70% of security defects are m... by aylp on Sunday May 24, 2020 @09:56AM (#23291540)
No, the issue is that the incentives are wrong (features, features, features for promotion) and indeed the engineers (on average) are not that talented.
Re:Chromium project finds that 70% of security defects are m... by mister_hn on Sunday May 24, 2020 @10:12AM (#23291637)
Features (user tracking and fancy options) over stability.

Why do we see the version of Chrome reaching 100 at a sustained pace, instead of seeing something like Chrome 8.X or 9.Y?

The pressure is all about introducing new features (and thus, more bugs!) while fixing the existing bugs slowly.

And we should stop thinking that all the brilliant minds are working at FAANG, because it isn't true.