Test suite results for test file webtbs/tw3467.pp

Test run data :

Run ID:
Operating system: linux
Processor: arm
Version: 3.2.3
Fails/OK/Total: 59/7928/7987
Version: 3.2.3
Full version: 3.2.3-1373-gae0fe8a6a0
Comment: -Cparmv6 -Cfvfpv2 -Caeabi -XR/home/pierre/sys-root/arm-linux -Xd -Xr/home/pierre/sys-root/arm-linux
Machine: gcclocal
Category: 1
SVN revisions: fdf93c5b29:c17a0e20f5:ae0fe8a6a0:d1c29e6cb9
Submitter: pierre
Date: 2024/04/19 10:28:00 <> 2024/04/09
Previous run: 934295
Next run: 935628

Hide skipped tests

Hide successful tests

Test file "webtbs/tw3467.pp" information:

t_id 1420
t_adddate 2004/12/27
t_result 0
t_knownrunerror 0

Detailed test run results:

tr_idruntr_oktr_skiptr_result
443584983934952TrueFalseSuccessfully run

Record count: 1

No log of 934952.

Source:

{ Source provided for Free Pascal Bug Report 3467 }
{ Submitted by "Micha Nelissen" on  2004-12-24 }
{ e-mail: micha@neli.hopto.org }
program threadvartest;

{$mode objfpc}
{$H+}

uses
  erroru,
  sysutils,
  classes
{$ifdef unix}
  , cthreads
{$endif}
  ;

type
  tthread1 = class(tthread)
  public
    p : pointer;
    procedure execute; override;
  end;

  tthread2 = class(tthread)
  public
    p : pointer;
    procedure execute; override;
  end;

threadvar
  athreadvar: integer;

procedure tthread1.execute;
var
  i: integer;
begin
  writeln('thread 1 var is @', ptrint(@athreadvar));
    athreadvar := 1;
    p:=@athreadvar;
   Sleep(2000);
    for i := 0 to 100000 do
      if athreadvar <> 1 then
      begin
        writeln(athreadvar);
        error;
        break;
      end;
end;

procedure tthread2.execute;
var
  i: integer;
begin
  writeln('thread 2 var is @', ptrint(@athreadvar));
    athreadvar := 9;
    p:=@athreadvar;
   Sleep(2000);
    for i := 0 to 100000 do
      if athreadvar <> 9 then
      begin
        writeln('  ', athreadvar);
        error;
        break;
      end;
end;

var
  thread1: tthread1;
  thread2: tthread2;
begin
  thread1 := tthread1.create(false);
  thread2 := tthread2.create(false);
  thread1.waitfor;
  thread2.waitfor;
  if thread1.p=thread2.p then
    error;
end.

Link to SVN view of webtbs/tw3467.pp source.