RE: Invalid Page Fault and Safe.e
- Posted by Virtual B <behaviorself at netzero.net> Apr 17, 2001
- 395 views
Robert Craig wrote: > Virtual B. writes: > > This is not just a problem with my program either. > > I've tried it with a lot of the programs that come with > > Win32Lib and get the same results. > > Safe.e can't be used with Win32Lib. > > A long time ago safe.e was able to catch subtle > memory corruption bugs in Win32Lib-based programs, > but that is no longer possible for two reasons: > > 1. The implementors of Win32Lib decided not to use > Euphoria's allocate() and free() but instead to > develop their own heap routines using direct calls to > WIN32 API routines. The reasons for this are not clear to me. > > 2. There are some places where Win32Lib > picks up the address of a block of memory from a call > to a C routine. They would have to call register_block() > and unregister_block() in safe.e to track this. > I'm not sure how much work would be involved here. > I've recently added a switch to safe.e that allows you > to not bother registering any external blocks, in exchange for > having a much weaker check on memory. In this case it > only checks the "gutter" areas just before and just after > each allocated block for corruption. Addresses that are > far removed from any allocated block would be > assumed safe. However this requires that > allocate() and free() actually be used (point #1). > > Regards, > Rob Craig > Rapid Deployment Software > http://www.RapidEuphoria.com > > > Thanks Rob. I still don't know what's causing the occasional invalid page fault, but at least I know I can't use Safe.e with Win32Lib apps. I thought something was seriously wrong on this end. I appreciate the input. Virtual B