Re: [PATCH] Fix numademo segfault issue

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

 



Thanks. rc3 works well on my system.

Kent
On Tue, Jul 29, 2008 at 11:12:11AM -0500, Cliff Wickman wrote:
> On Tue, Jul 22, 2008 at 04:54:13PM +0800, Kent Liu wrote:
> > Hello,
> > 
> > numademo will crash if some options are added. For example, a simple
> > "numademo -c 20m memcpy" will cause a segmentation fault after memcpy
> > tests completed. 
> > 
> > This issue has been there for long time as I can see it in both SuSE
> > and RHEL distros, and 2.0.2-rc2 package.
> > 
> > This patch fixes the segfault by adjusting variable ac to avoid array
> > index overflow.
> > 
> > Signed-off-by: Kent Liu <kent.liu@xxxxxxxxxxxxxxx>
> > ---
> >  numademo.c |    1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/numademo.c b/numademo.c
> > index df937d5..0dd5476 100755
> > --- a/numademo.c
> > +++ b/numademo.c
> > @@ -448,6 +448,7 @@ int main(int ac, char **av)
> >  	int simple_tests = 0;
> >  	
> >  	while (av[1] && av[1][0] == '-') { 
> > +		ac--;
> >  		switch (av[1][1]) { 
> >  		case 'c': 
> >  			delim = ","; 
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-numa" in
> > the body of a message to majordomo@xxxxxxxxxxxxxxx
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> and
> 
> > Original Min/Max in numademo output is confusing. The 'Min' meant the
> > minimum time the operation have been occupied, while the printed numbers
> > are bandwidth data, which has reversed meaning in terms of quantity.
> >
> > Reverting Min/Max in the print message is better.
> 
> I merged both of your patches.
> It passes "make test" on an Altix.
> If you would, please test ftp://oss.sgi.com/www/projects/libnuma/download/
> numactl-2.0.2-rc3.tar.gz
> 
> Thanks.
> 
> -Cliff
> -- 
> Cliff Wickman
> Silicon Graphics, Inc.
> cpw@xxxxxxx
> (651) 683-3824
> --
> To unsubscribe from this list: send the line "unsubscribe linux-numa" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-numa" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]     [Devices]

  Powered by Linux