Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K

    PVS-Studio Blog

    viva64.com · Company blog · on HN since 2011

    The team behind the PVS-Studio static analyzer writes about bugs found in C, C++ and C# code, including open source projects.

    Visit blogHN submissions
    ProgrammingLanguages & Compilers
    What HN says

    HN commenters link it for bug reports on projects like CryEngine and GCC, and one calls its Rust post the best answer to Rust hype.

    Stats for nerds
    135HN people shared it
    742linked in comments
    4.6Kstory points
    Apr 2021last shared
    2011people per year2021

    Top posts on HN

    1. 1
      Criticizing the Rust Language, and Why C/C++ Will Never Die
      13 people · 196 points · first shared 2015 · 83 comments on HN
    2. 2
      Bugs found in GCC with the help of PVS-Studio
      3 people · 189 points · first shared 2016 · 22 comments on HN
    3. 3
      The Last Line Effect
      2 people · 179 points · first shared 2014 · 25 comments on HN
    4. 4
      27000 errors in the Tizen operating system
      1 person · 178 points · first shared 2017 · 78 comments on HN
    5. 5
      Debunking that C++ is faster and safer than Rust
      1 person · 143 points · first shared 2020 · 81 comments on HN
    6. 6
      The Evil Within the Comparison Functions
      3 people · 136 points · first shared 2017 · 59 comments on HN
    7. 7
      Why Don't Software Developers Use Static Analysis Tools to Find Bugs?
      2 people · 107 points · first shared 2015 · 121 comments on HN
    8. 8
      Can We Trust the Libraries We Use?
      1 person · 93 points · first shared 2014 · 53 comments on HN
    9. 9
      LibreOffice Project's Check
      2 people · 90 points · first shared 2015 · 22 comments on HN
    10. 10
      The Last Line Effect
      6 people · 89 points · first shared 2014 · 8 comments on HN

    What HN people wrote when they linked it

    • virtualizedJul 2017

      Yes, PVS-Studio is very good and useful for avoiding bugs.

      No, companies don't really care about avoiding bugs. No one at Samsung will risk delaying the release of the next plastic crap product by fixing any problems. Why would they? Defects will even encourage customers to buy a new device because they are used to getting no bug fix updates. This is the worst possible company for Viva64 to go to.

      It seems like C++ developers either don't give a shit about code quality or they do, and don't make many mistakes anymore. Either way there is little demand for a static analyzer. It won't get easier for Viva64 in the future. A few years ago, Compilers and IDEs started providing similar warnings as PVS-Studio, although not quite as sophisticated yet. Code-level testing begins to be a thing in proprietary software. Clang offers valgrind-like sanitizers for different classes of bugs that even PVS-Studio cannot detect.

      TIL that Viva64 has over 20 employees. The passive-aggressive blog posts always made it look like one or two people running PVS-Studio as a side project or so. I read those posts regularly, but I don't remember them announcing any new features or improvements in PVS-Studio itself. Why do I have to pay annually if they don't spend the money on improving the product?

      I am not even sure if PVS-Studio is worth the money. They don't have prices on the web site and defend their business decisions in the FAQ (https://www.viva64.com/en/order-faq/) in a very unprofessional…

    • evmarDec 2011

      Having done similar work for Chrome, I can attest to the fact that large code bases are full of errors.

      If you're not on Windows, using both gcc's -Wall and -Wextra along with Clang in the same way is a good start. (Here's a post with more details: http://neugierig.org/software/chromium/notes/2011/01/clang.html .) The Clang static analyzer wasn't very useful at the time I tried it because it didn't analyze C++ code. Valgrind also finds a lot but it is harder to be diligent about fixing.

      The PVS Studio guy (mentioned in Carmack's post) ran our code through it as well and also found a number of bugs, as described in a few posts: http://www.viva64.com/en/a/0074/ http://www.viva64.com/en/b/0113/ . (As Carmack supposed, they also claimed the Chrome code was some of the best they'd seen. But it's more likely they were being truthful in both cases.)

      They've also ran the Chrome code through Coverity, but I haven't been involved in fixing those bugs so I don't know how useful it was. Searching the bug tracker for [coverity] turns up a handful of bugs, but it's possible more are hidden for security reasons.

    • kazinatorAug 2016

      I just love this one: http://www.viva64.com/en/examples/V504/

      void GlyphComboBox::update(SPFont* spfont)
      {
      if (!spfont) return // <=
      //TODO: figure out why do we need to append("")
      // before clearing items properly...

      //Gtk is refusing to clear the combobox
      //when I comment out this line
      this->append("");
      this->remove_all();
      }

      Gee, why do you need the dummy append? It's because you put in so many TODO comments that you concealed the missing semicolon that you otherwise might have found ...

      This is arguably not a bug; the developer tested the code, massaged it into working as expected, using what look like well-defined constructs, and documented their surprise at certain aspects of the code, leaving this issue easy to find with a grep for TODO.

      On another note, what is surprising here is that they didn't catch it with their compiler. Look, the function returns void. GCC has a diagnostic for this, something like "return with expression in a function returning void". I think that still kicks in even if that expression has void type.

    • jasodeFeb 2017

      >The title is very misleading.

      I agree the title originally as submitted[1] is not helpful. When the author submitted[2] it to Intel DZ, he re-used the same vague title as the original PVS-Studio article from April 2016: http://www.viva64.com/en/b/0391/

      HN admins already edit titles with [YEAR] to signify an old article. In the same vein, I do wish the admins (or the original submitters to save the admins the effort) went even further and exercised editorial judgement to add [NON-CUTE SUBTITLE] to negate the effects of cute-but-meaningless titles.

      In this case, there would be a "[C/C++ refactoring tips]" like you suggested appended to the end of the title.

      [1] original submitted HN title: "The Ultimate Question of Programming, Refactoring, and Everything"

      [2] https://software.intel.com/en-us/articles/how-to-contribute-to-intel-developer-zone

    • darklajidNov 2016

      So far I'm impressed by every demonstration of PVS Studio that gets linked here and I love the developer's way of using open source projects for demonstrations (and thereby improving these projects). Great job.

      Unfortunately the software seems to have no single developer license (only 'Team' and 'Site') and you have to write them a mail to even get a quote [1]?

      In other words: Awesome tool, completely unavailable and out of reach for me.

      Are there any somewhat comparable tools in the C# world that you use in your projects, apart from StyleCop/FxCop?

      1: http://www.viva64.com/en/order/ - "Please write us from your corporate e-mail address for details on PVS-Studio prices. Specify information about your company and the type of license you would like to purchase (see the table below)."

    • saejoxSep 2013

      One thing article does not mention is the false positives. Filter helps only partially, i'm still left with hundreds of false positives. PVS-Studio considers false-positives as natural part of the progress. A total turn-off me.
      Cppcheck does very well in that regard, i only have 2 false positives with cppcheck. Best part is they are considered bugs by cppcheck team.
      Also wonder about the opposite, errors that have been caught by cppcheck but ignored by PVS-Studio. They do exist.
      http://www.viva64.com/en/b/0149/

      My points are:
      - Every c++ project should use cppcecheck since it has almost no noise.
      - PVS-Studio if you have a dedicated analyst in your team and able to pony up $10k per year.

    Related

    Bartek's Coding Blogbfilipek.com49 people

    Coding without Google

    Bartek's Coding Blog
    Personal · last shared 2021
    Andrey Karpovmedium.com/@cpp_coder15 people

    About size_t and ptrdiff_t

    Andrey Karpov
    Personal · last shared 2019
    C++ Truthscpptruths.blogspot.com17 people

    Covariance and Contravariance in C++ Standard Library

    C++ Truths
    Personal · last shared 2019
    Rust Blogblog.rust-lang.org533 people

    Announcing Rust 1.0

    Rust Blog
    Company · last shared 2026
    LLVM Blogblog.llvm.org226 people

    Clang Is Now Used to Build Chrome for Windows

    LLVM Blog
    Company · last shared 2026
    sunfishcodeblog.sunfishcode.online32 people

    Bugs in Hello World

    sunfishcode
    Personal · last shared 2025
    C++ Team Blogdevblogs.microsoft.com/cppblog131 people

    We used C++20 to eliminate a class of runtime bugs

    C++ Team Blog
    Company · last shared 2026
    Sean McArthurseanmonstar.com31 people

    Intel - nodejs logging that plays nice with console.log

    Sean McArthur
    Personal · last shared 2025