Skip to content

Claude/upgrade ape c library mm z gd - #604

Merged
staalmannen merged 3 commits into
mainfrom
claude/upgrade-ape-c-library-mmZGd
Oct 7, 2026
Merged

staalmannen merged 3 commits into
mainfrom
claude/upgrade-ape-c-library-mmZGd

Conversation

@staalmannen

Copy link
Copy Markdown
Owner

No description provided.

claude added 3 commits October 7, 2026 12:42
… identical

Re-run under cmd/tclsh/tcltest, which `mk install' now builds:

  baseline:  Total 68118  Passed 62138  Skipped 5916  Failed 64
  with -J:   Total 68118  Passed 62156  Skipped 5916  Failed 46

Total and Skipped identical to the digit, so nothing became
unrunnable and no file aborted -- Passed +18 and Failed -18 is one
statement about the same 68118 executions. socket_inet.test has left
the failing-file list, and sockets are half the measured blast radius
(sockaddr_in 24 -> 16). The refutation condition written before the
switch -- a NEW socket failure -- did not fire.

The pthread half is NOT measured: 197 thread and 12 testmutex are
skipped, so pthread_mutex_t 56 -> 40 was barely exercised. Recorded
rather than glossed.

Still to check per name: the totals cannot tell 18 fixed from 20
fixed and 2 broken, and socket_inet-5.1/5.3 were recorded as tests
that should fail -- if they are among the eighteen that is the
leftover-listener false pass, not a fix.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGAwvvTwDg2yknFkmZ3qzs
… on the VM

cfront rebuilt with the old layout rule faults again at pc=0x280db8,
the same address to the digit, with cfront 1265 bytes -- byte for
byte the pre-J run. The sualign fix is in both builds, since that
line was never gated on conformalign, so it is excluded and -J is
the vehicle with nothing left over.

The pair also hands over a finding: table.c carries seven
`if ((long long)...string < 0x200000)' guards, this fork papering
over a garbage const char * rather than diagnosing it. They catch
only the case where the misread bytes are a small number, and the
one that crashed held 0x6f69736963657270 -- the text `precisio' --
far above the threshold. They never worked.

Verdict on cfront recorded: the stated reason for keeping it has
expired, because the host reproduces the remaining diagnostics
character for character, so what is left is upstream's 64-bit
unfitness rather than a kencc or libap bug. Keep the directory and
stop spending rounds on it: the -9/-J pair is the only end-to-end
regression instrument for the layout rule, cfrontsz-probe reads
cfront's generated C as its size oracle, and the EDG path would want
the same driver and headers. c++lib stays commented out.

dupbuf-test on the VM: _dupmark = 1, all seven sections PASS, 0
failures. 4b takes F_DUPFD >= 25 where it used to refuse, and 5
reads the dup without EBADF. The errno 3 there is EWOULDBLOCK from
the test's own non-blocking reads, which is the recorded copy-process
limit rather than a defect; section 6 reads all eight bytes from the
original.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGAwvvTwDg2yknFkmZ3qzs
table.c papered over a garbage `const char *' in seven places with
`if ((long long)...string < 0x200000) continue;'. They never worked:
they catch only the case where the misread eight bytes happen to be
a small number, and the pointer that actually crashed held
0x6f69736963657270 -- the text `precisio' -- far above the
threshold. With -J restoring `name' to 144 the misread is gone and
the guards are dead weight that would mask a recurrence.

Five were a standalone goto nxt/continue; look__6ktable's was half
of an &&; insert__6ktable's was a two-line ||.

gcc compiles the file before and after, which is a syntax check and
not a control, since both sides pass. The VM is what confirms it:
`mk install' in cmd/c++lib should print exactly what it prints now,
cfront 5747 with the four iostream.h redeclarations and `two
definitions of norm()'. Anything else means a guard was
load-bearing, which is a finding rather than a regression.

Also recorded: the -J rebuild was run a second time and reproduced
cfront 5747 and the same diagnostics, so neither side of the
-9/-J pair was a one-off.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGAwvvTwDg2yknFkmZ3qzs
@staalmannen
staalmannen merged commit d505920 into main Oct 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants