You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What. `with migrate` refuses any function that calls `setjmp` or `longjmp`:
```
migrate: untranslatable function 'zipAlreadyThere': setjmp/longjmp ('setjmp') is not supported at zip.c:472:9
migrate: untranslatable function 'set_alloc': setjmp/longjmp ('longjmp') is not supported at skipset.h:174:9
```
The refusal is loud and correct today. This issue is the work to support it.
Where it bites. zlib 1.3.2 `contrib/minizip/zip.c`: `zipAlreadyThere` sets a landing pad (`setjmp(zip->set.env)`) and `skipset.h`'s `set_alloc` `longjmp`s to it when `realloc` fails. There is no compile switch. So the zlib corpus stages minizip's reader, repair and ioapi, and the writer waits (`build/zlib.w`, `zlib_minizip_files`). libpng and libjpeg report every error this way, so it gates those migrations too.
What it needs.
codegen: a call to `setjmp` must carry LLVM's `returns_twice` attribute, or the optimizer miscompiles the second return at -O1;
`setjmp` / `longjmp` in `std.libc` (Windows spells it `_setjmp` with a frame argument);
a rule for what may sit between the two: a `longjmp` skips With drops, so the frames it crosses must hold no owned values (migrated `unsafe fn` bodies of raw pointers and PODs qualify; safe With code does not).
Codegen/ABI: alone in its batch, with `:move-audit` and `:drop-audit`.
Done when. `zip.c` and `skipset.h` join `zlib_minizip_files()`, `std.zip` gains its writer, and a round trip (write, read back, compare) runs in the zlib corpus lanes.
Activity
zlib corpus gains minizip's reader; six defects it exposed (a `?` com…
ehartford commentedon Oct 25, 2026
Triage 2026-10-25,
with v0.15.3.0(main a261b65): reproduced: still refused, loudly.post-release: a migrator feature (returns_twice calls, per-target jmp_buf), multi-PR.