Skip to content

v0.6.3 — ARM64 HFA Return checkptr Fix

Latest

Choose a tag to compare

@kolkov kolkov released this 01 Aug 20:07
· 1 commit to main since this release
a97955c

Fixed

  • ARM64: HFA return checkptr crashhandleHFAReturn cast (*[4]float64)(rvalue) was oversized for 2-3 element HFAs (CGSize, CGPoint = 16 bytes, cast = 32 bytes). go test -race crashed with "converted pointer straddles multiple allocations". Fix: per-element writes via unsafe.Add. (#67, reported by @jbunds)
  • ARM64: 9-16B struct return silent corruption(*[2]uint64)(rvalue) wrote 8 full bytes for the hi word when struct was smaller than 16 bytes. Fix: copy with exact remaining size, matching AMD64 pattern. Proactive fix — not catchable by checkptr but could corrupt with packed C structs
  • Added TestHandleHFAReturn_Checkptr and TestHandleHFAReturn_Float32 unit tests

Thanks to @jbunds for reporting the checkptr crash on Apple M1!