X-Sylpheed-Account-Id:1
S:andy.sharp@onstor.com
SCF:#mh/Mailbox/sent
X-Sylpheed-Sign:0
X-Sylpheed-Encrypt:0
X-Sylpheed-Privacy-System:
RMID:#imap/andys@onstor.net@onstor-exch02.onstor.net/INBOX	0	BB375AF679D4A34E9CA8DFA650E2B04E05CB873D@onstor-exch02.onstor.net
X-Sylpheed-End-Special-Headers: 1
Date: Wed, 3 Oct 2007 11:53:39 -0700
From: Andrew Sharp <andy.sharp@onstor.com>
To: "Charissa Willard" <charissa.willard@onstor.com>
Cc: "Brian DeForest" <brian.deforest@onstor.com>, Tim Gardner
 <tim.gardner@onstor.com>, Maxim Kozlovsky <maxim.kozlovsky@onstor.com>
Subject: Re: PERFORCE change 25711 for review
Message-ID: <20071003115339.5cab75b3@ripper.onstor.net>
References: <BB375AF679D4A34E9CA8DFA650E2B04E05CB873D@onstor-exch02.onstor.net>
Organization: Onstor
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

This seems to be the big knot with this push to fix all warnings coming
from this program.  Apparently the risk of making a broken change
to previously working code to satisfy these hypothetical problems is
greater than the reward.  And the bad part is that we might not find
the breakage as quickly as we found this one.  Perhaps the risk would
be substantially reduced if the programmers in question were more
capable.  I'm just sayin.  Or reviews done by more senior person, say,
someone in Campbell?  I have this nagging feeling I might be over
reacting, but I'm not sure.  I was never a proponent of spending the
money on this program, nor the resources devoted to it, blah-blah,
so that might be coloring my view.  Have we identified any huge bugs
that this software has found for us?

On Wed, 3 Oct 2007 10:52:31 -0700 "Charissa Willard"
<charissa.willard@onstor.com> wrote:

> Brian,
> 
>  
> 
> Rendell did a sync to the top of the tree and cannot run commands in
> the nfxsh. Rendell is running on bobcat/linux. He had to back out the
> changes in order to be able to use nfxsh.   
> 
>  
> 
> Also, as a general rule, if code is to be added to check for NULL, the
> variable should be initialized to NULL. I believe linux is more
> susceptible to this problem then BSD. The change to illustrate this
> case can be seen in /ssc-nfxsh/vtysh_config.c:
> 
>  
> 
> /* Read up configuration file from file_name. */
> 
> void
> 
> vtysh_read_config (char *config_file,
> 
>                  char *config_current_dir,
> 
>                  char *config_default_dir)
> 
> {
> 
>    char *cwd;
> 
>    FILE *confp = NULL;
> 
>    char *fullpath; <== fullpath pointer needs to be set to NULL here
> 
>    ...
> 
>  
> 
>    if (confp == NULL)
> 
>    {
> 
>       if(fullpath != NULL) { <== HCL added these 2 lines
> 
>          free(fullpath);
> 
>       }
> 
>       return; // S'OK if they don't have such a file
> 
>    }
> 
>    ...
> 
> }
> 
>  
> 
> -Charissa
> 
>  
> 
> Email from Rendell:
> 
>  
> 
> The latest change in vtysh_config.c has potential problems.  
> 
>  
> 
> 1. fullpath variable is not initialized prior to checking and freeing
> it in all cases.  (The else case when config_file is NULL in
> particular)
> 
>     Freeing some arbitrary non-null memory address is a bad thing
> indeed.
> 
>  
> 
> 2. fullpath should only be freed if it points to memory was previously
> allocated in this local routine.
> 
>  
> 
> 3. Potential memory leak at line 140.
> 
>  
> 
>  
> 
> ==== //depot/dev/nfx-tree/code/ssc-nfxsh/vtysh_config.c#3 -
> /homes/rendellf/dev/nfx-tree/code/ssc-nfxsh/vtysh_config.c ====
> 
> 154a155,157
> 
> >               if(fullpath != NULL) {
> 
> >                 free(fullpath);
> 
> >               }
> 
> 175a179,181
> 
> >   if(fullpath != NULL) {
> 
> >     free(fullpath);
> 
> >   }
> 
>  
> 
>  
> 
>  
> 
>  
> 
> -----Original Message-----
> From: Ken Renshaw 
> Sent: Wednesday, October 03, 2007 7:14 AM
> To: Amit Bothra; Andy Sharp; Brian DeForest; Charissa Willard; Chris
> Vandever; Danqing Jin; Deepak Veliath; Henry Lau; Ian Brown; Jobi
> Ariyamannil; Jonathan Goldick; Ken Renshaw; Larry Scheer; Maxim
> Kozlovsky; Mike Lee; Sandrine Boulanger; Tim Gardner
> Subject: PERFORCE change 25711 for review
> 
>  
> 
> Change 25711 by perforce@srinivasa-rfb-dev on 2007/10/03 02:11:52
> 
>  
> 
>        Some bugs from the checkers RESOURCE_LEAK, PW.SET_BUT_NOT_USED,
> 
>        TAINTED_SCALARS e.t.c have been resolved.
> 
>        Reviewed by perforce(prasanna).
> 
>  
> 
> Affected files ...
> 
>  
> 
> ... //depot/dev/nfx-tree/code/sm-raidctrl/raid-main.c#3 edit
> 
> ... //depot/dev/nfx-tree/code/sm-raidctrl/raid-ui.c#4 edit
> 
> ... //depot/dev/nfx-tree/code/sm-sct/sct.c#3 edit
> 
> ... //depot/dev/nfx-tree/code/sm-tape/mc-ui.c#4 edit
> 
> ... //depot/dev/nfx-tree/code/sm-tape/tape-main.c#3 edit
> 
> ... //depot/dev/nfx-tree/code/sm-tape/tape-sm.c#6 edit
> 
> ... //depot/dev/nfx-tree/code/ssc-cluster/cluster-dcache-api.c#3 edit
> 
> ... //depot/dev/nfx-tree/code/ssc-cluster/cluster-tape-api.c#3 edit
> 
> ... //depot/dev/nfx-tree/code/ssc-elog-shell/elog-shell.c#5 edit
> 
> ... //depot/dev/nfx-tree/code/ssc-nfxsh/vty.c#6 edit
> 
> ... //depot/dev/nfx-tree/code/ssc-nfxsh/vtysh_config.c#4 edit
> 
> ... //depot/dev/nfx-tree/code/ssc-rmc/rmc.c#6 edit
> 
> ... //depot/dev/nfx-tree/code/ssc-rmc/rmc_api.c#6 edit
> 
> ... //depot/dev/nfx-tree/code/ssc-rmc/rmc_mp.c#4 edit
> 
> ... //depot/dev/nfx-tree/code/ssc-rmc/rmc_server.c#5 edit
> 
>  
> 
>  
> 
> http://liszt:1818/@md=d&cd=//depot/$c=G35@/25711?ac=10
> 
