home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.misc
- Path: sparky!uunet!ods!scott
- From: scott@ods.com (Scott Harper)
- Subject: DLL trashing App's Data Segment?
- Message-ID: <1992Aug12.145332.24382@ods.com>
- Organization: Optical Data Systems, Inc.
- X-Newsreader: Tin 1.1 PL3
- Date: Wed, 12 Aug 1992 14:53:32 GMT
- Lines: 37
-
- Hi -
-
- We've been experiencing a very strange, yet serious problem...
-
- First the details -- MSC 6.0, WINSDK 3.1, protected mode (rc -t)
-
- We have an application which makes use of at least 4 user-written
- DLLs. Under certain circumstances, when certain functions in the
- DLLs are called, some of the variables in the application's data
- segment get trashed. This doesn't cause a protection error (immediately)
- because it is inside the app's DS. (If it happens to be a pointer
- that gets trashed, I get a GPF the next time I access it...)
-
- As I rearrange code in the offending DLL(s), different variables in
- the app's DS appear to get corrupted. When I do a memory dump around
- the corrupted variable, everything else but the one location seems to
- be OK.
-
- Some of the DLLs make use of their own DS for static data inside of
- them, but none of them have a stack segment. (I say that, but we haven't
- done anything to explicitly say no SS, we just don't give a stack size
- in the module defintion file). Also, some of the DLLs have (at times)
- been compiled in different memory models than the app, but all passed
- pointers are explicitly declared as FAR.
-
- When I trace though with CV, setting a watch on the variable that's
- getting trashed, it always gets trashed when I step over a Windows
- call, eg MessageBox or SetWindowPos...
-
- I know this is a little vague, but it would take a long explanation
- to describe everything exactly... If someone out there has seen this
- before and/or needs more detail, I would be happy to provide it...
-
- --
- Scott Harper Optical Data Systems, Inc.
- scott@ods.com 1101 E. Arapaho Road
- (214) 234-6400 Richardson, TX 75081
-