audit: EterBase CRC32/FileBase/MappedFile mapped, with port.utils checks

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-30 12:46:43 +09:00
co-authored by Claude Opus 5.5
parent 290a331aef
commit f9b1044a4a
5 changed files with 308 additions and 62 deletions
+32 -4
View File
@@ -13,16 +13,44 @@
"test": "tests/port/port_eterpack_test.cpp (103 packs, 54891 entries, first-registered wins, 4 SECURITY rejects)"
},
"GetCaseCRC32": {
"status": "TODO"
"status": "PORTED",
"impl": [
"src/platform/EterBase/CRC32.cpp:GetCaseCRC32"
],
"test": [
"tests/port/port_utils_test.cpp"
],
"note": "Verbatim 40250 loop (UPPER fold); CRCTable generated from 0xEDB88320, identical to the literal 40250 table."
},
"GetHFILECRC32": {
"status": "TODO"
"status": "ADAPTED",
"impl": [
"src/platform/EterBase/CRC32.cpp:GetHFILECRC32"
],
"test": [
"tests/port/port_utils_test.cpp"
],
"note": "40250 maps the file (CreateFile + CreateFileMapping/MapViewOfFile from offset 0) and CRCs the whole view; the port reads the whole FILE* into a buffer. Invariant: same CRC of the full file, the handle's position is unchanged, 0 when the file cannot be opened."
},
"GetFileCRC32": {
"status": "TODO"
"status": "ADAPTED",
"impl": [
"src/platform/EterBase/CRC32.cpp:GetFileCRC32"
],
"test": [
"tests/port/port_utils_test.cpp"
],
"note": "40250 maps the file (CreateFile + CreateFileMapping/MapViewOfFile from offset 0) and CRCs the whole view; the port reads the whole FILE* into a buffer. Invariant: same CRC of the full file, the handle's position is unchanged, 0 when the file cannot be opened. Callers: GuildMarkUploader/GuildMarkDownloader symbol CRC, root pack CRC report."
},
"GetFileSize": {
"status": "TODO"
"status": "ADAPTED",
"impl": [
"src/platform/EterBase/CRC32.cpp:GetFileSize"
],
"test": [
"tests/port/port_utils_test.cpp"
],
"note": "CreateFile + GetFileSize -> fopen + ftell(SEEK_END); 0 when the file is missing (40250 returns 0 on INVALID_HANDLE_VALUE). Caller: GuildMarkDownloader symbol size."
}
}
}