Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <000501c01e2d$f6506780$2c789fc1@local> From: Dr DOT Graef AT t-online DOT de (Albert Graef) To: Subject: STATUS_ACCESS_VIOLATION/segfault problems with cygwin 1.1.4 Date: Thu, 14 Sep 2000 11:26:39 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 X-Sender: 320094103318-0001 AT t-dialin DOT net I've been following the threads about STATUS_ACCESS_VIOLATION/segfault problems for some days now, since I had really bad troubles running a software which works without a hitch under Linux and mingw, and also used to work with previous gnuwin32/cygwin releases. I've been looking into it, and I am 100% sure that's it a problem with the latest cygwin release (maybe with the linker or ar, or with the system libraries, you experts know better ;-). The problem occurs whenever you build a static library and a program which is linked to both this library and libm.a. I can reproduce it with sources as simple as the following: *** Makefile: t: t.o libl.a gcc -o t t.o -lm -L. -ll t2: t2.o gcc -o t2 t2.o -lm libl.a: l.o ar cr $@ l.o # ranlib $@ clean: rm -f *.o *.a *.exe *** t.c: int main() { test("hello"); } *** l.c: #include void test(char *s) { puts(s); } --- The build process: $ make gcc -c -o t.o t.c gcc -c -o l.o l.c ar cr libl.a l.o gcc -o t t.o -lm -L. -ll Run the program: $ ./t 0 [main] T 1602 handle_exceptions: Exception: STATUS_ACCESS_VIOLATION 1084 [main] T 1602 stackdump: Dumping stack trace to T.EXE.stackdump Segmentation fault (core dumped) The same program works fine when the -lm is omitted: $ gcc -o t t.o -L. -ll $ ./t hello And it only happens when invoking the test() function from a separate library (the standard hello world program works), so probably it is not a problem with libm.a alone. My system is: Intel Pentium III-500/256 MB, Windows 98 SE (German), running cygwin 1.1.4, cygcheck -s gives: Win9X Ver 4.10 build 67766446 A. The gcc is 2.95.2, of course. Ok, I hope that you can figure this out... BTW, I also suspect that there's a problem with dlopen() in the latest cygwin, but I'll have to recheck once this problem is solved. Cheers, Albert Dr. Albert Graef Dr DOT Graef AT t-online DOT de, ag AT muwiinfa DOT geschichte DOT uni-mainz DOT de http://www.musikwissenschaft.uni-mainz.de/~ag -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com