Subject: Very early segfault
From: [email-masked] (Bates, Rod)

30 Sep 1998 17:57:37 -0700
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain
To: "[email-masked]'" <[email-masked]>

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
"[email-masked]" with one line of text: "help".