Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Injected-Via-Gmane: http://gmane.org/ To: cygwin AT cygwin DOT com From: Sam Steingold Subject: Re: crash on the first statement in main() Date: 08 Jul 2003 18:43:14 -0400 Organization: disorganization Lines: 45 Message-ID: References: Reply-To: sds AT gnu DOT org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet AT main DOT gmane DOT org X-Attribution: Sam X-Disclaimer: You should not expect anyone to agree with me. User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 > * In message > * On the subject of "crash on the first statement in main()" > * Sent on 19 Jun 2003 18:27:49 -0400 > * I write: > > I get a segfault on the first executable line in main() (confirmed in > the debugger), both when produced by cygwin: > > gcc -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type > -Wno-sign-compare -falign-functions=4 -g -DDEBUG_OS_ERROR -DDEBUG_SPVW > -DSAFETY=3 -DUNICODE -DEXPORT_SYSCALLS -DDIR_KEY -DDYNAMIC_FFI > -DNO_SIGSEGV -I. -x none modules.o regexp.o regexi.o regex.o lisp.a > -lintl libcharset.a libavcall.a libcallback.a -lreadline -lncurses > -liconv -lm -o lisp.exe > ... > full/lisp.exe -B . -M base/lispinit.mem -norc -q -i regexp/regexp > -x (saveinitmem "full/lispinit.mem") > Signal 11 > make: *** [full] Error 1 > > and mingw: > > gcc -mno-cygwin -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit > -Wreturn-type -falign-functions=4 -D_WIN32 -g -DDEBUG_OS_ERROR > -DDEBUG_SPVW -DSAFETY=3 -DUNICODE -DEXPORT_SYSCALLS -DDIR_KEY > -DDYNAMIC_FFI -DNO_GETTEXT -DNO_SIGSEGV -I. -x none modules.o regexp.o > regexi.o regex.o lisp.a libcharset.a libavcall.a libcallback.a -luser32 > -lws2_32 -lole32 -luuid -o lisp.exe > full/lisp.exe -B . -M base/lispinit.mem -norc -q -i regexp/regexp > -x (saveinitmem "full/lispinit.mem") > > > the lines don't do anything special, in fact, "p " > executes just fine in gdb right after the crash. I forgot a crucial piece of information: the segfault happens only with "-g"! when I compile with "-O2", it works like a charm. -- Sam Steingold (http://www.podval.org/~sds) running w2k Daddy, what does "format disk c: complete" mean? -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/