Салям!
25-Июл-2004 17:18 Arkady V.Belousov wrote to
[EMAIL PROTECTED]:
KD>> +++ history.txt 25 Jul 2004 09:55:56 -0000 1.78.2.3
KD>> + Changes Tom
KD>> * inthndlr.c
KD>> - improve handling of case where eg. FindFirst(I:\*.*) fails, causes
KD>> Int24,
AVB> This patch included not completely. Trouble is, that part, which
AVB> should be included after swicth(), tom not marks by pluses.
Let me repeat his proposal as diff-file:
--- Begin Message ---
diff -ruNp old/kernel/inthndlr.c new/kernel/inthndlr.c
--- old/kernel/inthndlr.c 2004-07-25 16:54:58.000000000 +0000
+++ new/kernel/inthndlr.c 2004-07-25 18:17:00.000000000 +0000
@@ -411,6 +411,13 @@ dispatch:
}
/* Clear carry by default for these functions */
+ if (ErrorMode && lr.AH > 0x0c && lr.AH != 0x30 && lr.AH != 0x59)
+ {
+ /* this patch description see below, after real_exit label */
+ ErrorMode = 0;
+ fnode[0].f_count = /* don't panic - THEY ARE unused !! */
+ fnode[1].f_count = 0;
+ }
/* Check for Ctrl-Break */
if (break_ena || (lr.AH >= 1 && lr.AH <= 5) || (lr.AH >= 8 && lr.AH <= 0x0b))
@@ -1500,6 +1507,30 @@ exit_dispatch:
r->ES = lr.ES;
real_exit:;
+ /* PATCH !! --TE 5 JUL 04
+ what happened:
+ Application does FindFirst("I:\*.*");
+ this fails, and causes Int24
+ this sets ErrorMode, and calls Int24
+ Application decides NOT to return to DOS,
+ but instead pop the stack and return to itself
+ (this is legal; see RBIL/INT 24 description)
+ a) now the alloc()'ed fnode[] never gets free()'ed
+ b) errormode NEVER gets set back to 0 until exit()
+ I have NO idea how real DOS handles this;
+ the appended patch cures the worst symptoms
+ */
+
+ if (fnode[0].f_count | fnode[1].f_count)
+ {
+ if (ErrorMode == 0)
+ put_string("near_fnodes not 0"); /* panic ?? */
+ fnode[0].f_count = /* don't panic - THEY ARE unused !! */
+ fnode[1].f_count = 0;
+ }
+
+ /* PATCH !! END --TE 5 JUL 04 */
+
#ifdef DEBUG
if (bDumpRegs)
{
--- End Message ---