Skip to content

Validate the next hosted fork changes - #18

Draft
yohimik wants to merge 18 commits into
release/netfrom
codex/net-next-integration
Draft

Validate the next hosted fork changes#18
yohimik wants to merge 18 commits into
release/netfrom
codex/net-next-integration

Conversation

@yohimik

@yohimik yohimik commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Integration validation for the next hosted fork candidate. Includes the cookiejar loader merge and Nix checkout fix, process fd remapping and Darwin nil-descriptor correction, tested net listener and Close guards, and the existing owner changes from tinygo-org#5612 and tinygo-org/net#80. The old duplicate fcntl wrapper is removed. The original fcntl regression tests are retained. This is not a published release. WaitDelay, full descriptor lifetime, deadline changes, and the render differences remain open. Run the new compiler and Crier acceptance before selecting a release commit. No upstream PR contains this combined branch.

yohimik and others added 8 commits September 4, 2026 10:14
The submodule commit that lets ListenConfig.Listen and ListenPacket serve
through the package-level functions, so a fork build can listen as well as
dial.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The submodule commit that wakes a blocked Accept or Recv when its socket
is closed, so a server built by the fork can stop.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
yohimik and others added 8 commits September 5, 2026 06:38
Signed-off-by: Evan Wies <evan@neomantra.net>
Route the remaining variadic imports (open, openat, fcntl) through
fixed-signature C wrappers the way ioctl already is: the syscall engine
calls imported addresses through fixed-signature function pointers, and
a variadic callee reads its variadic arguments from the stack on
darwin/arm64, so direct calls silently receive garbage arguments (an
x/sys unix.Open created files with mode 0 instead of the requested
mode). Of the symbols darwin's generated syscall wrappers import,
exactly open, openat, fcntl, and ioctl are variadic.

Also accept the one- and two-operand forms of //go:cgo_import_dynamic
like the gc compiler does, ignore the unused library operand, and only
replace loads of uintptr-typed trampoline globals.

Signed-off-by: Evan Wies <evan@neomantra.net>
The standard library's function-based trampoline pattern has the same
variadic problem as the address-global pattern: of the libc functions
darwin's zsyscall wrappers import, open, openat, fcntl, and ioctl are
variadic, but createDarwinFuncPCABI0Call only routed open through a
fixed-signature wrapper. As a result syscall.SetNonblock (fcntl F_SETFL
with the new flags in the variadic slot) observably wrote garbage file
flags on darwin/arm64, and the stdlib ioctl and openat paths were
equally unsound.

Use the shared darwinVariadicImports table for this path too, replacing
the open-only special case.

Signed-off-by: Evan Wies <evan@neomantra.net>
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

Size difference with the dev branch:

