View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0038591||FPC||Compiler||public||2021-03-05 21:48||2021-03-25 08:40|
|Reporter||ravi dion||Assigned To|
|Summary||0038591: Unhandled exception inside compiler for VMT entry|
|Description||test.lpr(14,40) Error: Identifier not found "IMyInterface"|
test.lpr(14,45) Error: Unknown class field or method identifier "FMyInterface"
test.lpr(14,81) Error: Identifier not found "IMyInterface"
test.lpr(14,81) Error: Type used by implements must be an interface
test.lpr(14,81) Error: Implements property must have class or interface type
test.lpr(17,1) Error: Compilation raised exception internally
Fatal: Compilation aborted
An unhandled exception occurred at $00000000006241CC:
EAccessViolation: Access violation
$00000000006241CC IS_NEW_VMT_ENTRY, line 477 of nobj.pas
$00000000006266E2 GENERATE_VMT, line 921 of nobj.pas
$00000000005FACEA TYPES_DEC, line 939 of pdecl.pas
$00000000005FB275 TYPE_DEC, line 1018 of pdecl.pas
$0000000000563449 READ_DECLARATIONS, line 2434 of psub.pas
$000000000055DE98 BLOCK, line 318 of psub.pas
$000000000056222A PARSE_BODY, line 1909 of psub.pas
$000000000064B9FC PROC_PROGRAM, line 2166 of pmodules.pas
$0000000000548BC2 COMPILE, line 407 of parser.pas
$0000000000435291 COMPILE, line 288 of compiler.pas
$00000000004012B7 main, line 265 of pp.pas
$000000000042D350 SYSENTRY, line 141 of system.pp
|Steps To Reproduce||compile attached program with -MDelphi -O3|
|Tags||No tags attached.|
|Fixed in Revision|
You did not define IMyInterface, nor did you initialize it in the constructor.
This belongs on the forum and is NOT a bug in FPC or Lazarus.
It's surely a bug because it crashes the compiler!! The compiler should never crash for valid or invalid code
||Indeed. A compiler crash is always a bug.|
Well, if you feed dogfood to a cat it will eventually die.
Note I could not replictate the compiler crash.... Marco...
||FPC trunk 3.3.1 r48894 report error correctly under x86-win32.|
I still can not reproduce a compiler crash to the exrend that I don't believe it.
On 4 differemt platforms: win32, win64, ln32, lin64
Show us code to test.....and crashes the compiler
||@Thaddy: ravi dion's code crashes 3.2.0, but not trunk. Probably some revision fixed it. Maybe I can find and merge it to 3.2.1.|
Are you kidding me? Dumbass. If you have nothing to say, shut your mouth!
Code was attached and also added the revision, no idea why it does not appear here. However, FPC 3.2.1-r48511
@ravi dion: please keep it civil. I know that Thaddy's comments can be aggravating at times, but that his no reason to escalate things.
Also as I said I can reproduce your crash with 3.2.0, but not with trunk. That means it got fixed in trunk and I (or someone else) will have to hunt the revision that fixed it so that it can hopefully be merged to 3.2.1.
||Okay, the revision that "fixed" it is 43612, though it only adjusted the error recovery due to the missing interface type. I'll need to experiment a bit whether all necessary error cases are indeed "safe" here.|
||Still occurs with 3.2.1-r49042|
||Because I did not change anything. If I had I would have resolved this issue.|
|2021-03-05 21:48||ravi dion||New Issue|
|2021-03-05 21:48||ravi dion||File Added: test.lpr|
|2021-03-06 16:28||Thaddy de Koning||Note Added: 0129440|
|2021-03-06 16:50||ravi dion||Note Added: 0129443|
|2021-03-06 16:50||ravi dion||Note Edited: 0129443||View Revisions|
|2021-03-06 20:42||Marco van de Voort||Note Added: 0129451|
|2021-03-06 22:41||Thaddy de Koning||Note Added: 0129456|
|2021-03-06 22:44||Thaddy de Koning||Note Edited: 0129456||View Revisions|
|2021-03-07 10:20||Do-wan Kim||Note Added: 0129464|
|2021-03-07 11:19||Thaddy de Koning||Note Added: 0129473|
|2021-03-07 11:19||Thaddy de Koning||Note Edited: 0129473||View Revisions|
|2021-03-07 14:20||Sven Barth||Note Added: 0129480|
|2021-03-08 15:39||ravi dion||Note Added: 0129509|
|2021-03-09 08:44||Sven Barth||Note Added: 0129523|
|2021-03-10 18:26||Sven Barth||Note Added: 0129556|
|2021-03-24 23:05||ravi dion||Note Added: 0129867|
|2021-03-25 08:40||Sven Barth||Note Added: 0129874|