[Top] [All Lists]

Re: [PATCH] xfstests: fix modulo-by-zero error in fsx

To: Alex Elder <aelder@xxxxxxx>
Subject: Re: [PATCH] xfstests: fix modulo-by-zero error in fsx
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Thu, 21 Jul 2011 09:13:45 +1000
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1311203055.2906.75.camel@doink>
References: <1311047353-23925-1-git-send-email-david@xxxxxxxxxxxxx> <1311203055.2906.75.camel@doink>
User-agent: Mutt/1.5.20 (2009-06-14)
On Wed, Jul 20, 2011 at 06:04:15PM -0500, Alex Elder wrote:
> On Tue, 2011-07-19 at 13:49 +1000, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@xxxxxxxxxx>
> > 
> > The recent fsx fixes has a logic error in the offset trimming code.
> > If a read is done when the file size is zero, then the logic error
> > causes a offset % 0 opertaion to occur. This causes fsx to get a
> > SIGFPE and die.
> > 
> > This was not discovered during my testing because I was using a
> > random seed that didn't trip this condition. Changing the seed to
> > that which test 091 uses (the default of 1) causes such an operation
> > to occur....
> > 
> > Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
> I realize you already committed this, but I'm finally
> getting around to reviewing it.
> I started composing this message, explaining how you
> should have done something differently.  But at this
> point it'll be more constructive to just send a patch
> against what you have already committed.  So that will
> be coming shortly...

Yeah, better to have something working that perfect. Feel free to
make it better ;)


Dave Chinner

<Prev in Thread] Current Thread [Next in Thread>