Skip to content

ci: add macOS build and test job (#407)#409

Merged
thegushi merged 14 commits into
trusteddomainproject:developfrom
thegushi:fix/fetch-fo-missing-declaration
Jun 6, 2026
Merged

ci: add macOS build and test job (#407)#409
thegushi merged 14 commits into
trusteddomainproject:developfrom
thegushi:fix/fetch-fo-missing-declaration

Conversation

@thegushi

@thegushi thegushi commented Jun 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a build-test-macos job to CI running on macos-latest
  • Builds libmilter from the sendmail 8.18.2 source tarball (no Homebrew formula exists)
  • Builds miltertest with -std=gnu11 to avoid a conflict with mfapi.h's typedef int bool in C23
  • All 10 unit tests pass locally on Apple Clang 21 / macOS 15

This catches Clang-strict build failures like the missing opendmarc_policy_fetch_fo() declaration fixed in #408 / issue #407, which went undetected on the Linux/GCC job.

Test plan

thegushi added 14 commits June 5, 2026 23:18
…project#407)

The function was implemented and documented but never declared in the
public header, causing a build failure on Clang 15+ where implicit
function declarations are an error rather than a warning.
Catches Clang-strict build failures (like the missing opendmarc_policy_fetch_fo
declaration in issue trusteddomainproject#407) that go undetected on the Linux/GCC job.
libmilter is not a standalone Homebrew formula; it comes from sendmail.
Neither libmilter nor sendmail exist as Homebrew formulae; build from
the sendmail source tarball instead.
libmilter.a builds in the current directory, not obj.*/; only mfapi.h
and mfdef.h need to be installed, not the internal sendmail.h.
mfapi.h typedef's bool which conflicts with C23 where bool is a keyword.
Same mfapi.h bool conflict as miltertest; gcc defaults to gnu23 on this runner.
@thegushi thegushi merged commit c669a0a into trusteddomainproject:develop Jun 6, 2026
2 checks passed
thegushi added a commit to thegushi/OpenDMARC that referenced this pull request Jun 6, 2026
…macOS

mlfi_eom() had two large stack allocations that caused a SIGBUS (stack
overflow) crash on macOS ARM64, where threads default to a 512KB stack:

  - unsigned char header[MAXHEADER+1]: grew from 1KB to 4KB when MAXHEADER
    was bumped from 1024 to 4096 in a prior commit
  - struct authres ar: approximately 273KB (MAXARESULTS=32 results, each
    with result_property[16][257] and result_value[16][257])

Both are now allocated on the heap via malloc() and freed at the existing
"done:" cleanup label.  The goto-done cleanup pattern already present for
header is extended to cover ar; all ar.field accesses are updated to ar->field.

Fixes filter test failures reported on macOS ARM64 (issue trusteddomainproject#409).
thegushi added a commit that referenced this pull request Jun 6, 2026
…macOS (#410)

mlfi_eom() had two large stack allocations that caused a SIGBUS (stack
overflow) crash on macOS ARM64, where threads default to a 512KB stack:

  - unsigned char header[MAXHEADER+1]: grew from 1KB to 4KB when MAXHEADER
    was bumped from 1024 to 4096 in a prior commit
  - struct authres ar: approximately 273KB (MAXARESULTS=32 results, each
    with result_property[16][257] and result_value[16][257])

Both are now allocated on the heap via malloc() and freed at the existing
"done:" cleanup label.  The goto-done cleanup pattern already present for
header is extended to cover ar; all ar.field accesses are updated to ar->field.

Fixes filter test failures reported on macOS ARM64 (issue #409).
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.

1 participant