I'm getting an access violation in gpc1.exe at 0x00578a24 during compile on Windows NT.
I'm using MinGW 2.0.0-3 with core gcc 3.2.1, and gpc 2.1 20020510 (from MinGW site).
The code is in the form of an include file. I tested it as a console application - and it works.
I've re-packaged so that it can be called from C, based on the gpc_c_pas.pas example.
Two integer functions are called, with all parameters being passed as double value and variable parameters.
Now I get a crash. Someone may have seen this crash before - any ideas?
Dr Watson produced this:
function: <nosymbols> 005789fb 0f84c7000000 je 00578ac8 00578a01 8b5e10 mov ebx,[esi+0x10] ds:02034226=???????? 00578a04 85db test ebx,ebx 00578a06 751c jnz 00578a24 00578a08 681a090000 push 0x91a 00578a0d 68d2895700 push 0x5789d2 00578a12 68a04a5700 push 0x574aa0 00578a17 68fb815700 push 0x5781fb 00578a1c e87bc30600 call 005e4d9c 00578a21 8d7600 lea esi,[esi] ds:02034226=???????? FAULT ->00578a24 f6430a80 test byte ptr [ebx+0xa],0x80 ds:0267a08e=?? 00578a28 0f848e000000 je 00578abc 00578a2e 837b1000 cmp dword ptr [ebx+0x10],0x0 ds:0267a08e=???????? 00578a32 7413 jz 00578a47 00578a34 833ddca65e0000 cmp dword ptr [005ea6dc],0x0 ds:005ea6dc=00000000 00578a3b 743f jz 00578a7c 00578a3d a1d8a65e00 mov eax,[005ea6d8] ds:005ea6d8=00a35790 00578a42 394338 cmp [ebx+0x38],eax ds:0267a08e=???????? 00578a45 7535 jnz 00578a7c 00578a47 83c4f8 add esp,0xf8 00578a4a 6820855700 push 0x578520 00578a4f 53 push ebx
Andrew.
------------------------------------------------------------------- This e-mail and any attachments may contain confidential and/or privileged material; it is for the intended addressee(s) only. If you are not a named addressee, you must not use, retain or disclose such information.
NPL Management Ltd cannot guarantee that the e-mail or any attachments are free from viruses.
NPL Management Ltd. Registered in England and Wales. No: 2937881 Registered Office: Teddington, Middlesex, United Kingdom TW11 0LW. -------------------------------------------------------------------
Andrew Gregory wrote:
I'm getting an access violation in gpc1.exe at 0x00578a24 during compile on Windows NT.
[...]
When I moved the const declarations into maincode.pas it compiled ok. Very strange.
If this was the only change made, this would be indeed very strange. Can you reproduce it both ways?
The "Dr Watson" output doesn't help much, since it doesn't contain symbols and the numbers don't tell me much. Can you try with gdb? Was the GPC binary build with debug info (`-g')?
Frank
Frank Heckenbach a écrit:
Andrew Gregory wrote:
I'm getting an access violation in gpc1.exe at 0x00578a24 during compile on Windows NT.
[...]
The "Dr Watson" output doesn't help much, since it doesn't contain symbols and the numbers don't tell me much. Can you try with gdb?
You can also install drmingw to replace DrWatson: il outputs symbolic information (at least for programs compiled with mingw). It is contained in the package mingw-utils-0.2.tar.gz
Maurice