blob: d62aaea348dddbd2af81443ff6569d12ed4ab949 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
{ Source provided for Free Pascal Bug Report 3004 }
{ Submitted by "Michalis Kamburelis" on 2004-03-04 }
{ e-mail: michalis@camelot.homedns.org }
{$mode OBJFPC}
{$H+}
{ $mode DELPHI}
uses erroru,SysUtils;
procedure P;
var s:string;
begin
s:='blah';
raise Exception.Create('foo ' +s);
end;
procedure p1;
var
i : sizeint;
begin
i:=0;
domem(i);
try
P;
except
end;
if domem(i)<>0 then
begin
writeln('Memleak');
halt(1);
end;
end;
begin
p1;
end.
|