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 =