[Libreoffice-bugs] [Bug 39596] use the CLang++ static analyser to find bugs

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Jun 8 19:45:33 UTC 2017


https://bugs.documentfoundation.org/show_bug.cgi?id=39596

--- Comment #33 from Maarten Hoes <hoes.maarten at gmail.com> ---
One of the problems with doing this, as far as I can see, is this: 

The developers of LibreOffice seem to be interested only/primarily in analyzing
the core LibreOffice codebase, and not in the many dependencies/pre-requisites
of that codebase (and understandably so). Unfortunately, the tool that does the
actual analysis (scan-build) will and can only (largely due to the way the
analyzer is interposing on the compiler) analyze *all* the code that gets build
when you run 'make'. There is no way to tell 'scan-build' that you specifically
want to include/exclude parts of the source(-tree) that gets build when you run
'make'. There's an enhancement request to add this functionality over at llvm
bugzilla [1], but so far it has not been added.

So when you run 'autogen.sh/configure' with '--without-system-libs
--without-system-headers', which would be the easiest way to ensure you get all
the right dependencies/pre-requisites in their correct respective versions
(included/pulled-in in the LibreOffice source tree), not only the LibreOffice
codebase gets analyzed, but all the dependencies/pre-requisites as well, as all
of these will be build during 'make'.

Which means that you are pretty much forced to use 'autogen.sh/configure' with
'--with-system-libs --with-system-headers', as using the distribution provided
binaries excludes them from being build during 'make' and therefore excluded
from analysis. But this requires you to install all the
dependencies/pre-requisites system-wide, and not all (or perhaps even none)
Linux distributions offer the needed packages, or not in the right versions.
Also, every time the LibreOffice source needs an updated version of a package
or a new package, you're going to need a way to determine this new
package/version in an automated way, and then install it (assuming the
distribution has a pre-build package available in the right version to begin
with).


[1]
https://bugs.llvm.org//show_bug.cgi?id=22594

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20170608/cac6f92e/attachment-0001.html>


More information about the Libreoffice-bugs mailing list