Matthew Lye wrote: > On 10-Sep-07, at 6:25 PM, Christian Biere wrote: > > > I've looked at it but could not really figure out what could be > > causing > > this. If you see such a crash again, please let us know. Otherwise > > I'll > > assume it was just some random crash. > > !!! Sorry for the hassle. I sort of assumed it was very obvious to > everyone else and you were waiting for me to figure it out. I should > have followed up on it. > As best I can figure, the problem was caused by a hackneyed attempt > to use dmesh_fill_alternate() with, um, an uninitialized gnet_host_t > pointer as the 'vector', which as far as I can tell means 'pointer to > the array that gets filled in'.
I can't quite follow you. Where do you see dmesh_fill_alternate() in this code path? > I would have identified this as a > mistake if I had caught it, but I didn't. Which code exactly looks dubious to you? I've quickly scanned over its uses and it looked fine. > My guess is that this > corrupted nearby memory structures for 'fi' and 'd', causing the last- > minute magic number check for whichever was checked first to fail. I agree that memory corruption from a bug like that is a likely cause and the bug could be anywhere. There are many consistency checks and apparently the first succeeded. So something shortly before the crash must have corrupted the fileinfo structure. This could have been caused by freeing memory through a dangling pointer or rather a corrupted pointer. In any case, as the bug in such cases has nothing to do with the crashing code, it helps to know whether the crash is reproducible. You could manually enable halloc by building with --enable-halloc because it can potentially catch certain bugs. -- Christian ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ gtk-gnutella-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel
