View Issue Details

IDProjectCategoryView StatusLast Update
0038201FPCRTLpublic2020-12-16 22:36
ReporterBart Broersma Assigned ToFlorian  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformi386OSWindows 
Product Version3.2.0 
Fixed in Version3.3.1 
Summary0038201: On some platforms no RTE is triggered when an exception occurs in a try..except and sysutils is not used
Descriptionprogram Test;
{$apptype console}
{$ifdef fpc}
{$mode objfpc}
{$endif fpc}
{$R+}

var
  Arr: array[1..2] of integer;
  i: Integer;
begin
  i:=5;
  try
    try
      Arr[i] := 1;
    except
      writeln('Except block');
    end;
  finally
    writeln('Finally block');
  end;
end.

On Windows it will output:
Runtime error 201 at $004015F1
  $004015F1
  $00407307

On Linux and OS/2 it will output:
Except block
Finally block

All this with fpc 3.2.0, but confirmed with fpc trunk on the fpc-devel ML.

As discussed in the fpc-devel ML the behaviour on Windows is correct: If SysUtils is not included, run-time
error should be raised regardless from the try..except block
TagsNo tags attached.
Fixed in Revision47775
FPCOldBugId
FPCTarget-
Attached Files

Activities

Bart Broersma

2020-12-16 17:45

reporter   ~0127637

@florian: the svn log for r47775 (https://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=47775) says that this resolves this issue.
Did you forget to mark this issue as resolved?

Florian

2020-12-16 21:23

administrator   ~0127640

Yes, I forgot this.

Issue History

Date Modified Username Field Change
2020-12-10 17:02 Bart Broersma New Issue
2020-12-16 17:45 Bart Broersma Note Added: 0127637
2020-12-16 21:23 Florian Assigned To => Florian
2020-12-16 21:23 Florian Status new => resolved
2020-12-16 21:23 Florian Resolution open => fixed
2020-12-16 21:23 Florian Fixed in Version => 3.3.1
2020-12-16 21:23 Florian Fixed in Revision => 47775
2020-12-16 21:23 Florian FPCTarget => -
2020-12-16 21:23 Florian Note Added: 0127640
2020-12-16 22:36 Bart Broersma Status resolved => closed