[fpc-devel] ExceptAddrStack FRAMETYPE=1 ?

Martin fpc at mfriebe.de
Thu Jun 10 15:36:40 CEST 2010


I am still stuck on this issue.

I don't know if fpc_reraise has been entered while it should not; or if 
the data was corrupted.

What does  FRAMETYPE = 1 mean?

Should it expect an ExceptionObject? Should it be on top of the frame 
list, when in fpc_reraise?

Or does it indicate that fpc_reraise was called where it should not have 
been called?
What could trigger it to be called?

Best Regards
Martin

On 09/06/2010 18:42, Martin wrote:
>
>  I am one tiny step forward..
>
>  The SigSegV happens in fpc_ReRaise; =>  but the actual error must have
>  been introduced further up.
>
>  Procedure fpc_ReRaise;[Public, Alias : 'FPC_RERAISE']; compilerproc;
>  var
>    _ExceptAddrStack : PExceptAddr;
>  begin
>  {$ifdef excdebug}
>    writeln ('In reraise');
>  {$endif}
>    _ExceptAddrStack:=ExceptAddrStack;
>    If _ExceptAddrStack=Nil then
>      DoUnHandledException;
>    ExceptObjectStack^.refcount := 0; //<<<<<<<<<<<<<<<<<
>    longjmp(_ExceptAddrStack^.Buf^,FPC_Exception);
>  end;
>
>
>  This is RTL (and compiled with -O1 =>  it doesn't use regvar), so I
>  should be able to trust variables here. (I also checked the assembler
>  view, and memory/registers...)
>
>  - ExceptObjectStack is nil =>  So the line marked raises a SigSegV.
>  - ExceptAddrStack is not nil =>  so DoUnHandledException was not called
>
>  The question is, any hints where to concentrate looking, in order to
>  find out, how this can end up with a nil pointer there?

The content of ExceptAddrStack

record TEXCEPTADDR {
   BUF = $a3ef728,
   NEXT = $a3ef768,
   FRAMETYPE = 1}
_______________________________________________
fpc-devel maillist  -  fpc-devel at lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel




More information about the fpc-devel mailing list