• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

davidbyttow / govips / 22505438302
39%

Build:
DEFAULT BRANCH: master
Ran 27 Feb 2026 10:01PM UTC
Jobs 1
Files 22
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

27 Feb 2026 09:59PM UTC coverage: 71.754% (+0.01%) from 71.743%
22505438302

push

github

web-flow
Add runtime.KeepAlive to prevent GC finalization during CGo calls (#494)

ImageRef methods that pass r.image to CGo functions without
referencing r afterward are vulnerable to a use-after-free: the GC
can finalize the ImageRef (via runtime.SetFinalizer) while the CGo
call is still executing on the underlying C.VipsImage pointer.

This manifests as flaky segfaults, e.g. TestImageRef_FindTrim_White
crashing with "instance of invalid non-instantiatable type" from GLib.

Fix: add defer runtime.KeepAlive(r) to all 33 vulnerable methods,
ensuring the receiver stays alive for the duration of each CGo call.
This is the standard Go idiom (used in os.File, net.Conn, etc.).

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

24 of 33 new or added lines in 1 file covered. (72.73%)

2238 of 3119 relevant lines covered (71.75%)

0.76 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
9
70.39
0.05% vips/image.go
Jobs
ID Job ID Ran Files Coverage
1 22505438302.1 27 Feb 2026 10:01PM UTC 22
71.75
GitHub Action Run
Source Files on build 22505438302
  • Tree
  • List 22
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • f804afe6 on github
  • Prev Build on master (#22504308135)
  • Next Build on master (#22505487199)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc