just compiled .exe will crash before first instruction

Xavier Pianet xavier.pianet@lusis.fr
Fri Mar 22 05:18:00 GMT 2002


Hi,

I'm porting a large application from linux to cygwin.
The app is made of several static libraries and an exe that link to all =
of them.
the build process goes smoothly and the libs/exe are built with no =
trouble.

But the if i try to run the new exe i get (sory in french):
VOTRE APPLICATION A PROVOQUE UNE CORRUPTION MEMOIRE
AX : 0000000000000000
Aborted (core dumped)
(something like YOUR APP  CORRUPTED THE MEMORY)

if i try the same under gdb and put a breakpoint in main :
This GDB was configured as "i686-pc-cygwin"...
(gdb) b main
Breakpoint 1 at 0x401ef4: file tg_main_src/tg_mainStartup.cxx, line 49.
(gdb) r
Starting program: /TANGO/tg_disp_03.00/bin/cygwin/tg_disp.exe

Breakpoint 1, main (argc=3D1, argv=3D0xa011870)
    at tg_main_src/tg_mainStartup.cxx:49
49      {
Current language:  auto; currently c++
(gdb) s
VOTRE APPLICATION A PROVOQUE UNE CORRUPTION MEMOIRE
AX : 0000000000000000
    187 [sig] tg_disp 1184 open_stackdumpfile: Dumping stack trace to =
tg_disp.ex
e.stackdump

Program exited with code 0303000.

So it looks like i can't event go to the first line of real code...

PS : a simple hello_world.c compiles and runs OK, same for a =
hello_world.cxx
the compile options are :

for each .o of static libraries=20
g++ -g -D__unix__ -Wall -Wmissing-prototypes -pipe -D_THREAD_SAFE =
-I./include  -c tg_bus/divers.cxx -o tmp/cygwin/divers.o
ar -rc lib/cygwin/static_lib.a tmp/cygwin/divers.o

for exe
g++ -g -D__unix__ -Wall -Wmissing-prototypes -pipe -D_THREAD_SAFE -o =
tg_disp tg_disp.cxx -L./lib/cygwin -L/usr/local/lib -Lstaticlibs -ltgsys =
-ltgloaddic -ltgbus -ltgdisp

What am i doint wrong ?

stack trace :

Stack trace:
Frame     Function  Args
0022F0D4  77E73B5B  (00000000, 78499DA7, 0022F174, 6105A669)
0022F124  6105A99E  (00000000, 0056BF2C, 0000FFFC, 005A765C)
0022F164  61058105  (000004A0, 00000006, 00000000, 00560400)
0022F1A4  61058342  (000004A0, 00000006, 0022F204, 61058789)
0022F1C4  610581CA  (00000006, 00000000, 0022F204, 61058754)
0022F204  6105879F  (0022F2F8, 00000002, 0022F34C, 0022F234)
0022F224  00402DD7  (00000000, 0055B55D, 0000FFA8, 005A6CFC)
0022F254  0056C7DD  (0022F350, 00000000, 0022F2A4, 0055B98E)
0022F2A4  0056B555  (0022F2F4, 00000002, 00000000, 0040DBAF)
0022F384  0040DCE1  (006E32C0, 00000000, 00000000, 00000000)
0022F6E4  0040C21C  (006E32C0, 00000000, 00000000, 00000000)
0022F704  00487E85  (00000001, 0000FFFF, 0022F7CC, 77E82D15)
0022F724  00488295  (00000004, 610A0368, 000004A0, 000004FC)
0022F744  61002A7F  (005C65A4, 00000000, 0022F764, 00566C79)
0022F764  6100431E  (00000004, 610A0368, 00000000, 0022F7B4)
0022FD64  00401F0A  (00000001, 0A011870, 0A010278, 00000000)
End of stack trace (more stack frames may be present)


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list