Commit 3007949f authored by Jeffrey Lee's avatar Jeffrey Lee

Fix search limits in FillGap

Detail:
  s/FileCore32 - The "try double exact fit" bit of the FillGap routine wasn't ensuring the search end address was word aligned, sometimes causing the search to run off the end of the FragSize array and into the memory before it.
This itself is mostly harmless (there's a check at line 1161 against the exact bit address at which the search should stop), except that check only gets perfomed once a nonzero bit is encountered.
Sometimes this check doesn't get performed at all, causing the search to fall off the start of ScratchSpace, and - with relocated zero page - into the unmapped memory beyond.
By rounding the search end address down, we ensure it's word aligned, without altering the actual size of the area.
Admin:
  Tested on BB-xM with high processor vectors


Version 3.52. Tagged as 'FileCore-3_52'
parent 01634dc2
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "3.51"
Module_Version SETA 351
Module_MajorVersion SETS "3.52"
Module_Version SETA 352
Module_MinorVersion SETS ""
Module_Date SETS "13 May 2012"
Module_ApplicationDate SETS "13-May-12"
Module_Date SETS "09 Jul 2012"
Module_ApplicationDate SETS "09-Jul-12"
Module_ComponentName SETS "FileCore"
Module_ComponentPath SETS "castle/RiscOS/Sources/FileSys/FileCore"
Module_FullVersion SETS "3.51"
Module_HelpVersion SETS "3.51 (13 May 2012)"
Module_FullVersion SETS "3.52"
Module_HelpVersion SETS "3.52 (09 Jul 2012)"
END
/* (3.51)
/* (3.52)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 3.51
#define Module_MajorVersion_CMHG 3.52
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 13 May 2012
#define Module_Date_CMHG 09 Jul 2012
#define Module_MajorVersion "3.51"
#define Module_Version 351
#define Module_MajorVersion "3.52"
#define Module_Version 352
#define Module_MinorVersion ""
#define Module_Date "13 May 2012"
#define Module_Date "09 Jul 2012"
#define Module_ApplicationDate "13-May-12"
#define Module_ApplicationDate "09-Jul-12"
#define Module_ComponentName "FileCore"
#define Module_ComponentPath "castle/RiscOS/Sources/FileSys/FileCore"
#define Module_FullVersion "3.51"
#define Module_HelpVersion "3.51 (13 May 2012)"
#define Module_LibraryVersionInfo "3:51"
#define Module_FullVersion "3.52"
#define Module_HelpVersion "3.52 (09 Jul 2012)"
#define Module_LibraryVersionInfo "3:52"
......@@ -1130,6 +1130,7 @@ Stacked2 * 3*4
MOV LR, #FragSize
ADD R8, LR, R5, LSR #4
SUB R8, R8, #4 ;search end in FragSize
BIC R8, R8, #3 ;ensure word aligned (not important that we're rounding down)
ADD R5, LR, R5, LSR #3
LDR R1, [R5]
RSBS LR, R3, #31
......
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