Closed JoseQuintas closed 1 year ago
Hi José,
This could be real bug which I should fix but to do that I need small self contain example to reproduce it. If you can create it reducing the code which can be compiled and send the result here then I'll fix it. The code you sent is not enough to create final PP output which is passed to compiler.
best regards, Przemek
W dniu 3.05.2023 o 21:26, José M. C. Quintas pisze:
STATIC CLASS x INHERIT y
Ok, it is wrong, but this is error message when compiling with HBMK2
HBMK2 -w3 -es2 -m -n *.hbp -strip -compr -workdir=c:\temp -q -Id:\fontes\build\
hbmk2: Processing environment options: -comp=mingw hbmk2: Processing configuration: d:\harbour\bin\hbmk.hbc Harbour 3.2.0dev (r2304211101) Copyright (c) 1999-2021, https://harbour.github.io/
source\ze_boletopdf.prg:19: warning W0028 Unreachable code
source\ze_boletopdf.prg:19: error E0004 STATIC declaration follows executable statement
Unrecoverable error 6005: Exception error:
|Exception Code:C0000005 ACCESS_VIOLATION Exception Address:0068FF9F EAX:01327164 EBX:01327164 ECX:00000007 EDX:00000000 ESI:01327534 EDI:00000000 EBP:012F2984 CS:EIP:0023:0068FF9F SS:ESP:002B:00AEE330 DS:002B ES:002B FS:0053 GS:002B Flags:00010202 Exception Parameters: 00000000 00000004 CS:EIP: 8B 47 04 85 C0 74 1A 8B 47 08 89 58 14 89 5F 08 SS:ESP: 00000018 012F2984 00AEE518 0069B6FF 012F2984 008AC240 00000045 0000001E 0089978E 0134020C 012F2984 0000030F |
00AEE51C 00AEE700 00000000 0069D90A
|C stack: EIP: EBP: Frame: OldEBP, RetAddr, Params... |
Modules: 00400000 004EA000 d:\harbour\bin\hbmk2.exe 77990000 001A4000 C:\WINDOWS\SYSTEM32\ntdll.dll 765D0000 000F0000 C:\WINDOWS\System32\KERNEL32.DLL 77010000 00223000 C:\WINDOWS\System32\KERNELBASE.dll 763A0000 0007B000 C:\WINDOWS\System32\ADVAPI32.dll 76420000 000BF000 C:\WINDOWS\System32\msvcrt.dll 77250000 00076000 C:\WINDOWS\System32\sechost.dll 773F0000 000BF000 C:\WINDOWS\System32\RPCRT4.dll 76E30000 00023000 C:\WINDOWS\System32\GDI32.dll 77620000 00018000 C:\WINDOWS\System32\win32u.dll 77860000 000E1000 C:\WINDOWS\System32\gdi32full.dll 76320000 0007B000 C:\WINDOWS\System32\msvcp_win.dll 772D0000 00120000 C:\WINDOWS\System32\ucrtbase.dll 75840000 0019C000 C:\WINDOWS\System32\USER32.dll 764E0000 00063000 C:\WINDOWS\System32\WS2_32.dll 72490000 00028000 C:\WINDOWS\SYSTEM32\WINMM.DLL 74E00000 00033000 C:\WINDOWS\SYSTEM32\IPHLPAPI.DLL 77830000 00025000 C:\WINDOWS\System32\IMM32.DLL
Called from HB_COMPILE(0) in ../../../hbmk2.prg Called from HBMK_HB_COMPILE(0) in ../../../hbmk2.prg Called from __HBMK(0) in ../../../hbmk2.prg Called from HBMK_LOCAL_ENTRY(0) in ../../../hbmk2.prg Called from _APPMAIN(0) in ../../../hbmk2.prg
— Reply to this email directly, view it on GitHub https://github.com/harbour/core/issues/315, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA74SHW4VHPTH5AUPQF52KDXEKWMTANCNFSM6AAAAAAXU2YZC4. You are receiving this because you are subscribed to this thread.Message ID: @.***>
PROCEDURE Main
? "hello"
RETURN
STATIC CREATE CLASS X inherit y VAR A ENDCLASS
CREATE CLASS Y VAR B ENDCLASS
I would add that it doesn't crash when compiling with -w0 or -w2. Yet -w3 crashes.
Thank you very much.
This is reduced example: _HB_MEMBER { A } And here is other one: _HB_MEMBER A( X ) I've fixed both and have just committed the fix.
Anyhow it's part of old and never finished code which is not used by Harbour compiler for anything. Probably I should remove it anyhow maybe someone will try to implement such functionality so I decided to keep it as some type of information about starting point.
best regards, Przemek
W dniu 12.05.2023 o 16:34, José M. C. Quintas pisze:
include "hbclass.ch"
PROCEDURE Main
? "hello"
RETURN
STATIC CREATE CLASS X inherit y VAR A ENDCLASS
CREATE CLASS Y VAR B ENDCLASS
— Reply to this email directly, view it on GitHub https://github.com/harbour/core/issues/315#issuecomment-1545843345, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA74SHRDHPJPARIUN52MCCTXFZC7HANCNFSM6AAAAAAXU2YZC4. You are receiving this because you commented.Message ID: @.***>
Hard error fixed in ebc83d5. Thank you both for the report and for the fix.
A new error after change:
CLASS TTest VAR aTest ENDCLASS
error when compiling this without -w3
STATIC CLASS x INHERIT y
Ok, it is wrong, but this is error message when compiling with HBMK2
HBMK2 -w3 -es2 -m -n *.hbp -strip -compr -workdir=c:\temp -q -Id:\fontes\build\
hbmk2: Processing environment options: -comp=mingw hbmk2: Processing configuration: d:\harbour\bin\hbmk.hbc Harbour 3.2.0dev (r2304211101) Copyright (c) 1999-2021, https://harbour.github.io/
source\ze_boletopdf.prg:19: warning W0028 Unreachable code
source\ze_boletopdf.prg:19: error E0004 STATIC declaration follows executable statement
Unrecoverable error 6005: Exception error:
00AEE51C 00AEE700 00000000 0069D90A
Modules: 00400000 004EA000 d:\harbour\bin\hbmk2.exe 77990000 001A4000 C:\WINDOWS\SYSTEM32\ntdll.dll 765D0000 000F0000 C:\WINDOWS\System32\KERNEL32.DLL 77010000 00223000 C:\WINDOWS\System32\KERNELBASE.dll 763A0000 0007B000 C:\WINDOWS\System32\ADVAPI32.dll 76420000 000BF000 C:\WINDOWS\System32\msvcrt.dll 77250000 00076000 C:\WINDOWS\System32\sechost.dll 773F0000 000BF000 C:\WINDOWS\System32\RPCRT4.dll 76E30000 00023000 C:\WINDOWS\System32\GDI32.dll 77620000 00018000 C:\WINDOWS\System32\win32u.dll 77860000 000E1000 C:\WINDOWS\System32\gdi32full.dll 76320000 0007B000 C:\WINDOWS\System32\msvcp_win.dll 772D0000 00120000 C:\WINDOWS\System32\ucrtbase.dll 75840000 0019C000 C:\WINDOWS\System32\USER32.dll 764E0000 00063000 C:\WINDOWS\System32\WS2_32.dll 72490000 00028000 C:\WINDOWS\SYSTEM32\WINMM.DLL 74E00000 00033000 C:\WINDOWS\SYSTEM32\IPHLPAPI.DLL 77830000 00025000 C:\WINDOWS\System32\IMM32.DLL
Called from HB_COMPILE(0) in ../../../hbmk2.prg Called from HBMK_HB_COMPILE(0) in ../../../hbmk2.prg Called from __HBMK(0) in ../../../hbmk2.prg Called from HBMK_LOCAL_ENTRY(0) in ../../../hbmk2.prg Called from _APPMAIN(0) in ../../../hbmk2.prg