View Issue Details

IDProjectCategoryView StatusLast Update
0036840FPCCompilerpublic2020-10-22 21:38
ReporterBenito van der Zander Assigned ToFlorian  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformamd64OSlinux 
Product Version3.3.1 
Fixed in Version3.2.1 
Summary0036840: Internal error 200405231
DescriptionThis code:

program 200405231;

{$mode objfpc}{$H+}

uses sysutils;

type TTreeNode = class
  hash: cardinal;
  value: string;
end;

function striequal(const s1, s2: rawbytestring): boolean; inline;
begin
  result:=CompareText(s1,s2)=0;
end;


function test(n: TTreeNode; isHTML5: boolean): boolean;
begin
  result := false;
  case n.hash of
    $F2F96899: result := striequal(n.value,'isindex') and not isHTML5;

    $A54D33BB: result := striequal(n.value,'keygen') and isHTML5;

  end;
end;
begin
end.


gives an internal error 200405231 when compiled -O2.


Additional InformationTested with r40721 and r44126.

It goes away with {$checkimplicitexceptions off}
TagsNo tags attached.
Fixed in Revision47152
FPCOldBugId
FPCTarget-
Attached Files

Relationships

related to 0035590 acknowledged Internal error 200405231 with inline 

Activities

Benito van der Zander

2020-10-17 13:51

reporter   ~0126366

Last edited: 2020-10-17 13:51

View 2 revisions

This seems to have been fixed since/before r47006


> It goes away with {$checkimplicitexceptions off}

That has been a very bad workaround. Apparently in the actual project, it lead to the above test function decrementing the string ref count without incrementing it and thus freeing the string while it was still being used . https://github.com/benibela/internettools/commit/4c510e8c977b7773b78fd1b586156b1cef421065

Florian

2020-10-22 21:38

administrator   ~0126472

I merged a fix related to this to fixes.

Issue History

Date Modified Username Field Change
2020-03-28 23:42 Benito van der Zander New Issue
2020-10-17 13:51 Benito van der Zander Note Added: 0126366
2020-10-17 13:51 Benito van der Zander Note Edited: 0126366 View Revisions
2020-10-22 21:36 Florian Relationship added has duplicate 0035590
2020-10-22 21:37 Florian Relationship deleted has duplicate 0035590
2020-10-22 21:37 Florian Relationship added related to 0035590
2020-10-22 21:38 Florian Assigned To => Florian
2020-10-22 21:38 Florian Status new => resolved
2020-10-22 21:38 Florian Resolution open => fixed
2020-10-22 21:38 Florian Fixed in Version => 3.2.1
2020-10-22 21:38 Florian Fixed in Revision => 47152
2020-10-22 21:38 Florian FPCTarget => -
2020-10-22 21:38 Florian Note Added: 0126472