mirror of https://github.com/FDOS/kernel.git
Tom's patch releasing near f-nodes on Int 24 that returns to user
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/branches/UNSTABLE@1041 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
6e7cf96323
commit
66e2a7d174
|
@ -411,7 +411,13 @@ dispatch:
|
||||||
}
|
}
|
||||||
/* Clear carry by default for these functions */
|
/* Clear carry by default for these functions */
|
||||||
|
|
||||||
|
/* see PATCH TE 5 jul 04 explanation at end */
|
||||||
|
if (ErrorMode && lr.AH > 0x0c && lr.AH != 0x30 && lr.AH != 0x59)
|
||||||
|
{
|
||||||
|
ErrorMode = 0;
|
||||||
|
fnode[0].f_count = 0; /* don't panic - THEY ARE unused !! */
|
||||||
|
fnode[1].f_count = 0;
|
||||||
|
}
|
||||||
/* Check for Ctrl-Break */
|
/* Check for Ctrl-Break */
|
||||||
if (break_ena || (lr.AH >= 1 && lr.AH <= 5) || (lr.AH >= 8 && lr.AH <= 0x0b))
|
if (break_ena || (lr.AH >= 1 && lr.AH <= 5) || (lr.AH >= 8 && lr.AH <= 0x0b))
|
||||||
check_handle_break(&syscon);
|
check_handle_break(&syscon);
|
||||||
|
@ -1499,6 +1505,31 @@ exit_dispatch:
|
||||||
r->ES = lr.ES;
|
r->ES = lr.ES;
|
||||||
real_exit:;
|
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[0] never gets free()'ed
|
||||||
|
b) errormode NEVER gets set back to 0 unyil exit()
|
||||||
|
|
||||||
|
I have NO idea how real DOS handles this;
|
||||||
|
the appended patch cures the worst symptoms
|
||||||
|
*/
|
||||||
|
if (fnode[0].f_count != 0 ||
|
||||||
|
fnode[1].f_count != 0 )
|
||||||
|
{
|
||||||
|
if (ErrorMode == 0)
|
||||||
|
put_string("near_fnodes not 0"); /* panic ?? */
|
||||||
|
fnode[0].f_count = 0; /* don't panic - THEY ARE unused !! */
|
||||||
|
fnode[1].f_count = 0;
|
||||||
|
}
|
||||||
|
/* PATCH !! END TE 5 JUL 04 */
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (bDumpRegs)
|
if (bDumpRegs)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue