Mail Archives: djgpp/2001/04/18/11:45:13
more problems with MINGW port of gcc-2.95.2:
strw.c:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void)
{
char *bbb="ABCDefgh";
strlwr(bbb);
printf("%s\n",bbb);
return EXIT_SUCCESS;
}
#66:W98>gcc -c strw.c -g -W -Wall
#66:W98>gcc strw.o -o strw.exe -mwindows -mconsole
#66:W98>strw.exe
STRW verursachte einen Fehler durch eine ungültige Seite [error: invalid
page]
in Modul MSVCRT.DLL bei 016f:780259c0.
Register:
EAX=00401210 CS=016f EIP=780259c0 EFLGS=00010202
EBX=00530000 SS=0177 ESP=0253fd98 EBP=0253fda8
ECX=00401261 DS=0177 ESI=00000000 FS=4d47
EDX=00401210 ES=0177 EDI=00000000 GS=0000
Bytes bei CS:EIP:
88 0a 42 80 3a 00 75 e9 5f 5e c9 c3 bf a0 71 03
Stapelwerte: [stack values]
00000000 8184b424 00000000 00401270 0253fdd8 0040123e 00401210 00402004
0253fdd8 0040122b 0253fde4 8184037f 0253fe18 780042f4 00401210 0000023f
#66:W98>gdb strw.exe
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i386-mingw32"...
(gdb) r
Starting program: ./strw.exe
78000000:D:/W/98/SYSTEM/MSVCRT.DLL
bff70000:D:/W/98/SYSTEM/KERNEL32.DLL
Program received signal SIGSEGV, Segmentation fault.
0x780259c0 in _size_of_stack_reserve__ ()
(gdb)
But
(gdb) b main
Breakpoint 1 at 0x40122b: file strw.c, line 7.
(gdb) r
Starting program: ./strw.exe
78000000:D:/W/98/SYSTEM/MSVCRT.DLL
bff70000:D:/W/98/SYSTEM/KERNEL32.DLL
Breakpoint 1, main () at strw.c:7
7 char *bbb="ABCDefgh";
(gdb) s
9 strlwr(bbb);
(gdb) s
10 printf("%s\n",bbb);
abcdefgh
(gdb) s
11 exit(EXIT_SUCCESS);
(gdb) s
Program exited normally.
(gdb)
has anyone experienced crashig such a simple program ?
--
Gruss Waldemar Schultz.
Technische Universität München, Zentrum Mathematik M1, D 80290 München
Tel: +49 (0)89 2892 8226 FAX: +49 (0)89 2892 8228
- Raw text -