On Tue, 21 Jan 2003, Peter Jay Salzman wrote:

> hola lugod,
> 
> according to the electric fence man page, pages of dynamic memory
> which are free'd are returned back to the heap from whence they came.
> in other words, if you do nothing, efence won't detect access of free'd
> dynamic memory.

That doesn't preclude Linux from detecting it.  Accessing free memory
produces undefined results... sometimes the library may return the memory
to the OS, and other times not (a function of buffering optimization).  
If it is returned, then the OS has the freedom to mark the page as outside
the process again, such that accesses there yield the same result
(SIGSEGV) as efence's forced behavior.

0 = sometimes detect error
1 = always detect error

---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<[EMAIL PROTECTED]>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...2k
---------------------------------------------------------------------------

_______________________________________________
vox-tech mailing list
[EMAIL PROTECTED]
http://lists.lugod.org/mailman/listinfo/vox-tech

Reply via email to