`ReadOnlyMemoryError()` with AllocCheck's `@check_allocs`

Wondering if anybody knows why I would get a ReadOnlyMemoryError() below.

using AllocCheck
struct S
    _1::Int64
    _2::Int64
    S() = new(1, 2)
end
@check_allocs f() = S()
f()
ERROR: ReadOnlyMemoryError()
Stacktrace:
 [1] ##f#225
   @ ./REPL[4]:1
 [2] macro expansion
   @ ~/.julia/packages/AllocCheck/hsw9T/src/abi_call.jl:79 [inlined]
 [3] abi_call
   @ ~/.julia/packages/AllocCheck/hsw9T/src/abi_call.jl:5 [inlined]
 [4] (::AllocCheck.CompileResult{true, var"###f#225", Tuple{}, S})()
   @ AllocCheck ~/.julia/packages/AllocCheck/hsw9T/src/compiler.jl:156
 [5] f()
   @ Main ./REPL[4]:142

versioninfo:

Julia Version 1.10.3
Commit 0b4590a5507 (2024-04-30 10:59 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (arm64-apple-darwin22.4.0)
  CPU: 8 × Apple M1
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)
Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 

This works without errors for me on Julia 1.10.3, 1.10.7, and 1.11.1. Maybe hardware/OS specific? I’m on Intel/Linux.

Julia Version 1.10.7
Commit 4976d05258e (2024-11-26 15:57 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 8 × Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, skylake)
Threads: 1 default, 0 interactive, 1 GC (on 8 virtual cores)