View Issue Details

IDProjectCategoryView StatusLast Update
0036652FPCCompilerpublic2020-02-17 21:17
ReporterRyan Joseph Assigned ToSven Barth  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.3.1 
Fixed in Version3.3.1 
Summary0036652: 2014010312 error
DescriptionProgram triggers 2014010312 error where another error should be have been given. Run the program once to compile the unit then again to trigger the error. Maybe PPU related since you're given a correct error on the first pass.

Ryans-MacBook-Pro-2:fpc-git ryanjoseph$ fpc stratch_pad.pas
Free Pascal Compiler version 3.0.4 [2018/09/30] for x86_64
Copyright (c) 1993-2017 by Florian Klaempfl and others
Target OS: Darwin for x86_64
Compiling stratch_pad.pas
stratch_pad.pas(15,1) Fatal: Internal error 2014010312
Fatal: Compilation aborted
Error: /usr/local/bin/ppcx64 returned an error exitcode
TagsNo tags attached.
Fixed in Revision44170
FPCOldBugId
FPCTarget-
Attached Files

Relationships

has duplicate 0028022 closedFlorian Internal error 2014010312 when compiling unit which accidentally contains class method definitions of another class. 

Activities

Ryan Joseph

2020-02-03 06:03

reporter  

stratch_pad.pas (188 bytes)   
{$mode objfpc}
{$interfaces corba}

program test;
uses
  uscratch_pad;

type
  TClassB = class
    procedure DoThis;
  end;

// 2014010312
procedure TClassA.DoThis;
begin
end;

begin
end.
stratch_pad.pas (188 bytes)   
uscratch_pad.pas (180 bytes)   
{$mode objfpc}
{$interfaces corba}

unit uscratch_pad;
interface

type
  TClassA = class
    procedure DoThis;
  end;

implementation

procedure TClassA.DoThis;
begin
  
end;

end.
uscratch_pad.pas (180 bytes)   

Jan Bruns

2020-02-12 06:24

reporter   ~0121033

As you said, the internal errror is triggered with ppu load, but not on rebuild.

The triggering code is in
    function tprocdef.Getforwarddef: boolean;
where returning false would the same error as for rebuild.

But I don't know how to catch the specific situation. The mangledname of the Tprocdef is that of the unit.

Jan Bruns

2020-02-12 08:30

reporter   ~0121035

This Patch adds a warning about relaxed internal error, but return false.
patch.diff (700 bytes)   
Index: symdef.pas
===================================================================
--- symdef.pas	(Revision 44153)
+++ symdef.pas	(Arbeitskopie)
@@ -5895,15 +5895,17 @@
         implprocdefinfo^.personality:=AValue;
       end;
 
-
     function tprocdef.Getforwarddef: boolean;
       begin
         if not assigned(implprocdefinfo) then
-          internalerror(2014010312);
+          begin
+            Comment(V_Warning,'relaxed internal error 2014010312');
+            result := false;
+            exit;
+          end;
         result:=implprocdefinfo^.forwarddef;
       end;
 
-
     function tprocdef.Gethasforward: boolean;
       begin
         if not assigned(implprocdefinfo) then
patch.diff (700 bytes)   

Sven Barth

2020-02-14 17:49

manager   ~0121099

Please test and close if okay

Issue History

Date Modified Username Field Change
2020-02-03 06:03 Ryan Joseph New Issue
2020-02-03 06:03 Ryan Joseph File Added: stratch_pad.pas
2020-02-03 06:03 Ryan Joseph File Added: uscratch_pad.pas
2020-02-12 06:24 Jan Bruns Note Added: 0121033
2020-02-12 08:30 Jan Bruns File Added: patch.diff
2020-02-12 08:30 Jan Bruns Note Added: 0121035
2020-02-14 17:27 Sven Barth Assigned To => Sven Barth
2020-02-14 17:27 Sven Barth Status new => assigned
2020-02-14 17:49 Sven Barth Status assigned => resolved
2020-02-14 17:49 Sven Barth Resolution open => fixed
2020-02-14 17:49 Sven Barth Fixed in Version => 3.3.1
2020-02-14 17:49 Sven Barth Fixed in Revision => 44170
2020-02-14 17:49 Sven Barth FPCTarget => -
2020-02-14 17:49 Sven Barth Note Added: 0121099
2020-02-17 21:16 Florian Relationship added related to 0028022
2020-02-17 21:17 Florian Relationship replaced has duplicate 0028022