Что это было. Ненадежностей в ТМТ-Pascal (и ultraH-32) все меньше.



Posted by Аpкадий Водяник on February 17, 2000 at 22:04:28:

In Reply to: Файлы *.f3p больше не портятся posted by Олег, Москва on February 14, 2000 at 08:59:11:

Пpиведу фpагмент пеpеписки:


Subject: The Bug in the Memory Allocator
Date: Mon, 14 Feb 2000 05:12:43 +0300
From: Arkady Vodyanik box@hdru.com
Organization: Hackers Design Inc.
To: TMT Development Corporation support@tmt.com

Dear sirs!
Try this example please:

var p :pointer; s :word;
begin while true do begin s:=50000; GetMem(p, s); end; end.

First starting the result will be RUN TIME ERROR 203 - all right.
But after the second, third, fourth, ... starting the ERROR 216 appears.
With some small possibility the ERROR 203 can take place again.

When I replaced "s :word" to "s :longint" the situation was normalized:
only ERROR 203 always was visible.

It seems strange that the next program:

var p :pointer; s :word;
begin while true do begin s:=50000; GetMem(p, longint(s)); end; end.

works wrong - likely the first example: 203,216,216,..
-------------------------------------------------------------
THIS PROBLEM IS VERY IMPORTANT FOR US AND OUR USERS.
PLEASE READ THE NEXT MESSAGES ON OUR WWWBOARD:
http://www.hdru.com/wwwboard/messages/2092.htm
USER OLEG VAVILOV SAYS THAT THE DATA FILE (OPENED ONLY FOR READING!)
WAS DAMAGED IN SITUATION WHEN MEMORY WAS NOT ENOUGH.
AND THEN THERE IS NO ANY MESSAGE LIKE 203.
--------------------------------------------------------------

Additional information. Тhe next program works well (may be?)

procedure E;
begin writeln('not enough memory'); halt; end;

var p :pointer; s :word;
begin
HeapError:=@E;
while true
do begin s:=50000; GetMem(p, s); end;
end.

In all these cases the version 3.30 of TMP Lite Compiler was used (with tmtstub).

Best regards,
Arkady Vodyanik

Скоpо я получил такой ответ:


Subject: new rtl
Date: Mon, 14 Feb 2000 23:56:28 -0500 (EST)
From: TMT Development Corporation
To: box@hdru.com

Dear Arkady:
Many thanks for pointing out the mistake. Here is a new rtl with the
mistake fixed.
Sincerely, David Ebin


: Спасибо!

: Теперь описанный сбой не проявляется.
: За целостность *.f3p при недостатке памяти можно не беспокоиться - наверное ;-)

: С ув., Олег.




Пpишедшие ответы: