Hi David, David Kalnischkies hat am Sun 13. Feb, 12:57 (+0100) geschrieben: > On Sat, Feb 12, 2011 at 16:33, Jörg Sommer <jo...@alea.gnuu.de> wrote: > > Me (powerpc) has the same problem. The problem is that in rred.cc:258 an > > incomplete object dyn is created, due to _error->PendingError() in > > contrib/mmap.cc:223 returns true. The object has the attribute Base=0 > > which is feed to mmap in contrib/mmap.cc:270 on object destruction. This > > call causes the segfault. > > > > I don't know if Base == 0 is a valid state for a DynamicMMap object and > > the destructor has to check this value or if there's something else > > rotten and Base == 0 signals a deeper broken state. > > It is a bad state as mmap creation shouldn't fail (as the error shows), but > we have a fallback for systems without mmap so failing with a segfault is > absolutely bad as we could use this fallback. (Fixed.)
But mmap did not fail, beause it's not available, but the requested memory region was to big; 2 GB, but I have only 800 MB. > It would be cool if someone with a big-endian machine could test the attached > diff which should fix this and related problems. > A tester wouldn't even need to install the self-built apt - building the tree > and running ./test/integration/test-pdiff-usage is enough to test it > (but you need to install weborf). It doesn't work. dyn->Data() is -1 when mmap failed; see mmap.cc:81. Wouldn't it be much cleaner to add a method valid_state() to DynamicMMap? And you have in include config.h in fileutl.cc, otherwise the constant WORDS_BIGENDIAN isn't defined. With these changes, the test passes. Bye, Jörg. -- Wer in einem gewissen Alter nicht merkt, dass er hauptsächlich von Idioten umgeben ist, merkt es aus einem gewissen Grunde nicht. (Curt Goetz)
signature.asc
Description: Digital signature http://en.wikipedia.org/wiki/OpenPGP