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
+89 -23
View File
@@ -5,68 +5,134 @@
"contracts": [],
"functions": {
"CFileBase::CFileBase": {
"status": "PORTED",
"impl": [
"src/platform/EterBase/FileBase.cpp:CFileBase::CFileBase"
],
"status": "ADAPTED",
"note": "platform CFileBase over std::fstream; open falls back to a case-insensitive path match (NTFS spelling)",
"test": "tests/port/port_eterpack_test.cpp (103 packs, 54891 entries, first-registered wins, 4 SECURITY rejects)"
"test": [
"tests/port/port_utils_test.cpp"
],
"note": "Same member initialisation."
},
"CFileBase::~CFileBase": {
"status": "PORTED",
"impl": [
"src/platform/EterBase/FileBase.cpp:CFileBase::~CFileBase"
],
"status": "ADAPTED",
"note": "platform CFileBase over std::fstream; open falls back to a case-insensitive path match (NTFS spelling)",
"test": "tests/port/port_eterpack_test.cpp (103 packs, 54891 entries, first-registered wins, 4 SECURITY rejects)"
"test": [
"tests/port/port_utils_test.cpp"
],
"note": "Same (Destroy)."
},
"CFileBase::GetFileName": {
"status": "TODO"
"status": "PORTED",
"impl": [
"src/platform/EterBase/FileBase.cpp:CFileBase::GetFileName"
],
"test": [
"tests/port/port_utils_test.cpp"
],
"note": "Verbatim (m_filename)."
},
"CFileBase::Destroy": {
"status": "PORTED",
"impl": [
"src/platform/EterBase/FileBase.cpp:CFileBase::Destroy"
],
"status": "ADAPTED",
"note": "platform CFileBase over std::fstream; open falls back to a case-insensitive path match (NTFS spelling)",
"test": "tests/port/port_eterpack_test.cpp (103 packs, 54891 entries, first-registered wins, 4 SECURITY rejects)"
"test": [
"tests/port/port_utils_test.cpp"
],
"note": "Same (Close, m_dwSize = 0)."
},
"CFileBase::Close": {
"status": "ADAPTED",
"impl": [
"src/platform/EterBase/FileBase.cpp:CFileBase::Close"
],
"status": "ADAPTED",
"note": "platform CFileBase over std::fstream; open falls back to a case-insensitive path match (NTFS spelling)",
"test": "tests/port/port_eterpack_test.cpp (103 packs, 54891 entries, first-registered wins, 4 SECURITY rejects)"
"test": [
"tests/port/port_utils_test.cpp"
],
"note": "40250 wraps a Win32 HANDLE; the port keeps a stdio FILE* in m_hFile. CloseHandle -> fclose."
},
"CFileBase::Create": {
"status": "ADAPTED",
"impl": [
"src/platform/EterBase/FileBase.cpp:CFileBase::Create"
],
"status": "ADAPTED",
"note": "platform CFileBase over std::fstream; open falls back to a case-insensitive path match (NTFS spelling)",
"test": "tests/port/port_eterpack_test.cpp (103 packs, 54891 entries, first-registered wins, 4 SECURITY rejects)"
"test": [
"tests/port/port_utils_test.cpp"
],
"note": "40250 wraps a Win32 HANDLE; the port keeps a stdio FILE* in m_hFile. CreateFile modes kept: read = OPEN_EXISTING, write = OPEN_ALWAYS read/write (r+b, else w+b: no truncation). On POSIX a missing exact spelling falls back to a case-insensitive per-component match (NTFS names, e.g. pack/Index 'Etc' for ETC.eix)."
},
"CFileBase::Size": {
"status": "TODO"
"status": "PORTED",
"impl": [
"src/platform/EterBase/FileBase.cpp:CFileBase::Size"
],
"test": [
"tests/port/port_utils_test.cpp"
],
"note": "Verbatim (m_dwSize)."
},
"CFileBase::SeekCur": {
"status": "TODO"
"status": "ADAPTED",
"impl": [
"src/platform/EterBase/FileBase.cpp:CFileBase::SeekCur"
],
"test": [
"tests/port/port_utils_test.cpp"
],
"note": "40250 wraps a Win32 HANDLE; the port keeps a stdio FILE* in m_hFile. SetFilePointer(FILE_CURRENT) with a NULL high part takes the DWORD as a signed distance -> fseek(LONG(size), SEEK_CUR)."
},
"CFileBase::Seek": {
"status": "TODO"
"status": "ADAPTED",
"impl": [
"src/platform/EterBase/FileBase.cpp:CFileBase::Seek"
],
"test": [
"tests/port/port_utils_test.cpp"
],
"note": "40250 wraps a Win32 HANDLE; the port keeps a stdio FILE* in m_hFile. Clamp to m_dwSize verbatim; SetFilePointer(FILE_BEGIN) -> fseek(SEEK_SET)."
},
"CFileBase::GetPosition": {
"status": "TODO"
"status": "ADAPTED",
"impl": [
"src/platform/EterBase/FileBase.cpp:CFileBase::GetPosition"
],
"test": [
"tests/port/port_utils_test.cpp"
],
"note": "40250 wraps a Win32 HANDLE; the port keeps a stdio FILE* in m_hFile. SetFilePointer(0, FILE_CURRENT) -> ftell."
},
"CFileBase::Write": {
"status": "TODO"
"status": "ADAPTED",
"impl": [
"src/platform/EterBase/FileBase.cpp:CFileBase::Write"
],
"test": [
"tests/port/port_utils_test.cpp"
],
"note": "40250 wraps a Win32 HANDLE; the port keeps a stdio FILE* in m_hFile. WriteFile -> fwrite (false on a short write), then m_dwSize from the stream size as 40250 re-reads GetFileSize."
},
"CFileBase::Read": {
"status": "TODO"
"status": "ADAPTED",
"impl": [
"src/platform/EterBase/FileBase.cpp:CFileBase::Read"
],
"test": [
"tests/port/port_utils_test.cpp"
],
"note": "40250 wraps a Win32 HANDLE; the port keeps a stdio FILE* in m_hFile. ReadFile succeeds on a short read at end of file; fread + !ferror keeps that."
},
"CFileBase::IsNull": {
"status": "TODO"
"status": "PORTED",
"impl": [
"src/platform/EterBase/FileBase.cpp:CFileBase::IsNull"
],
"test": [
"tests/port/port_utils_test.cpp"
],
"note": "Verbatim (!m_hFile)."
}
}
}