NetBSD-Bugs archive

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

Re: misc/49272: Patching with Coccinelle?: Deletion of unnecessary checks before specific function calls



The following reply was made to PR misc/49272; it has been noted by GNATS.

From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: misc/49272: Patching with Coccinelle?: Deletion of unnecessary
 checks before specific function calls
Date: Mon, 13 Oct 2014 04:48:45 +0000

 On Fri, Oct 10, 2014 at 10:15:00PM +0000, Markus.Elfring%web.de@localhost wrote:
  > Several functions perform input parameter validation before their
  > implementations will try further actions with side effects. Some
  > calling functions perform similar safety checks.
  > 
  > Functions which release a system resource are occasionally
  > documented in the way that they tolerate the passing of a null
  > pointer for example.  I do not see a need because of this fact that
  > a function caller repeats a corresponding check.
 
 Belt-and-suspenders checks are not a bad thing, especially if the
 tolerance of the library function is greater than that guaranteed by
 standards. (This is sometimes the case.)
 
 If these are going to be removed, ideally this should be done by the
 compiler, not at the source level.
 
  > Now I would like to propose such a change again.
  > 
  > 1. Extension of the test infrastructure for the analysis tool "Coccinelle"
  >    Semantic patch patterns can help to identify update candidates
  > also in the NetBSD source file hierarchy.
  > http://coccinelle.lip6.fr/
 
 What are you proposing to change? I see no actual proposal here, just
 a very broad suggestion.
 
  > 2. Clarification for some automated update suggestions
  >    My source code search approach found 462 functions with the help
  > of the software "Coccinelle 1.0.0-rc22" at least which might need
  > another review and corresponding corrections around NetBSD
  > 6.1.5. Further software development will point even more
  > potentially open issues out.
 
 It might help if you gave us the list of 462 functions.
 
 -- 
 David A. Holland
 dholland%netbsd.org@localhost
 


Home | Main Index | Thread Index | Old Index