Mail Archives: djgpp/1999/08/05/14:52:13
On Mon, 13 Jul 1998, Radu Georgescu aka skoola wrote:
> shouldn't _go32_dpmi_lock_data(...) lock the data so no other function
> may modify it until it is unlocked (and generate some protection fault
> error)?
No, locking data is not about protection, it's about virtual memory.
You lock a memory region to make sure it will never be paged out of
physical memory by the virtual memory mechanism. But locking memory
doesn't change anything in the access rights to that memory.
> i tried to use this in order to find the function that overwrites some
> data and this didn't work. any other ideas (except for parsing the whole
> code because it is too big and the error appairs only sometimes).
> thanks!!
Run the program under a debugger and put a data-write breakpoint
(a.k.a. watchpoint) at the address that gets overwritten. Then
whenever the overwrite happens, the debugger will kick in and show you
the offending code line.
- Raw text -