浏览代码

Dpkg::Vendor::Debian: Disable thread sanitizer when address is enabled

These are mutually incompatible, prefer the address sanitizer when both
are enabled at the same time.
Guillem Jover 11 年之前
父节点
当前提交
227b930b29
共有 2 个文件被更改,包括 8 次插入 和 0 次删除
  1. 3 0
      debian/changelog
  2. 5 0
      scripts/Dpkg/Vendor/Debian.pm

+ 3 - 0
debian/changelog

@@ -23,6 +23,9 @@ dpkg (1.18.2) UNRELEASED; urgency=low
       File::Spec in Dpkg::Source::Package::V2.
     - Do not exclude pre-existing symlinks when unpacking the debian/ tarball
       in Dpkg::Source::Package::V2. Closes: #790073, #791535
+    - Disable the thread sanitizer when the address sanitizer is enabled
+      in Dpkg::Vendor::Debian as these are mutually incompatible, and make
+      sanitize=+all not work at all.
   * Documentation:
     - Fix grammar in dpkg-architecture(1).
       Thanks to Chris Lamb <lamby@debian.org>. Closes: #787616

+ 5 - 0
scripts/Dpkg/Vendor/Debian.pm

@@ -185,6 +185,11 @@ sub _add_sanitize_flags {
     $self->_parse_feature_area('sanitize', \%use_feature);
 
     # Handle logical feature interactions.
+    if ($use_feature{address} and $use_feature{thread}) {
+        # Disable the thread sanitizer when the address one is active, they
+        # are mutually incompatible.
+        $use_feature{thread} = 0;
+    }
     if ($use_feature{address} or $use_feature{thread}) {
         # Disable leak sanitizer, it is implied by the address or thread ones.
         $use_feature{leak} = 0;