[fpc-pascal] Spurious SIGSEGV on ARMHF with application compiled with fpc trunk

Reinier Olislagers reinierolislagers at gmail.com
Sun Mar 2 17:01:11 CET 2014


On 01/03/2014 11:02, Reinier Olislagers wrote:
> fpc trunk r26906, cross compiled fpcup for ARMHF; running on Odroid U3
> Xubuntu; ran under gdb:
> fpcup stops with a SIGSEGV:

Had tried to build a simple program to repeat the problem, compiled with
r26906 and ran it. Of course :( it didn't throw a SIGSEGV...

program nonexistingfile;

{$mode objfpc}{$H+}

uses
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  Classes, SysUtils, process;

var
  AProcess: TProcess;
begin
  AProcess:=TProcess.Create(nil);
  try
    try
      AProcess.Executable:='/tmp/filemustnotexist';
      AProcess.Execute;
      if AProcess.ExitCode=0 then
        writeln('Process exitcode 0')
      else
        writeln('Failure. Non-zero process exitcode');
      writeln('Process done, leaving try...except');
    except
      on E: Exception do
        writeln('exception: '+E.Message);
    end;
  finally
    AProcess.Free;
  end;
  writeln('Program finished');
end.






More information about the fpc-pascal mailing list