I am updating packages to use the default arch in GitHub CI. One package started to fail with a very strange error in MacOS:
[1841] signal (10.1): Bus error: 10
in expression starting at /Users/runner/work/CoordGridTransforms.jl/CoordGridTransforms.jl/test/conversions.jl:1
macro expansion at /Users/runner/.julia/packages/SIMD/UiGbs/src/LLVM_intrinsics.jl:486 [inlined]
load at /Users/runner/.julia/packages/SIMD/UiGbs/src/LLVM_intrinsics.jl:477 [inlined]
vload at /Users/runner/.julia/packages/SIMD/UiGbs/src/arrayops.jl:51 [inlined]
vload at /Users/runner/.julia/packages/SIMD/UiGbs/src/arrayops.jl:50 [inlined]
vload at /Users/runner/.julia/packages/SIMD/UiGbs/src/arrayops.jl:50 [inlined]
vload at /Users/runner/.julia/packages/SIMD/UiGbs/src/arrayops.jl:50 [inlined]
macro expansion at /Users/runner/.julia/packages/TiffImages/VlJh4/src/ifds.jl:528 [inlined]
deplane_simd! at /Users/runner/.julia/packages/TiffImages/VlJh4/src/ifds.jl:478
deplane! at /Users/runner/.julia/packages/TiffImages/VlJh4/src/ifds.jl:465
reverse_prediction! at /Users/runner/.julia/packages/TiffImages/VlJh4/src/ifds.jl:438
go at /Users/runner/.julia/packages/TiffImages/VlJh4/src/ifds.jl:306
#2 at /Users/runner/.julia/packages/TiffImages/VlJh4/src/ifds.jl:310
unknown function (ip: 0x12a4d0067)
_jl_invoke at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-P2C257CXGN.0/build/default-honeycrisp-P2C257CXGN-0/julialang/julia-release-1-dot-10/src/gf.c:0 [inlined]
ijl_apply_generic at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-P2C257CXGN.0/build/default-honeycrisp-P2C257CXGN-0/julialang/julia-release-1-dot-10/src/gf.c:3079
jl_apply at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-P2C257CXGN.0/build/default-honeycrisp-P2C257CXGN-0/julialang/julia-release-1-dot-10/src/./julia.h:1982 [inlined]
start_task at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-P2C257CXGN.0/build/default-honeycrisp-P2C257CXGN-0/julialang/julia-release-1-dot-10/src/task.c:1253
Allocations: 46723184 (Pool: 46702475; Big: 20709); GC: 80
That seems serious and unrelated to our package code.
This looks like an aligned SIMD load used on an un-aligned memory address. The probable cause is either that some abstraction in SIMD.jl incorrectly emits an aligned load, or that TiffImages.jl manually asks for an aligned load where inappropriate.
Which version of TiffImages is that?
TiffImages.jl v0.11.9
Hm my AI agent disagrees with me and claims it's an OOB error in TiffImages.jl. I'll dig into it
Which version of Julia?
LTS and latest stable
Okay I didn't manage to reproduce it. However, I think my agent is right it's probably not an unaligned store since the offending line doesn't specify alignment and SIMD is correctly conservative. Here is what my agent thinks:
• TiffImages.deplane_simd! can read past the end of the input buffer in its SIMD loop.
The issue is in the generated load sequence in /Users/b507595/.julia/dev/TiffImages/src/ifds.jl:478. For channel x, it emits
vload(Vec{count * max(1, x), T}, ptrA + (index + num_pixels * x - 1) * sizeof(T))
so the later channels use wider and wider loads. However, the loop bound only left a tail of one count block:
iterations = fld(num_pixels, count) - 1
for index in 1:count:iterations*count
That is not enough slack for the widest load, which needs (N - 1) * count elements available from the final plane. As a result, the
last SIMD iteration can over-read beyond the end of arr, and on macOS this can surface as a Bus error in SIMD.jl’s load/vload path.
This is especially relevant because reverse_prediction! calls deplane!(buffer, vw, Val(sizeof(T))) for predictor 3, so N is commonly 4
or 8 for floating-point TIFF data.
Proposed fix: stop the SIMD loop early enough to reserve (N - 1) * count source elements for the widest generated load, and handle the
remainder in the scalar tail.
However, neither of us were able to trigger a bus error
The package that showed the error in CI is CoordGridTransforms.jl
It might be using a specific function from TiffImages.jl that has the issue
More specifically it is using TiffImages.jl indirectly via GeoTIFF.jl
Last updated: Apr 21 2026 at 06:18 UTC