delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
Sender: | cygwin-owner AT sourceware DOT cygnus DOT com |
Delivered-To: | mailing list cygwin AT sourceware DOT cygnus DOT com |
Message-ID: | <36E5ACAF.14C789B2@t-online.de> |
Date: | Wed, 10 Mar 1999 00:20:15 +0100 |
X-Mailer: | Mozilla 4.05 [de]C-NECCK (Win95; I) |
MIME-Version: | 1.0 |
To: | cygwin AT sourceware DOT cygnus DOT com |
Subject: | STATUS_ACCESS_VIOLATION in egcs-1.1.1 (cygwin) compiled program |
X-Sender: | 0821520043-0001 AT t-online DOT de |
From: | Thomas DOT Pfuff AT t-online DOT de (028587726-0001) |
--------------941703807BD44F163694C054 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit The following program crashes with STATUS_ACCESS_VIOLATION when returning a class. Its compiled with egcs-2.91.60 in Cygnus b20.1. It does not crash in a LINUX System, compiled with the same Version of the egcs compiler. If I'm a stupid, tell me. gcc -v -o dump dump.cpp Reading specs from D:/CYGNUS/CYGWIN~1/H-I586~1/BIN/../lib/gcc-lib/i586-cygwin32/egcs-2.91.60/specs gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release) D:/CYGNUS/CYGWIN~1/H-I586~1/BIN/../lib/gcc-lib/i586-cygwin32/egcs-2.91.60/cpp.exe -lang-c++ -v -iprefix D:/CYGNUS/CYGWIN~1/H-I586~1/BIN/../lib/gcc-lib/i586-cygwin32/egcs-2.91.60/ -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=91 -Di386 -D_WIN32 -DWINNT -D_X86_=1 -D__STDC__=1 -D__stdcall=__attribute__((__stdcall__)) -D__cdecl=__attribute__((__cdecl__)) -D__declspec(x)=__attribute__((x)) -D__i386__ -D_WIN32 -D__WINNT__ -D_X86_=1 -D__STDC__=1 -D__stdcall=__attribute__((__stdcall__)) -D__cdecl=__attribute__((__cdecl__)) -D__declspec(x)=__attribute__((x)) -D__i386 -D__WINNT -Asystem(winnt) -Acpu(i386) -Amachine(i386) -D__EXCEPTIONS -remap -Asystem(unix) -Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__ -Di586 -Dpentium -D__i586 -D__i586__ -D__pentium -D__pentium__ -D__CYGWIN32__ -D__CYGWIN__ dump.cpp C:\WINDOWS\TEMP/cctTgmB3.ii GNU CPP version egcs-2.91.60 19981201 (egcs-1.1.1 release) (80386, BSD syntax) #include "..." search starts here: #include <...> search starts here: D:/CYGNUS/CYGWIN~1/H-I586~1/BIN/../lib/gcc-lib/i586-cygwin32/egcs-2.91.60/../../../../../include/g++ D:/CYGNUS/CYGWIN~1/H-I586~1/BIN/../lib/gcc-lib/i586-cygwin32/egcs-2.91.60/../../../../../include D:/CYGNUS/CYGWIN~1/H-I586~1/BIN/../lib/gcc-lib/i586-cygwin32/egcs-2.91.60/../../../../i586-cygwin32/include D:/CYGNUS/CYGWIN~1/H-I586~1/BIN/../lib/gcc-lib/i586-cygwin32/egcs-2.91.60/include End of search list. D:/CYGNUS/CYGWIN~1/H-I586~1/BIN/../lib/gcc-lib/i586-cygwin32/egcs-2.91.60/cc1plus.exe C:\WINDOWS\TEMP/cctTgmB3.ii -quiet -dumpbase dump.cc -version -o C:\WINDOWS\TEMP/ccvN2ZO6.s GNU C++ version egcs-2.91.60 19981201 (egcs-1.1.1 release) (i586-cygwin32) compiled by GNU C version egcs-2.91.60 19981201 (egcs-1.1.1 release). D:/CYGNUS/CYGWIN~1/H-I586~1/BIN/../lib/gcc-lib/i586-cygwin32/egcs-2.91.60/../../../../i586-cygwin32/bin/as.exe -o C:\WINDOWS\TEMP/ccno1tcm.o C:\WINDOWS\TEMP/ccvN2ZO6.s D:/CYGNUS/CYGWIN~1/H-I586~1/BIN/../lib/gcc-lib/i586-cygwin32/egcs-2.91.60/collect2.exe -o dump.exe D:/CYGNUS/CYGWIN~1/H-I586~1/BIN/../lib/gcc-lib/i586-cygwin32/egcs-2.91.60/../../../../i586-cygwin32/lib/crt0.o -LD:/CYGNUS/CYGWIN~1/H-I586~1/BIN/../lib/gcc-lib/i586-cygwin32/egcs-2.91.60 -LD:/CYGNUS/CYGWIN~1/H-I586~1/BIN/../lib/gcc-lib -LD:/CYGNUS/CYGWIN~1/H-I586~1/BIN/../lib/gcc-lib/i586-cygwin32/egcs-2.91.60/../../../../i586-cygwin32/lib -LD:/CYGNUS/CYGWIN~1/H-I586~1/BIN/../lib/gcc-lib/i586-cygwin32/egcs-2.91.60/../../.. C:\WINDOWS\TEMP/ccno1tcm.o -lgcc -lcygwin -lkernel32 -ladvapi32 -lshell32 -lgcc ./dump [main] E:\SOURCEN\DUMP_CYGNUS\DUMP.EXE 1104 (0) handle_exceptions: Exception: STATUS_ACCESS_VIOLATION [main] DUMP 1104 (0) handle_exceptions: Dumping stack trace to DUMP.EXE.core My program: int return1() {return 1;} struct B { int i; B() {i=1;} ~B() {} }; B returnB() { B erg; return erg; }; void test() { for(int k=0;k<2;k++) { returnB(); int d=return1()+return1(); } } void main(void) { test(); } Every line seems to be important ! Thanks for the delightfull compiler and cygwin. --------------941703807BD44F163694C054 Content-Type: application/x-unknown-content-type-cppfile; name="dump.cpp" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="dump.cpp" aW50ICByZXR1cm4xKCkge3JldHVybiAxO30NCnN0cnVjdCBCIHsNCiAgaW50IGk7DQogIEIo KSB7aT0xO30NCiAgfkIoKSB7fQ0KfTsNCkIgcmV0dXJuQigpIHsNCiAgQiBlcmc7DQogIHJl dHVybiBlcmc7DQp9Ow0Kdm9pZCAgdGVzdCgpICB7DQogIGZvcihpbnQgaz0wO2s8MjtrKysp IHsgDQogICAgcmV0dXJuQigpOw0KICAgIGludCBkPXJldHVybjEoKStyZXR1cm4xKCk7IA0K ICB9IA0KfQ0Kdm9pZCBtYWluKHZvaWQpDQp7DQogIHRlc3QoKTsNCn0NCg== --------------941703807BD44F163694C054 Content-Type: text/plain; charset=us-ascii -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com --------------941703807BD44F163694C054--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |