On Mon, Nov 11, 2013 at 2:00 AM, Tomas Vondra <tv@xxxxxxxx> wrote: > >> Would someone know the best way to get this to the right folks? >> >> Thanks in advance. (And sorry reporting to pgsql-general - the >> developer list states emails must go elsewhere first). > > IMHO pgsql-hackers is the right audience for reports like this. The 'must > ask somewhere else first' is meant for regular questions that are not that > closely related to postgresql development, and are likely to be answered > in the generic mailing lists. > > Please, upload the HTML report somewhere and post a link. If it's easier > to the clang analysis, maybe post instructions on how to do that. The instructions are kind of easy when they are given as a recipe. They get a little more involved when they steps have to be explained. The recipes are below and include building Clang 3.3 from sources. The Clang recipe lacks a couple of copies - for example, `asan_symbolize.py` needs to be copied into $PREFIX because `make install` does not do it. Keep the build directory around until you have everything you need. 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. Jeff ############## # Clang 3.3 # Run from a scratch directory, delete when finished wget http://llvm.org/releases/3.3/llvm-3.3.src.tar.gz wget http://llvm.org/releases/3.3/cfe-3.3.src.tar.gz wget http://llvm.org/releases/3.3/compiler-rt-3.3.src.tar.gz # wget http://llvm.org/releases/3.3/lldb-3.3.src.tar.gz tar xvf llvm-3.3.src.tar.gz cd llvm-3.3.src/tools tar xvf ../../cfe-3.3.src.tar.gz mv cfe-3.3.src clang # tar xvf ../../lldb-3.3.src.tar.gz # mv lldb-3.3.src/ lldb cd .. cd projects tar xvf ../../compiler-rt-3.3.src.tar.gz mv compiler-rt-3.3.src/ compiler-rt cd .. ./configure --enable-optimized --prefix=/usr/local make -j4 sudo make install # Install does not install scan-build and scan-view # Perform the copy, and/or put them on-path sudo mkdir /usr/local/bin/scan-build sudo cp -r tools/clang/tools/scan-build /usr/local/bin sudo mkdir /usr/local/bin/scan-view sudo cp -r tools/clang/tools/scan-view /usr/local/bin ############## # 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 ############## # 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 -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general