Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: driver memory debugging

From: Erblichs <erblichs(at)earthlink.net>
Date: Fri Jul 18 2003 - 17:42:31 EDT

Trevor,

        If the stuct is your OWN, then my suggestions would be..

	0) Recompile everything first. This verifes that some
	   compile dependence that is not caught, because of a bug
	   in the makefile.
	1) Enlarge the struct and place the element part that
           is being re-written after the current location.
	   (everytime any value in the struct is modified, print
	    out the overwite struct element) You may be doing
	    a htonl on a short one element before or after the
	    overwrited element?? something simple..
	  
	2) Everytime you write to that location, write out the
	   previous value first.
	3) Place a softlock around it that is checked to verify
	   that two threads aren't simultaneously writing to
	   it.
	4) Use a temporary counter. Before each access decrement
	   the value and when you are done increment the value. If
	   the counter doesn't keep the same value before each access
	   then you have new entry or exits that are accessing that
	   struct.
	5) Anytime you free the struct write something like "abacad" into
	   it before you free it.

	6) If it is an unsigned int, try changing it to a signed int
	   and see if the access is different.

	7) Try printing the value before and after htons, ntohl, if
	   the value is being effected by some endian issue.
	   
	Hope something of this helps you in the right direction.. 
		:-) free advice..

	Mitchell Erblich
	Sr Software Engineer
	-----------------------------
	

	

Trevor Talbot wrote:
>
> I'm working with a network driver, and have encountered a strange
Received on Fri Jul 18 18:20:18 2003

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 13:48:43 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library