commit 925915165b8e3e91dca9dddd65fe1e2c342b72e2
parent 2357f9ea16b51758e317e5cfa9b0f0ee0f466797
Author: anon <anon@example.com>
Date: Tue, 13 Oct 2026 13:37:58 +0000
Translate BinaryStream's stored memory and file handlers
Diffstat:
1 file changed, 16 insertions(+), 0 deletions(-)
diff --git a/docs/browser-porting.md b/docs/browser-porting.md
@@ -1046,3 +1046,19 @@ registration routine. REA evidence:
`ev_7aedefd594e87e4cd7d7697a32ec3ad224d9a6c70051ca7f30b468e7202f3cab`,
`ev_93223775f9b979daa8ee09cba0e53cec6c8bf193efe42f7d519e50813a84b6ff`,
`ev_c44fa41a27944909da8885a8e1727c789d857a3d0b09952e5f1b46be95b2ce0f`.
+
+CR's `BinaryStream` dispatches through four stored function pointers, without
+a C++ vtable: block read at object +0, block write at +4, byte get at +8 and
+byte put at +12. The memory constructor at RVA `0x1170` installs `readmem`
+(`0x1c60`), `writemem` (`0x1d90`), `bgetc` (`0x1c40`) and `bputc` (`0x1d50`).
+The file constructor at `0x1240` installs `readfile` (`0x1ba0`), `writefile`
+(`0x1ec0`), `bgetcfile` (`0x1cc0`) and `bputcfile` (`0x1e10`). Indirect
+discovery must retain these handler entries as well as the constructors.
+The runtime reaches `writemem` after creating the filename-registry object.
+Its write cursor is at +0x14, capacity limit at +0x1c, and logical end at
++0x20; writes beyond capacity call `overflow` rather than silently truncating.
+This was inspected in `client-target/cr.dll`, SHA-256
+`ea4b87a20b4700dc71b216024e44c536deb24be07ed41e0301bcc07fe50db3d6`.
+REA evidence: `ev_e0ed4fbeaae26082038e9dd8f5d57f04a78786c00958da6f83b50f39a5bd3b95`,
+`ev_b37cdffbfa01c8c926303d4d9b56dbb96b7cf26b3169098449c15493acd4029e`,
+`ev_9ac64c3d697a52f5a131393c86ba118b27afd0dc040026a1fe95e2a5733445c3`.