Quantcast

Static src analysis of LibreOffice

classic Classic list List threaded Threaded
65 messages Options
1234
John Smith John Smith
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Static src analysis of LibreOffice

Hi,


I have been playing around with the llvm/clang static source code
analyzer (http://clang.llvm.org/get_started.html) for a while now, and
thought it might be fun and beneficial to run the analyzer on the
libreoffice ('master') source code. For those interested the results
can be found here :

http://lbalbalba.x90x.net/clang-analyzer/libreoffice/

I briefly considered filing a bug report, but I thought it might be a
much better idea to see what kind of response (if any) I get on this
list first.


All thoughts and comments are more than welcome; let me know what you think.



Regards,



John Smith.
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
julien2412 julien2412
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Static src analysis of LibreOffice

There's a bug tracker about it, see:
https://bugs.freedesktop.org/show_bug.cgi?id=39596

Julien
John Smith John Smith
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Static src analysis of LibreOffice

On Sun, Jul 29, 2012 at 9:21 PM, julien2412 <[hidden email]> wrote:
> There's a bug tracker about it, see:
> https://bugs.freedesktop.org/show_bug.cgi?id=39596
>
> Julien
>
Thank you, I was completely unaware of that.

But it looks like there still is a need for a place to store the html
output reports somewhere ? I have (limited) space on

http://lbalbalba.x90x.net/clang-analyzer/libreoffice/

but it sounds like a more structured and permanent way of storing the
reports is needed ? Or should I just go ahead and put that URL in the
bug report for the time being? (dont know how long I will be able to
store it there).


Regards,


John Smith
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Michael Meeks-2 Michael Meeks-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Static src analysis of LibreOffice

Hi John,

On Sun, 2012-07-29 at 21:33 +0200, John Smith wrote:
> But it looks like there still is a need for a place to store the html
> output reports somewhere ? I have (limited) space on

        Wow :-) it's nice to have that publicly available.

> http://lbalbalba.x90x.net/clang-analyzer/libreoffice/

        Looks really interesting.

> but it sounds like a more structured and permanent way of storing the
> reports is needed ? Or should I just go ahead and put that URL in the
> bug report for the time being? (dont know how long I will be able to
> store it there).

        So - if you send a few patches to fix some of the issues - I'll get you
a freedesktop commit account which comes with shell access & some web
space - how does that sound ? :-) [ modulo anyone wanting to add this to
the clang tinderbox etc. ;-]

        ATB,

                Michael.

--
[hidden email]  <><, Pseudo Engineer, itinerant idiot

_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
John Smith John Smith
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Static src analysis of LibreOffice

On Mon, Jul 30, 2012 at 10:26 AM, Michael Meeks <[hidden email]> wrote:
>
>         So - if you send a few patches to fix some of the issues - I'll get you
> a freedesktop commit account which comes with shell access & some web
> space - how does that sound ? :-) [ modulo anyone wanting to add this to
> the clang tinderbox etc. ;-]
>

Sounds great, except for the 'send a few patches' part. Im not a
developer myself. But writing a unix shell script that automates 'git
pull, scan-build make, ftp upload' is doable for me. That way you can
schedule the job to run anytime you want to, without having to rely on
me doing it when I have the spare time available. Is the space you are
talking about large enough to store the LibreOffice sources and the
resulting report ? Or do I need separate places for 1) doing the
analysis on the src and 2) uploading the reports ?

But if all that is too ambitious, I can just run the analyzer on my
local machine from time to time, and upload it to the web space you
mentioned.


Regards,


John Smith.
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Olivier Hallot Olivier Hallot
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Static src analysis of LibreOffice

In reply to this post by John Smith
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

HI

Great tool indeed. Thanks for the work

On a second look, most of the issues are with 3rd parties code (nss,
openldap, berkeleydb, etc...)

ATB

Olivier

Em 29-07-2012 15:20, John Smith escreveu:

> Hi,
>
>
> I have been playing around with the llvm/clang static source code
> analyzer (http://clang.llvm.org/get_started.html) for a while now, and
> thought it might be fun and beneficial to run the analyzer on the
> libreoffice ('master') source code. For those interested the results
> can be found here :
>
> http://lbalbalba.x90x.net/clang-analyzer/libreoffice/
>
> I briefly considered filing a bug report, but I thought it might be a
> much better idea to see what kind of response (if any) I get on this
> list first.
>
>
> All thoughts and comments are more than welcome; let me know what you think.
>
>
>
> Regards,
>
>
>
> John Smith.
> _______________________________________________
> LibreOffice mailing list
> [hidden email]
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>

- --
Olivier Hallot
Founder, Board of Directors Member - The Document Foundation
The Document Foundation, Zimmerstr. 69, 10117 Berlin, Germany
Fundação responsável civilmente, de acordo com o direito civil
Detalhes Legais: http://www.documentfoundation.org/imprint
LibreOffice translation leader for Brazilian Portuguese
+55-21-8822-8812
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJQFleuAAoJEJp3R7nH3vLxHvwH/1FtjlD3ctEQy7RMlXikgu2z
GK+NEvynGMgHh1iRT/xS5FfSRCeUWPhhXb0+sk6Ii9cDUPDl4vZfhnh4yJaSjH9q
Jnu6ag4zJGV14E9X/+BF6oysXzI+Glm1qA41u0azTw/EGQGlZlIdLTQGO9xTV9Zj
son7yXfPg3I+n8o4DQy9cKDznTH4gEfZdsNEITpfiTtbHCyOnQ0b8Kx5cH0LCWjN
7t7E1iMA09LzJMn9jmRN0M/BWh5xNzuk0y04m1kyxb07pZqZ9R69fK5wOK0zlTia
uGm7qLwhsLzZRa1ZfsVeKtswmllzQGSc+rjSBWxl3RvwrRQ8Dbdgu/zcPpVDu5M=
=FxUg
-----END PGP SIGNATURE-----
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
John Smith John Smith
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Static src analysis of LibreOffice

On Mon, Jul 30, 2012 at 11:45 AM, Olivier Hallot
<[hidden email]> wrote:
>
> On a second look, most of the issues are with 3rd parties code (nss,
> openldap, berkeleydb, etc...)
>
Maybe. But even so, bugs in 3rd party software that LibreOffice
depends on, potentially means problems in LibreOffice, right ?
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Olivier Hallot Olivier Hallot
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Static src analysis of LibreOffice

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi

Em 30-07-2012 06:50, John Smith escreveu:
> On Mon, Jul 30, 2012 at 11:45 AM, Olivier Hallot
> <[hidden email]> wrote:
>>
>> On a second look, most of the issues are with 3rd parties code (nss,
>> openldap, berkeleydb, etc...)
>>
> Maybe. But even so, bugs in 3rd party software that LibreOffice
> depends on, potentially means problems in LibreOffice, right ?
>

Absolutely right... I just feel a bit less guilty...  :-)
- --
Olivier Hallot
Founder, Board of Directors Member - The Document Foundation
The Document Foundation, Zimmerstr. 69, 10117 Berlin, Germany
Fundação responsável civilmente, de acordo com o direito civil
Detalhes Legais: http://www.documentfoundation.org/imprint
LibreOffice translation leader for Brazilian Portuguese
+55-21-8822-8812
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJQFln8AAoJEJp3R7nH3vLxs6MH/2PcNUygut0FOeReH4H6+CIa
F5ZxqpY5z7OUkJwUWgklwVs/VLOA65i7JMOgNwEN7KNHu0ymmL6mr52DBX05c6mb
CtRRfQreYLcHjQlfamSIJxDgPSsSaJVTOuLH+hWxzz1uMfasTUKVzwoz4eIXBfZB
gxtGrO6+vjIfwS2vrS7UMIdL/cjfe4uio67P1GJ6c3W/BQOFaIT3kXTMX+3R8M8A
rP723ZwJtJa2d1SZPCY1BXOMzmJfYePVGT+zN63IxfIKC8VUAyQmxiDji0GQPf3t
uYW2SSud3LknvpKo/Ty70HlrHsSJXXeAJWZr89eNjLyltrREevOw8QAceSABof4=
=Ubns
-----END PGP SIGNATURE-----
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Noel Grandin Noel Grandin
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Static src analysis of LibreOffice

In reply to this post by John Smith

On 2012-07-30 11:50, John Smith wrote:
> On Mon, Jul 30, 2012 at 11:45 AM, Olivier Hallot
> <[hidden email]> wrote:
>> On a second look, most of the issues are with 3rd parties code (nss,
>> openldap, berkeleydb, etc...)
>>
> Maybe. But even so, bugs in 3rd party software that LibreOffice
> depends on, potentially means problems in LibreOffice, right ?
>

Yeah, but it's a lot more painful working on that stuff because of the
need to push it upstream.
I personally, would prefer a report that focussed on the LO-specific
code, at least until we get the report down to a manageable size.

Disclaimer: http://www.peralex.com/disclaimer.html


_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
John Smith John Smith
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Static src analysis of LibreOffice

On Mon, Jul 30, 2012 at 12:02 PM, Noel Grandin <[hidden email]> wrote:

>
> On 2012-07-30 11:50, John Smith wrote:
>>>
>> Maybe. But even so, bugs in 3rd party software that LibreOffice
>> depends on, potentially means problems in LibreOffice, right ?
>>
>
> Yeah, but it's a lot more painful working on that stuff because of the need
> to push it upstream.
> I personally, would prefer a report that focussed on the LO-specific code,
> at least until we get the report down to a manageable size.
>
Well the analyzer simply 'follows' what you are compiling. So if there
is a way to configure LO (configure --without-foo --without-bar, or
something) to not make it compile all the 3rd party stuff, you
theoretically could generate a report on 'LO only', I guess.


Regards,


John Smith
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
John Smith John Smith
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Static src analysis of LibreOffice

On Mon, Jul 30, 2012 at 12:07 PM, John Smith <[hidden email]> wrote:

> On Mon, Jul 30, 2012 at 12:02 PM, Noel Grandin <[hidden email]> wrote:
>>
>> On 2012-07-30 11:50, John Smith wrote:
>>>>
>>> Maybe. But even so, bugs in 3rd party software that LibreOffice
>>> depends on, potentially means problems in LibreOffice, right ?
>>>
>>
>> Yeah, but it's a lot more painful working on that stuff because of the need
>> to push it upstream.
>> I personally, would prefer a report that focussed on the LO-specific code,
>> at least until we get the report down to a manageable size.
>>
> Well the analyzer simply 'follows' what you are compiling. So if there
> is a way to configure LO (configure --without-foo --without-bar, or
> something) to not make it compile all the 3rd party stuff, you
> theoretically could generate a report on 'LO only', I guess.
>
PS: Would './configure --disable-extensions' be 'close enough' for
this purpose ?
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Tor Lillqvist-2 Tor Lillqvist-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Static src analysis of LibreOffice

In reply to this post by John Smith
> So if there
> is a way to configure LO (configure --without-foo --without-bar, or
> something) to not make it compile all the 3rd party stuff,

--with-system-libs. How well that works (how many of the 3rd-party
libs you still need to compile) depends on your distro and version.

--tml
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
John Smith John Smith
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Static src analysis of LibreOffice

On Mon, Jul 30, 2012 at 12:29 PM, Tor Lillqvist <[hidden email]> wrote:
>> So if there
>> is a way to configure LO (configure --without-foo --without-bar, or
>> something) to not make it compile all the 3rd party stuff,
>
> --with-system-libs. How well that works (how many of the 3rd-party
> libs you still need to compile) depends on your distro and version.
>
Well im on my way to install all the needed libraries when configuring
--with-system-libs

But now ikm running into something I simply dont understand

lo ./configure gives me :

checking for __db185_open in -ldb4... configure: error: db library not
found. Use the correct -L flag,
no
or install the Berkeley db development package.


but rpm -qa gives me :

db4-cxx-4.8.30-10.fc17.i686
db4-devel-4.8.30-10.fc17.i686
db4-4.8.30-10.fc17.i686


I have no idea whats going on, or how to fix it...
[ running Fedora 17 ]
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Miklos Vajna-2 Miklos Vajna-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Static src analysis of LibreOffice

On Mon, Jul 30, 2012 at 01:42:44PM +0200, John Smith <[hidden email]> wrote:
> but rpm -qa gives me :
>
> db4-cxx-4.8.30-10.fc17.i686
> db4-devel-4.8.30-10.fc17.i686
> db4-4.8.30-10.fc17.i686
>
> I have no idea whats going on, or how to fix it...
> [ running Fedora 17 ]

Reading http://www.libreoffice.org/developers-2/:

Did you run sudo yum-builddep libreoffice already?
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
John Smith John Smith
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Static src analysis of LibreOffice

On Mon, Jul 30, 2012 at 2:29 PM, Miklos Vajna <[hidden email]> wrote:
>
> Did you run sudo yum-builddep libreoffice already?
>
Thanks! that helped a lot. But I still have to do
" ./configure --with-system-hsqldb=no --with-system-saxon=no
--with-system-mdds=no --with-system-libs "
for configure to be satisfied, even though I have installed the
required packages and packages-devel on my system.

