Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.misc > #6876

a look at some hard-to-spot bugs in Libreoffice code

From RS Wood <rsw@therandymon.com>
Newsgroups comp.misc
Subject a look at some hard-to-spot bugs in Libreoffice code
Date 2015-03-02 14:09 +0000
Message-ID <20150302140921.7419bfa0.rsw@therandymon.com> (permalink)

Show all headers | View raw


http://www.viva64.com/en/b/0308/#ID0ECRAI

It's essentially publicity for the tool used (see the conclusion at the
end), but it's interesting, nonetheless.

LibreOffice is free and open-source. It includes code written in Java,
Python, and C++. We analyzed the part written in C++ (and a small part
in C, C++/CLI). Version: 4.5.0.0.alpha0+ (Git revision: 368367).

Analysis was done with the static code analyzer PVS-Studio.

Let's have a look at the errors found in this project and see what can
be done about them. I'd like to notice right away that some of what I
think to be bugs may actually be no bugs at all. As I'm not familiar
with the code, I could have easily mixed up a real defect and correct
code. However, since such code confused both me and the analyzer, it
certainly means something isn't right there. This code smells and
should be refactored to reduce the probability of its being
misunderstood in the course of project development and maintenance.

* Typos
* Code probably written on purpose but still looking suspicious
* Copy/Paste
* Brave use of the realloc() function
* Logical errors
* Skeletons in the closet
* Safety errors
* Misc

Conclusion

Although the number of errors, defects, and slip-ups discussed in this
article is, as usual, great, the LibreOffice project's code is still
very high-quality. And it does bear the evidence of being regularly
checked by Coverity, which indicates the authors' serious approach to
the development. The number of bugs found by PVS-Studio is pretty small
for such a large project like LibreOffice.

What did I mean to say by this article? Well, nothing special, really.
It's a bit of advertising for our tool, and that's all. Use the
PVS-Studio static analyzer regularly to find and fix piles of errors at
the earliest development stages.

-- 
RS Wood <rsw@therandymon.com
Posting to comp.misc, sci.misc, and misc.news.internet.discuss.

Back to comp.misc | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

a look at some hard-to-spot bugs in Libreoffice code RS Wood <rsw@therandymon.com> - 2015-03-02 14:09 +0000
  Re: a look at some hard-to-spot bugs in Libreoffice code pnwcha@black.box - 2015-03-02 18:20 +0000
    Re: a look at some hard-to-spot bugs in Libreoffice code RS Wood <rsw@therandymon.com> - 2015-03-03 13:44 +0000
    Re: a look at some hard-to-spot bugs in Libreoffice code Huge <Huge@nowhere.much.invalid> - 2015-03-03 22:14 +0000

csiph-web