From: | Kevin Grittner <kgrittn(at)ymail(dot)com> |
---|---|
To: | "noloader(at)gmail(dot)com" <noloader(at)gmail(dot)com>, Tomas Vondra <tv(at)fuzzy(dot)cz> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Clang 3.3 Analyzer Results |
Date: | 2013-11-11 22:18:18 |
Message-ID: | 1384208298.28663.YahooMailNeo@web162905.mail.bf1.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
[moving the discussion to pgsql-hackers]
Jeffrey Walton <noloader(at)gmail(dot)com> wrote:
> The Analyzer is invoked with scan-build. Its used when compiling
> the package because it performs static analysis.
>
> The Santizers are invoked with the runtime flags. They are used
> with the `check` program because they perform dynamic analysis.
> The more self test the better.
Thanks for the recipes!
> ##############
> # Scan-view
>
> make distclean
>
> export CC="/usr/local/bin/clang"
> export CXX="/usr/local/bin/clang++"
>
> /usr/local/bin/scan-build/scan-build --use-analyzer=/usr/local/bin/clang ./configure
>
> /usr/local/bin/scan-build/scan-build --use-analyzer=/usr/local/bin/clang make
I'm currently capturing a text version of all the warnings from
this. Will gzip and post when it finishes. It's generating a lot
of warnings; I have no idea how many are PostgreSQL problems and
how many are false positives; will just post the whole set FWIW. I
am using the 3.4 development nightly snapshot with these commands:
scan-build --use-analyzer=/usr/bin/clang ./configure --silent --prefix=$PWD/Debug --enable-debug --enable-cassert --enable-depend --with-libxml --with-libxslt --with-openssl --with-perl --with-python
scan-build --use-analyzer=/usr/bin/clang make -s world
> ##############
> # Sanitizers
>
> make distclean
>
> export DYLD_FALLBACK_LIBRARY_PATH=/usr/local/lib/clang/3.3/lib/darwin/
> export CC=/usr/local/bin/clang
> export CXX=/usr/local/bin/clang++
> export CFLAGS="-g3 -fsanitize=address -fsanitize=undefined"
> export CXXFLAGS="-g3 -fsanitize=address -fsanitize=undefined -fno-sanitize=vptr"
>
> ./configure
>
> make
>
> make check 2>&1 | asan_symbolize.py
I haven't tried this yet, but will have a go at it after I capture
the other.
--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | David Johnston | 2013-11-11 22:28:32 | Re: Limiting/disallowing changes of certain columns |
Previous Message | Melvin Call | 2013-11-11 21:55:59 | Limiting/disallowing changes of certain columns |
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2013-11-11 22:20:21 | Re: pg_dump and pg_dumpall in real life |
Previous Message | Nigel Heron | 2013-11-11 22:14:24 | Re: stats for network traffic WIP |