If someone knows how to fix that: let me know
If it's not really a big deal: Ill do a analysis of libreoffice this way now.


Regards,


John Smith
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Michael Stahl-2 Michael Stahl-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Static src analysis of LibreOffice

On 30/07/12 14:50, John Smith wrote:

> On Mon, Jul 30, 2012 at 2:29 PM, Miklos Vajna <[hidden email]> wrote:
>>
>> Did you run sudo yum-builddep libreoffice already?
>>
> Thanks! that helped a lot. But I still have to do
> " ./configure --with-system-hsqldb=no --with-system-saxon=no
> --with-system-mdds=no --with-system-libs "
> for configure to be satisfied, even though I have installed the
> required packages and packages-devel on my system.
>
> If someone knows how to fix that: let me know
> If it's not really a big deal: Ill do a analysis of libreoffice this way now.

most likely the versions on the system are too old for LO.  e.g. we
depend on the mdds 0.6 that was just released a week ago.

and hsqldb and saxon are special cases where we almost always have to
use the internal ones; maybe --with-system-libs should not affect those...

_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
John Smith John Smith
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Static src analysis of LibreOffice

On Mon, Jul 30, 2012 at 2:58 PM, Michael Stahl <[hidden email]> wrote:
> On 30/07/12 14:50, John Smith wrote:
>>
>> If someone knows how to fix that: let me know
>> If it's not really a big deal: Ill do a analysis of libreoffice this way now.
>
> most likely the versions on the system are too old for LO.  e.g. we
> depend on the mdds 0.6 that was just released a week ago.
>
Hrm. Im having 0.5-something, so youre probably right

>
> and hsqldb and saxon are special cases where we almost always have to
> use the internal ones; maybe --with-system-libs should not affect those...
>
Ok.
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
John Smith John Smith
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Static src analysis of LibreOffice

Ok, so I now scan/build using :

scan-build ./configure --with-system-hsqldb=no --with-system-saxon=no
--with-system-libs
scan-build make

But I get no reports wjhatsoever, just this :

---------------------------------------------------------------------

Entering /usr/local/src/libreoffice/cli_ure/version

/bin/cp version.txt ../unxlngi6.pro/bin/cliureversion.mk
cli_ure deliver
Module 'cli_ure' delivered successfully. 1 files copied, 4 files unchanged

-----------------------------------------------------------------------
        Oh dear - something failed during the build - sorry !
  For more help with debugging build errors, please see the section in:
            http://wiki.documentfoundation.org/Development

  internal build errors:

ERROR: error 65280 occurred while making /usr/local/src/libreoffice/hsqldb

 it seems that the error is inside 'hsqldb', please re-run build
 inside this module to isolate the error and/or test your fix:

build_error.log should contain the captured output of the failed module(s)

---------------------------------------------------------------------

PS: I get the same error when not using clang/llvm's scan-build, and
'just' do a regular 'make'



Regards,


John Smith
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
John Smith John Smith
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Static src analysis of LibreOffice

PS:

 build_error.log gives me this :


log for /usr/local/src/libreoffice/hsqldb
Buildfile: /usr/local/src/libreoffice/hsqldb/unxlngi6.pro/misc/build/hsqldb/build/build.xml

init:

javaversion7:

javaversion6:

javaversion4:

javaversion2:

-prepare:

codeswitcher:
    [javac] /usr/local/src/libreoffice/hsqldb/unxlngi6.pro/misc/build/hsqldb/build/build.xml:143:
warning: 'includeantruntime' was not set, defaulting to
build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 1 source file to
/usr/local/src/libreoffice/hsqldb/unxlngi6.pro/misc/build/hsqldb/classes
    [javac] Compliance level '1.5' is incompatible with source level
'1.7'. A compliance level '1.7' or better is required

BUILD FAILED
/usr/local/src/libreoffice/hsqldb/unxlngi6.pro/misc/build/hsqldb/build/build.xml:143:
Compile failed; see the compiler error output for details.

Total time: 1 second
dmake:  Error code 1, while making
'./unxlngi6.pro/misc/build/so_built_so_hsqldb'
_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
Stephan Bergmann-2 Stephan Bergmann-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Static src analysis of LibreOffice

On 07/30/2012 03:45 PM, John Smith wrote:
>      [javac] Compliance level '1.5' is incompatible with source level
> '1.7'. A compliance level '1.7' or better is required

Adding the configure switch --with-java-target-version=1.5 might help.

Stephan

_______________________________________________
LibreOffice mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
1234
Loading...