Commit 7212561d authored by Jeffrey Lee's avatar Jeffrey Lee

Fix invalid AMB node handle being used when low on memory

Detail:
  s/Wimp08s - If OS_AMBControl allocate is asked for a AMB node with a size > 0, but no pages can be claimed, it frees the node and returns an invalid handle (0). Make sure that the Wimp's allocateslot routine is aware of this, so that we don't try passing that bad handle back to AMBControl later on
  s/Iconbar - Use nullptr constant instead of -1 when checking task_slotsize (aka AMB node handle on modern machines)
Admin:
  Tested on BB-xM
  Fixes abort seen when attempting to start a task with no pages in the free pool


Version 5.53. Tagged as 'Wimp-5_53'
parent ace2e66f
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.52"
Module_Version SETA 552
Module_MajorVersion SETS "5.53"
Module_Version SETA 553
Module_MinorVersion SETS ""
Module_Date SETS "08 May 2016"
Module_ApplicationDate SETS "08-May-16"
Module_Date SETS "23 May 2016"
Module_ApplicationDate SETS "23-May-16"
Module_ComponentName SETS "Wimp"
Module_ComponentPath SETS "castle/RiscOS/Sources/Desktop/Wimp"
Module_FullVersion SETS "5.52"
Module_HelpVersion SETS "5.52 (08 May 2016)"
Module_FullVersion SETS "5.53"
Module_HelpVersion SETS "5.53 (23 May 2016)"
END
/* (5.52)
/* (5.53)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 5.52
#define Module_MajorVersion_CMHG 5.53
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 08 May 2016
#define Module_Date_CMHG 23 May 2016
#define Module_MajorVersion "5.52"
#define Module_Version 552
#define Module_MajorVersion "5.53"
#define Module_Version 553
#define Module_MinorVersion ""
#define Module_Date "08 May 2016"
#define Module_Date "23 May 2016"
#define Module_ApplicationDate "08-May-16"
#define Module_ApplicationDate "23-May-16"
#define Module_ComponentName "Wimp"
#define Module_ComponentPath "castle/RiscOS/Sources/Desktop/Wimp"
#define Module_FullVersion "5.52"
#define Module_HelpVersion "5.52 (08 May 2016)"
#define Module_LibraryVersionInfo "5:52"
#define Module_FullVersion "5.53"
#define Module_HelpVersion "5.53 (23 May 2016)"
#define Module_LibraryVersionInfo "5:53"
......@@ -684,7 +684,7 @@ mapslotinout
TST R0,#&80000000
BNE %FT01
LDR R0,[R0,#task_slotptr]
CMP R0,#-1
CMP R0,#nullptr
BLNE mapout
01
Pull "R0"
......@@ -695,7 +695,7 @@ mapslotinout
TST R0,#&80000000
Pull "R1-R2,PC",NE
LDR R0,[R0,#task_slotptr]
CMP R0,#-1
CMP R0,#nullptr
BLNE mapin
Pull "R1-R2,PC"
]
......
......@@ -1095,6 +1095,8 @@ allocateslot ROUT
BL setdefaulthandlers
Pull "R0-R4,PC"
01
CMP R2,#0
MOVEQ R2,#nullptr
Debug mjs2," allocateslot pages,slotptr",R1,R2
LDR R1,taskhandle
LDR R1,[wsptr,R1]
......
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