[Box Backup-dev] Where to put my bug fixes?
Nick Knight
boxbackup-dev@fluffy.co.uk
Mon, 31 Jul 2006 10:45:51 +0100
Hello all,
I know have now 3 bugs found in box backup 0.10, 1 specific to Windows
and 2 general. All large file issues, which from my tests means any
platform are not capable of backing up or restoring files >2GB.
I know last time I worked on box I had a branch in SVN for my work, so
where is best to put my work now? This branch is quite old etc.
Also just a suggestion, but in previous development teams I have worked
on, they created branches for areas of work, so for example
- Win 32 development
- General bugs for next release
- Gui branch (etc etc)
Just an idea?
Regards
Nick
PS
I had my fist encounter of GDB during these search for bugs, I have to
say in my opinion the worst debugger I have ever used!!=20
PPS - here are the bugs:
Bugs found
Win32 specific
The emu called into the supplied stat structure, which the size of file
size was only 32 bit. There is a way with the Win32 headers to exclude
their structure and create our own, which support 64 bit addressing.
General
Bug 1.=20
In lib/backupclient/BackupStoreFileEncodeStream.cpp line 270:
} while(rBlockSizeOut <=3D (BACKUP_FILE_MAX_BLOCK_SIZE/2) &&
rNumBlocksOut > BACKUP_FILE_INCREASE_BLOCK_SIZE_AFTER);
//BUG - Nick Knight 24-07-2006
//Not sure whether this is the fix or the backupstorefile.cpp is
the problem, they
//certainly do not match...
//added divide by 2.
This on the client created blocks which the restore did not like the
block size (this could also be fixed on the restore - but it appeared to
be sensible to fix it here.
Bug 2.
In /lib/common/ReadGatherStream.cpp
// Anything in the current block?
if(mPositionInCurrentBlock <
mBlocks[mCurrentBlock].mLength)
{
// Read!
pos_type s =3D mBlocks[mCurrentBlock].mLength -
mPositionInCurrentBlock;
if(s > bytesToRead) s =3D bytesToRead;
int r =3D
mComponents[mBlocks[mCurrentBlock].mComponent]->Read(buffer, s,
Timeout);
The pos_type s =3D mBlocks[mCurrentBlock].mLength -
mPositionInCurrentBlock; var s was an int, when the server put a single
large file together, it places the whole file (data) as a single block
into the object, which means any read should be the same addressable
space.