Binary size difference
 flash                          ram
 before   after   diff          before   after   diff
  19684   19684      0   0.00%    7052    7052      0   0.00% tinygo build -size short -o ./build/test.hex -target=feather-rp2040 ./examples/adafruit4650
  63228   63228      0   0.00%    6788    6788      0   0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/adt7410/main.go
  10024   10024      0   0.00%    5348    5348      0   0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/adxl345/main.go
  14628   14628      0   0.00%    7396    7396      0   0.00% tinygo build -size short -o ./build/test.hex -target=pybadge ./examples/amg88xx
  10184   10184      0   0.00%    5348    5348      0   0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/apa102/main.go
  12592   12592      0   0.00%    7172    7172      0   0.00% tinygo build -size short -o ./build/test.hex -target=nano-33-ble ./examples/apds9960/proximity/main.go
  11136   11136      0   0.00%    5360    5360      0   0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/apa102/itsybitsy-m0/main.go
   7588    7588      0   0.00%    2312    2312      0   0.00% tinygo build -size short -o ./build/test.hex -target=microbit ./examples/at24cx/main.go
   9272    9272      0   0.00%    5340    5340      0   0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/bh1750/main.go
   8660    8660      0   0.00%    5340    5340      0   0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/blinkm/main.go
  71408   71408      0   0.00%    3656    3656      0   0.00% tinygo build -size short -o ./build/test.hex -target=pinetime     ./examples/bma42x/main.go
  67120   67120      0   0.00%    6804    6804      0   0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/bmi160/main.go
  28952   28952      0   0.00%    5380    5380      0   0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/bmp180/main.go
  65720   65720      0   0.00%    6828    6828      0   0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/bmp280/main.go
  13080   13080      0   0.00%    5412    5412      0   0.00% tinygo build -size short -o ./build/test.hex -target=trinket-m0 ./examples/bmp388/main.go
  24024   24024      0   0.00%    6220    6220      0   0.00% tinygo build -size short -o ./build/test.hex -target=metro-rp2350 ./examples/bno08x/i2c/main.go
   8008    8008      0   0.00%    3344    3344      0   0.00% tinygo build -size short -o ./build/test.hex -target=bluepill ./examples/ds1307/sram/main.go
  22116   22116      0   0.00%    3548    3548      0   0.00% tinygo build -size short -o ./build/test.hex -target=bluepill ./examples/ds1307/time/main.go
  30556   30556      0   0.00%    5576    5576      0   0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/ds3231/alarms/main.go
  44492   44492      0   0.00%    5576    5576      0   0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/ds3231/basic/main.go
   4592    4592      0   0.00%    2272    2272      0   0.00% tinygo build -size short -o ./build/test.hex -target=microbit ./examples/easystepper/main.go
  71884   71884      0   0.00%    7588    7588      0   0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/flash/console/spi
  67996   67996      0   0.00%    9628    9628      0   0.00% tinygo build -size short -o ./build/test.hex -target=pyportal ./examples/flash/console/qspi
   7128    7128      0   0.00%    2276    2276      0   0.00% tinygo build -size short -o ./build/test.hex -target=microbit ./examples/gc9a01/main.go
 694072  694072      0   0.00%  131564  131564      0   0.00%

Open /dev/null in the child before closing a nil or unnamed descriptor. Save remap sources before these actions. This avoids a parent descriptor check and its race with concurrent open.

Use descriptor reads and exec redirection in remap tests. Check nil slots and temporary descriptors. The tests pass with ordinary Go on Darwin and Linux. Both TinyGo os suites pass with released compiler source overlays. Darwin also needs the addopen symbol from PR tinygo-org#5636.
@yohimik

yohimik commented Sep 5, 2026

Copy link
Copy Markdown
Owner Author

Candidate 6cb46ec passed macOS and Windows checks but failed both Linux lint steps because the Darwin spawn unsafe import had no go:linkname comment. Dependent skipped jobs are not passes. Commit e7d34c8 adds only that comment. The same fix is in process PR tinygo-org#5634 at b7c3d15. The full configured revive check passes locally. New candidate CI is running at e7d34c8. No new compiler or Crier acceptance result is claimed yet.

@yohimik

yohimik commented Sep 5, 2026

Copy link
Copy Markdown
Owner Author

Candidate e7d34c8 passed all24 current CI checks. The downloaded Darwin and Linux arm64 artifacts match their Actions API hashes. No runtime source overlay was applied. Both pass spawn16/16, signal11/11, cookiejar, os/remapping/fcntl, and real TLS1.3/network probes. Crier7edaff9 E2E passes Linux143/0/0 and Darwin142/0/1. Darwin startup works. The separate Darwin TLS matrix verifies certificate rejection, plaintext refusal, update to a Go1.1.0 target, and offline rollback with restored bytes matching the original. Evidence and limits: https://github.com/yohimik/crier/blob/7c4ea43/docs/operations/tinygo-comparison-2026-09-05.md . No new amd64, pixel, stripped-size, or current Dispat acceptance result is claimed. The Dispat task has the handoff. This is still not a published release.

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