delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/09/30/17:57:37

From: Rod DOT Bates AT wichita DOT boeing DOT com (Bates, Rod)
Subject: Very early segfault
30 Sep 1998 17:57:37 -0700 :
Message-ID: <6C7E2A10BB01D111929500400B406DDEE63931.cygnus.gnu-win32@xch-wch-02.ks.boeing.com>
Mime-Version: 1.0
To: "'gnu-win32 AT cygnus DOT com'" <gnu-win32 AT cygnus DOT com>

I sometimes get executables which segfault before the first
line of my code, at an address which gdb can't make anything
of.  The same source code runs on linux.  Some earlier versions
have worked on NT, duplicating the behaviour of their Linux
counterparts. 

More specifically, I get a dialog saying
'The instruction at "0x00371ab0" referenced memory at "0x00371ab0".  The
memory could not be "read".'  
With a breakpoint at the first line of my main program,
gdb says 'Program received signal SIGSEGV, Segmentation fault.
0x371ab0 in ?? ()'.  A bt command gives
'#0 0x371ab0 in ?? ()
Cannot access memory at address 0x308608.'

Visual C++, which happens to be installed also offers to debug
the program.  It says
'unhandled exception at 0xC0000005 access violation'
It also shows a disassembly listing starting at 371ab0, with
only '???' as the disassembly of each location.  

Extra background info:  This main program has parts
written in Ada  and compiled by gnat, and parts in
Modula-3, compiled by pm3-1.1.7.  Modula-3 has quite an
extensive runtime system.  It always behaves as expected
on Linux.  On NT, small changes in my code, well inside
routines called by by main program, seem to make this
segfault appear/disappear.  

Can anyone suggest a better method of tracking this down than unguided
random experiments? 

Rodney Bates 
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019