Explorar el Código

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 hace 11 años
padre
commit
227b930b29
Se han modificado 2 ficheros con 8 adiciones y 0 borrados
  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.
       File::Spec in Dpkg::Source::Package::V2.
     - Do not exclude pre-existing symlinks when unpacking the debian/ tarball
     - Do not exclude pre-existing symlinks when unpacking the debian/ tarball
       in Dpkg::Source::Package::V2. Closes: #790073, #791535
       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:
   * Documentation:
     - Fix grammar in dpkg-architecture(1).
     - Fix grammar in dpkg-architecture(1).
       Thanks to Chris Lamb <lamby@debian.org>. Closes: #787616
       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);
     $self->_parse_feature_area('sanitize', \%use_feature);
 
 
     # Handle logical feature interactions.
     # 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}) {
     if ($use_feature{address} or $use_feature{thread}) {
         # Disable leak sanitizer, it is implied by the address or thread ones.
         # Disable leak sanitizer, it is implied by the address or thread ones.
         $use_feature{leak} = 0;
         $use_feature{leak} = 0;