Subject: egcs1.0.2mingw32 c++ dll crashes @new
From: [email-masked] (Mark Salazar)

15 Jul 1998 01:22:09 -0700
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain
To: [email-masked]

One of my pet projects is building perl 5 modules with egcs.  My current 
roadblock is a module written in C++ which crashes perl with an access 
violation when run.  I've traced the execution to a point where 'new' is 
called to create an instance of a class (::cMom = new CMom;), and there is
no 
user-defined new operator.  I've also tried disabling the 
constructor by returning immediately ... no help.

I see 2 possibilities:
1)   the crash occurs in the act of calling or inside of __builtin_new;
2)   the crash occurs in the act of calling the constructor because its 
address is getting munged.

Things to consider:
- the module in question is built as a DLL which perl loads with 
LoadLibraryEx;
- perl itself contains no C++ code. Is memory allocation coordinated 
automatically between C and C++ code in gnu-win32/egcs?

At this point I'm stuck.  I don't know enough about the guts of egcs, and I 
haven't found an answer in the archives.

Anyone got any clues?

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".