On Wed, 13 Jun 2007 18:13:44 -0400 Giel van Schijndel <[EMAIL PROTECTED]> wrote: >Dennis Schridde schreef: >> There must have been some special assumption on Pumpkins heap >implementation >> which magically prevented eternal doom. Till now no one found >out how it >> worked that wonder. >> >I've got a very good clue on how that heap thingy worked in >preventing >segmentation faults. Since a HEAP_FREE never actually released the >memory back to the OS or to the malloc/free implementation we >simply >where never punished (by segfaults) if we _did_ access dangling >pointers >anyway. Now that we do use malloc&free however memory is much more >volatile (since all memory is now allocated from one pool rather >than >several dedicated pools), which makes memory to which dangling >pointers >point more likely to change in value, and thus become invalid to >whatever function uses it. Keep in mind though that with both the >heap >system as well as malloc/free the pointers where _wrong_, it's >just that >now we are able to actually debug them, and feel the pain >resulting from >lots of years where debugging wasn't performed.
I no think you right. It was correct, it was designs this way. In rev 990 muggenhor, removes checks for invalid pointers. Why? They do keep track of all objects in treap, and the macro remove of , #define PTRVALID(ptr, size) memPointerValid(ptr, size) did this work for us. Replace PTRVALID() with if(ptr)||==NULL) checks is not same thing what original does! Original will call memPointerValid(ptr, size). This then check if the block is in the treap. If yes, then IS valid pointer/object. If no, then object is NO valid, returns FALSE, calling routine returns back without doing anything. Now Crash in our cases, since pointer/object is NO NULL, which is the new check, so this is wrong. I debug full missions that crash on current (see bugs reports), and compare back to berlios versions. I then set breakpoints at code where current crash, and check pointers. I see 'invalids' pointers, and game deals with them as program to. This why I say just because you no like this design of original, no make it wrong? It worked for them fine did it not? -- Click for special offer on replacement windows - energy efficient http://tagline.hushmail.com/fc/CAaCXv1SRWqeB3jZeDH7xTcLPgTdhJYj/ _______________________________________________ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev