View Issue Details

IDProjectCategoryView StatusLast Update
0035815FPCCompilerpublic2019-07-11 14:03
ReporterCyraxAssigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
PlatformLinux x86_64OSArchOS Version3.17.4-1
Product Version3.3.1Product Buildr42346 
Target VersionFixed in Version 
Summary0035815: [psabieh][i386] Bogus exception elsewhere or there is no output when raising exception programmatically.
DescriptionCompiling and running attached sources produces output that is unexpected and wrong.

psabieh disabled/not built with :

exception.pas :
finally
except


exception-2.pas :
An unhandled exception occurred at $08049098:
Exception: test
  $08049098  $main,  line 8 of exception-2.pas
  $08049032  _FPC_PROC_START


psabieh enabled:

exception.pas :
Runtime error 217 at $08060CA9
  $08060CA9  _FPC_PSABIEH_PERSONALITY_V0,  line 919 of ../inc/psabieh.inc
  $F7FA07D3


no output when running binary generated from exception-2.pas.
TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget
Attached Files
  • exception.pas (213 bytes)
    program test;
    
    {$mode objfpc}
    
    Uses
      SysUtils, Classes;
      
    begin
      try
        try
          raise Exception.Create('test');
        finally
          writeln('finally');
        end;  
      except
        WriteLn('except');
      end;  
    end.
    
    exception.pas (213 bytes)
  • exception-2.pas (105 bytes)
    program test;
    
    {$mode objfpc}
    
    Uses
      SysUtils, Classes;
      
    begin
      raise Exception.Create('test');
    end.
    
    exception-2.pas (105 bytes)

Activities

Cyrax

2019-07-09 18:14

reporter  

exception.pas (213 bytes)
program test;

{$mode objfpc}

Uses
  SysUtils, Classes;
  
begin
  try
    try
      raise Exception.Create('test');
    finally
      writeln('finally');
    end;  
  except
    WriteLn('except');
  end;  
end.
exception.pas (213 bytes)
exception-2.pas (105 bytes)
program test;

{$mode objfpc}

Uses
  SysUtils, Classes;
  
begin
  raise Exception.Create('test');
end.
exception-2.pas (105 bytes)

Cyrax

2019-07-09 22:51

reporter   ~0117130

There seems to be missing check at ExceptProc variable like there is for RaiseProc variable. And same for calling it.

Cyrax

2019-07-09 23:21

reporter   ~0117131

Related to bug report https://bugs.freepascal.org/view.php?id=35751

Cyrax

2019-07-11 14:03

reporter   ~0117180

exception-2.pas:

In psabieh RaiseException for object F7EF8050 of class type Exception
In PushExceptObject
Personality (version = 1, actions = $0001) started for wrapper F7D0B020 = fpc exc F7EF8050, refcount is now 0
  ip=$0806220F
did not find lsda for ip $0806220F
Personality (version = 1, actions = $0001) started for wrapper F7D0B020 = fpc exc F7EF8050, refcount is now 0
  ip=$0804927D
did not find lsda for ip $0804927D
_Unwind_RaiseException returned: 5

Issue History

Date Modified Username Field Change
2019-07-09 18:14 Cyrax New Issue
2019-07-09 18:14 Cyrax File Added: exception.pas
2019-07-09 18:14 Cyrax File Added: exception-2.pas
2019-07-09 22:51 Cyrax Note Added: 0117130
2019-07-09 23:21 Cyrax Note Added: 0117131
2019-07-11 14:03 Cyrax Note Added: 0117180