Status: 2026-11-21. Static analysis of the user's copy (fat application: PowerPC PEF in the data fork, 68k CODE resources in the resource fork). Addresses are offsets into the PEF code section (PowerPC) or into CODE 1 after its 4-byte header (68k). The analysis ran no code. Items not checked are marked UNVERIFIED.
- Symptom: host parlornet.org (13 chars) became a DNS query for ppppppppppppp; external.nj.nec.com (19) became eeeeeeeeeeeeeeeeeee; a dotted IPv4 address of 14 characters failed with no packets, because it becomes a run of its first digit.
- Cause: a bug in the application's 68k code. The 68k build converts the host name from a C string to a Pascal string in place with an inlined memcpy(buf + 1, buf, n). CodeWarrior's 68k inline memcpy copies lengths under 32 bytes with a forward byte loop, which is not safe for an overlapping move: every byte becomes the first byte. Lengths of 32 or more go to _BlockMoveData, which handles overlap, so long host names work.
- The PowerPC build of the same source calls BlockMoveData for every length, so it works. That matches the user's observation that Eclipse connects from Mac OS 9.2.2 (PowerPC), and that the fault shows on the 68k machine (System 7.6.1).
- Not Mac OS, not Open Transport, not QEMU: a real 68k Mac runs the same byte loop with the same result. On 68k, Eclipse 1.2 could never connect to a host name under 32 characters, including its own default external.nj.nec.com.
- Changing 2 bytes fixes it. The Eclipse 68k Fix (docs site) applies that change to a player's own copy.
PowerPC (same flow in the 68k code):
- Login dialog (PPob 4 "Login", edit field Host) handler at 0x157bc: GetDescriptor into a Str255 at 0x15f84, P2CStr at 0x160ec, then std::string(cstr) at 0x16100.
- IOSComm constructor 0x19164 keeps the string at this+0x94.
- IOSComm::Run 0x19c70 creates the telnet object: MyTelnet::MyTelnet(host, port) at 0x18308.
- In that constructor, 0x183d4-0x18418: strcpy(buf, host.c_str()), n = strlen(buf), memcpy(buf + 1, buf, n) (0x79f54, a wrapper that calls BlockMoveData(src, dst, n)), buf[0] = n. The Pascal string then goes to PowerPlant LInternetAddress::SetHostName (vtable +0x24, 0x184d0) and on to LOpenTptInetMapper::NameToAddress (0x46bf8: CopyPStr, p2cstr, OTInetStringToAddress) or to a DNSAddress for OTConnect (0x4c6ac).
68k, CODE 1 "Eclipse source", MyTelnet::MyTelnet at 0x16ca0 (identified by the same constants: buffer sizes 10000 at +0x178 and 1000 at +0x184, vtable calls +0x24 and +0x2c):
16d28 lea -$100(a6),a0 ; movea.l a3,a1 ; move.b (a1)+,(a0)+ loop strcpy
16d34 ... strlen -> d3, d4
16d44 lea -$ff(a6),a1 dst = buf + 1
16d48 lea -$100(a6),a0 src = buf
16d4c move.l d4,d0 n
16d4e moveq #$20,d1
16d50 cmp.l d1,d0
16d52 bcs.b $16d58 n < 32: inline loop
16d54 _BlockMoveData ($A22E) n >= 32: OS call (overlap-safe)
16d56 bra.b $16d66
16d58 tst.l d0 ; beq
16d5e move.b (a0)+,(a1)+ forward byte copy: buf[1]=buf[0], buf[2]=buf[1]=buf[0], ...
16d60 subq.l #1,d0 ; bne
16d66 move.b d3,-$100(a6) length byte
The same inline pattern occurs about 60 times in the 68k code; this is the only one found whose destination overlaps its source above the source (the other in-place copies shift left or copy between separate buffers).
Before the 68k finding the PowerPC path was checked against Mac OS 9.2.2 and QEMU:
- Mac OS: the Mac OS ROM file from the Mac OS 9.2.2 CD (tbxi parcels, LZSS-decompressed 4 MB image; UNVERIFIED that Mac OS ROM 8.8.1 is identical) has InterfaceLib in ROM with BlockMoveData at ROM 0xffcf49fc (scalar) and, after BlockMove's first call checks Gestalt ppcf for AltiVec, 0xffcf4d60. Both handle overlap: the scalar routine copies backwards when dst > src; the AltiVec routine compares dst - src with the length and takes a backward path, and below 16 bytes moves everything with one lswx/stswx pair (all loads before all stores). C2PStr and P2CStr in the same ROM are correct as well.
- QEMU 11.1.3 target/ppc/mem_helper.c do_lsw/helper_stsw load all registers before any store; the project's opt patches that touch this path (0095 multi-probe, 0090 bc-continue, 0120 fwd-branch) were read and do not change that order. With either ROM path a 13-byte overlapping move cannot produce the observed pattern.
- Inside Macintosh: Memory documents that BlockMove copes with overlapping blocks; the PowerPC code relies on that correctly. The 68k code relies on the compiler's memcpy, which never promised it.
One branch in the 68k CODE 1 is replaced by NOP, so every length goes to _BlockMoveData:
| resource | CODE 1, code offset 0x16d52 (resource data offset 0x16d56) |
| resource fork file offset | 0x1eb7ec (decimal 2013164) |
| bytes | 65 04 (bcs.b $16d58) -> 4E 71 (nop) |
| data fork (PowerPC), Finder info | unchanged |
Disassembly after the patch: cmp.l d1,d0 ; nop ; _BlockMoveData ; bra.b $16d66. d0 still holds the length, a0/a1 source and destination, as the _BlockMoveData branch already expected; _BlockMoveData is already used at this spot for long names and in about 60 other places, so System 7.6.1 has it.
Files (SHA-256):
| file | original | patched |
| data fork | 037e1161e9d96c8eca4c6444a0636598df9c97e73ca11d4f8ebb7d5df4a94353 | same |
| resource fork | ef6ea99590ec32af41cfbcc4ceb92e3c3a47cf526ec6f927e5d350ef66c7ca2c | 5ec1db45fe4575fc5ca50e8d840f659a9b8779f99eadfdc2001619a8e366df7e |
| Finder info | fa0758e42ef87cb984fa7f90837aebddac5f02a0e9a2351db3eed9a4c0a5c271 | same |
The patched copy was made from the user's own copy and is not distributed.
Test: on the 68k machine open the 1.2p copy and connect to parlornet.org port 6503. Without the patch, a host name of 32 or more characters would also avoid the bug.
- Macintosh Repository lists 1.2 and a Reversi_The_Eclipse_101.sit (1.01, older), "68K + PPC (FAT)", no bug notes: https://www.macintoshrepository.org/13481-reversi-the-eclipse-1-2
- No public patch, later version or report of this bug was found (one web search, one page fetch; Usenet and ffothello.org not searched further).
This doc on GitHub
| | These pages cover every ParlorNet server. | Source code | ParlorNet is free software. |