Repository navigation
add mark curl_easy_setopt variadic; run lib-ajax test on macOS - #15
Merged
Merged
Conversation
funlang
approved these changes
Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
macOS arm64 passes variadic arguments on the stack (Apple's AAPCS64), unlike
the other targets fun runs on. lffi.pas prepared every call with the fixed
ffi_prep_cif, so on Apple Silicon every FFI call into a variadic C function
got garbage in the tail. First victim in the stdlib: lib-ajax
(curl_easy_setopt is variadic) -- HTTP never worked on macOS, every transfer
returned rc=3 (URL_MALFORMAT). Minimal repro (before the fix):
Changes:
variadic: <fixed count>;marked bindings prepare via ffi_prep_cif_var, unmarked bindings take the
exact old path (falling back to the fixed form if the loaded libffi
refuses).
variadic: 2(behaviour-neutral on the SysV family; the difference between working and
not on Darwin arm64).
snapshot byte for byte).
Verified: printf
t=0->t=42 s=abc(unmarked stays t=0); lib-ajax onApple Silicon: file fixture, live HTTP 200, 404, saveas all correct; macOS
suite 81/81; full Linux-aarch64 suite 87/87 (SysV unaffected). The variadic
audit found only lib-proc-lnx's
open-- Linux-only, left unchanged.