X-MimeOLE: Produced By Microsoft Exchange V6.5
Received: by onstor-exch02.onstor.net 
	id <01C78778.6193FD46@onstor-exch02.onstor.net>; Wed, 25 Apr 2007 13:29:10 -0700
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-class: urn:content-classes:message
Subject: RE: Puhleeze reeevue
Date: Wed, 25 Apr 2007 13:29:14 -0700
Message-ID: <BB375AF679D4A34E9CA8DFA650E2B04E036D3162@onstor-exch02.onstor.net>
In-Reply-To: <20070425132710.6c328922@ripper.onstor.net>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Puhleeze reeevue
Thread-Index: AceHeBn15skMQQXRR82ZR8eB2t5F8wAAETxw
References: <20070425110122.6c306c49@ripper.onstor.net><BB375AF679D4A34E9CA8DFA650E2B04E036D2FEB@onstor-exch02.onstor.net><20070425112039.15243d9e@ripper.onstor.net><BB375AF679D4A34E9CA8DFA650E2B04E036D3010@onstor-exch02.onstor.net><20070425114446.4b5f4df9@ripper.onstor.net><BB375AF679D4A34E9CA8DFA650E2B04E036D306A@onstor-exch02.onstor.net> <20070425132710.6c328922@ripper.onstor.net>
From: "Maxim Kozlovsky" <maxim.kozlovsky@onstor.com>
To: "Andy Sharp" <andy.sharp@onstor.com>

ok

-----Original Message-----
From: Andy Sharp=20
Sent: Wednesday, April 25, 2007 1:27 PM
To: Maxim Kozlovsky
Subject: Re: Puhleeze reeevue

The code seems perfectly clear to me.  Here, I'll comment it.

I've made a couple of more changes.  Tell me what you think now.

a

On Wed, 25 Apr 2007 11:48:13 -0700 "Maxim Kozlovsky"
<maxim.kozlovsky@onstor.com> wrote:

> The change to memset is for code clarity, not for fixing the problem.
> The change from * to [] fixes the problem.
>=20
> -----Original Message-----
> From: Andy Sharp=20
> Sent: Wednesday, April 25, 2007 11:45 AM
> To: Maxim Kozlovsky
> Subject: Re: Puhleeze reeevue
>=20
> It segfault the very first time the "*on++ =3D ' ';" line attempts to
> execute.
>=20
> If you change to memset, it just segfaults inside memset.
>=20
>=20
> On Wed, 25 Apr 2007 11:22:58 -0700 "Maxim Kozlovsky"
> <maxim.kozlovsky@onstor.com> wrote:
>=20
> > Ok.=20
> >=20
> > Can you change this code:
> >=20
> > 				if (on) {
> > 					int s =3D 6;
> >=20
> > 					while (s--) {
> > 						*on++ =3D ' ';
> > 					}
> > 				}
> >=20
> > To=20
> > 	If (on) {
> > 		Memset(on, ' ', strlen("onstor"));
> > 	}
> >=20
> > Hard to figure if you set the required number of spaces correctly
> > with all those -- and ++.
> >=20
> > -----Original Message-----
> > From: Andy Sharp=20
> > Sent: Wednesday, April 25, 2007 11:21 AM
> > To: Maxim Kozlovsky
> > Subject: Re: Puhleeze reeevue
> >=20
> > I guess it was placing the string in const memory area.  So when
> > code attempting to modify it was executed, it segfaulted.
> >=20
> >=20
> > On Wed, 25 Apr 2007 11:11:00 -0700 "Maxim Kozlovsky"
> > <maxim.kozlovsky@onstor.com> wrote:
> >=20
> > > What exactly was the reason for segfaulting?=20
> > >=20
> > > -----Original Message-----
> > > From: Andy Sharp=20
> > > Sent: Wednesday, April 25, 2007 11:01 AM
> > > To: Maxim Kozlovsky
> > > Subject: Puhleeze reeevue
> > >=20
> > > change 23713 branch FB-DELOREAN client ripper
> > >=20
> > > Fix for segfault when doing a system copy all from new flash
> > > layout to old flash layout.
> > >=20
> > > Somewhere, somehow, this code used to work, and now in Delorean
> > > rc13 it is segfaulting when trying to modify a character array
> > > created this way:
> > >=20
> > > char *foo =3D "bar";
> > >=20
> > > but is not segfaulting if I change it to
> > >=20
> > > char foo[] =3D "bar";
> > >=20
> > > for obvious reasons, so that's what I did.  In the meantime, code
> > > scanning revealed a couple of other bug fixes that I threw in.
> > >=20
> > > Would like your opinion on why this worked once and suddenly
> > > stopped working in Delorean rc13.
