[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6156-g094ec9b

Török Edvin edwin at clamav.net
Sun Apr 4 01:23:27 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit bbbb6626e64173a01100a7bccb680e76ed9a76c4
Author: Török Edvin <edwin at clamav.net>
Date:   Fri Mar 19 19:55:54 2010 +0200

    set numthreads to 1 in LLVM's check when running on old Python.
    
    Otherwise it just fails on multicore systems due to a race-condition
    in python <2.5.

diff --git a/libclamav/c++/llvm/utils/lit/lit/lit.py b/libclamav/c++/llvm/utils/lit/lit/lit.py
index f1f19c4..436f8e7 100755
--- a/libclamav/c++/llvm/utils/lit/lit/lit.py
+++ b/libclamav/c++/llvm/utils/lit/lit/lit.py
@@ -411,7 +411,14 @@ def main():
         gSiteConfigName = '%s.site.cfg' % opts.configPrefix
 
     if opts.numThreads is None:
-        opts.numThreads = Util.detectCPUs()
+# Python <2.5 has a race condition causing lit to always fail with numThreads>1
+# http://bugs.python.org/issue1731717
+# I haven't seen this bug occur with 2.5.2 and later, so only enable multiple
+# threads by default there.
+       if sys.hexversion >= 0x2050200:
+               opts.numThreads = Util.detectCPUs()
+       else:
+               opts.numThreads = 1
 
     inputs = args
 
diff --git a/libclamav/c++/llvmcheck.sh b/libclamav/c++/llvmcheck.sh
index 29b8720..f49723a 100755
--- a/libclamav/c++/llvmcheck.sh
+++ b/libclamav/c++/llvmcheck.sh
@@ -5,9 +5,4 @@ cp lli llc llvm-as not count FileCheck tblgen llvm-dis llvm/Release/bin/
 cp lli llc llvm-as not count FileCheck tblgen llvm-dis llvm/Debug/bin/
 $GMAKE -v || { echo "GNU make not found, skipping LLVM tests"; exit 77; }
 python -V || { echo "Python not found, skipping LLVM tests"; exit 77; }
-python <<EOF
-import sys
-if sys.hexversion < 0x2050000: sys.exit(1)
-EOF
-test $? -eq 0 || { echo "Python version older than 2.5, skipping LLVM tests"; exit 77; }
 exec $GMAKE -C llvm check-lit TESTSUITE="CodeGen ExecutionEngine Integer Verifier"

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list