Mail Archives: cygwin/2001/10/02/10:47:57
Hi,
I am attempting to port a program that has the ability to
build an executable using either static libs or .dlls.
However, when I build/run this program with dlls, then it
gets a stackdump. I have put in lots of fprintf(stderr, "In ...());
type messages, and what it looks like, is that one
global class is actually being relocated or something equally
wierd.....
Here is a snippet of the relevant logs, with some explanation:
from static build:
in pkgSystem() // Global constructor
in debSystem() // Global constructor
In Configuration() // Global constructor
this = 0xA06D0F8 // Address of (*this) (Duh)....
_config = 0x0 // Global object that this constructor is constructing
Root = 0xA06D108 // Address of private data item being allocated (new)
_config = 0xA06D0F8 // Address of object in main()
_config = 0xA06D0F8 // Address of object in main() again (make sure it isn't corrupted)
In pkgInitConfig(), Cnf = 0xA06D0F8 // Initialization function called. Notice Cnf = this above
In Configuration::Set(Name = 'APT::Architecture', Value = 'cygwin-i386')
this = 0xA06D0F8 // Within an object method. same (*this)
Root = 0xA06D108 // Same private data address
Entering Configuration::Lookup(const char *Name='APT::Architecture', Create = '1
')
this = 0xA06D0F8
Root = 0xA06D108
Non-null NAME
Root = 0xa06d108
Here is the same output, but generated by an exe that uses dlls
(pkgSystem, debSyste, and Configuration are contained w/in the dll)
in pkgSystem()
in debSystem()
In Configuration()
this = 0xA06D0F8
_config = 0x0
Root = 0xA06D108
_config = 0x355425FF // Notice that this address DOES NOT match (*this) above
_config = 0x355425FF
In pkgInitConfig(), Cnf = 0x355425FF
In Configuration::Set(Name = 'APT::Architecture', Value = 'cygwin-i386')
this = 0x355425FF
// At this point, Root is Null, and program stackdumps....
Has anyone seen behaviour like this, or has any ideas as to why this might be happening???
any thoughts/leads/pointers would be appreciated.....
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -