Commit 6c68eb4b authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Fix 32bit conversion issue

Detail:
  s/Taskman - Generation of TaskWindow_Dying error within ByteV handler wasn't balancing the stack correctly, causing it to try branching to the PSR. Fix this, and tighten up the code a bit (can use R0 as temp as it'll always be set to something sensible on exit)
Admin:
  Tested on iMx6
  Fixes reported issue with machine stiffing when killing task windows containing running programs
  Issue was only observed on pre-PMP kernel version, where the code would have branched into the free pool (loaded PSR appeared to be &80000193), corrupted some memory, and then got stuck in a loop
  Presumably this has never been spotted on other systems because there would have rarely been any memory at that location, generating an immediate abort, but the error message gets swallowed because the task is exiting? (or there was memory there, but the user got lucky and the code aborts before fatally corrupting anything)


Version 0.77. Tagged as 'TaskWindow-0_77'
parent a53166dc
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "0.76"
Module_Version SETA 76
Module_MajorVersion SETS "0.77"
Module_Version SETA 77
Module_MinorVersion SETS ""
Module_Date SETS "11 Jan 2014"
Module_ApplicationDate SETS "11-Jan-14"
Module_Date SETS "30 Sep 2015"
Module_ApplicationDate SETS "30-Sep-15"
Module_ComponentName SETS "TaskWindow"
Module_ComponentPath SETS "castle/RiscOS/Sources/Desktop/TaskWindow"
Module_FullVersion SETS "0.76"
Module_HelpVersion SETS "0.76 (11 Jan 2014)"
Module_FullVersion SETS "0.77"
Module_HelpVersion SETS "0.77 (30 Sep 2015)"
END
/* (0.76)
/* (0.77)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.76
#define Module_MajorVersion_CMHG 0.77
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 11 Jan 2014
#define Module_Date_CMHG 30 Sep 2015
#define Module_MajorVersion "0.76"
#define Module_Version 76
#define Module_MajorVersion "0.77"
#define Module_Version 77
#define Module_MinorVersion ""
#define Module_Date "11 Jan 2014"
#define Module_Date "30 Sep 2015"
#define Module_ApplicationDate "11-Jan-14"
#define Module_ApplicationDate "30-Sep-15"
#define Module_ComponentName "TaskWindow"
#define Module_ComponentPath "castle/RiscOS/Sources/Desktop/TaskWindow"
#define Module_FullVersion "0.76"
#define Module_HelpVersion "0.76 (11 Jan 2014)"
#define Module_LibraryVersionInfo "0:76"
#define Module_FullVersion "0.77"
#define Module_HelpVersion "0.77 (30 Sep 2015)"
#define Module_LibraryVersionInfo "0:77"
......@@ -3478,13 +3478,9 @@ MyByteV ROUT
MOVS r2, #0 ; Set zero
35
SavePSR r14
Push r14
LDR r14, Moribund
TEQ r14, #0 ; Are we dying
Pull r14
Pull r14, NE ; Get return address if going to cause error
ADRNE r0, ErrorBlock_TaskWindow_Dying
BNE CopyError
LDR r0, Moribund
TEQ r0, #0 ; Are we dying
BNE %FT42 ; Go generate error
RestPSR r14 ; Restore flags
MOVNE r2, #Esc
......@@ -3497,6 +3493,11 @@ MyByteV ROUT
MOV r0, #Inkey
Pull "pc" ; return to caller
42
Pull "r0, r14" ; Discard CPSR, get return address
ADR r0, ErrorBlock_TaskWindow_Dying
B CopyError
; .......................................................................
; EscapeAck - first see if escape exists
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment