[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.0.0-43-g1fdbc19



The following commit has been merged in the master branch:
commit 1fdbc1995439918cd4126fd61c19f92eae025c3a
Author: Adam D. Barratt <adam@adam-barratt.org.uk>
Date:   Mon Nov 17 21:39:58 2008 +0000

    Flag shlibs which call {_,}exit() (Closes: #504257)
    
    * checks/shared-libs{,.desc}:
      + Add an experimental tag flagging shared libraries that call
        _exit() or exit() without at some point calling fork() (a somewhat
        inaccurate heuristic, but one which should weed out a number of
        false positives).

diff --git a/checks/shared-libs b/checks/shared-libs
index ce31bda..f8e4a9e 100644
--- a/checks/shared-libs
+++ b/checks/shared-libs
@@ -107,6 +107,11 @@ for my $cur_file (sort keys %{$info->index}) {
             tag "shlib-with-non-pic-code", "$cur_file";
         }
 
+	my @symbol_names = map { @{$_}[2] } @{$info->objdump_info->{$cur_file}->{SYMBOLS}};
+	if (grep /^_?exit$/, @symbol_names and !grep /^fork$/, @symbol_names) {
+	    tag "shlib-calls-exit", "$cur_file";
+	}
+
         # don't apply the permission checks to links
         # since this only results in doubled messages
         if ($cur_file eq $real_file) { 
diff --git a/checks/shared-libs.desc b/checks/shared-libs.desc
index 6ff9e82..0bdd832 100644
--- a/checks/shared-libs.desc
+++ b/checks/shared-libs.desc
@@ -349,3 +349,17 @@ Severity: important
 Certainty: certain
 Info: The symbols control file contains dependency and symbol information
  for a shared library which is not listed in the shlibs control file.
+
+Tag: shlib-calls-exit
+Severity: normal
+Certainty: possible
+Experimental: yes
+Info: The listed shared library calls the C library exit() or _exit()
+ functions.
+ .
+ In the case of an error, the library should instead return an appropriate
+ error code to the calling program which can then determine how to handle
+ the error, including performing any required clean-up.
+ .
+ In most cases, removing the call should be discussed with upstream,
+ particularly as it may produce an ABI change.
diff --git a/debian/changelog b/debian/changelog
index 66914a5..3298ca5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,9 @@
 lintian (2.1.0) unstable; urgency=low
 
+  * Summary of tag changes:
+    + Added
+      - shlib-calls-exit
+
   * checks/common_data.pm:
     + [FL] New variable $known_shells_regex which matches known shell
       names.  This removes some synchronisation issues between the
@@ -26,11 +30,15 @@ lintian (2.1.0) unstable; urgency=low
       (Closes: #498892)
   * check/scripts:
     + [FL] Use $known_shells_regex from common_data.
-  * checks/shared-libs:
+  * checks/shared-libs{,.desc}:
     + [ADB] Don't issue both symbols-file-contains-debian-revision and
       symbols-file-contains-current-version-with-debian-revision for any
       given symbol, as the latter implies the former and may thus create
       noise in the tests' output.  (Closes: #505826)
+    + [ADB] Add an experimental tag flagging shared libraries that call
+      _exit() or exit() without at some point calling fork() (a somewhat
+      inaccurate heuristic, but one which should weed out a number of
+      false positives).  (Closes: #504257)
   
   * collection/objdump-info:
     + [ADB] Only use readelf to emulate objdump if objdump returned "file

-- 
Debian package checker


Reply to: