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

supabase / pg_net / 38348109883
94%

Build:
DEFAULT BRANCH: master
Ran 13 Oct 2026 04:50AM UTC
Jobs 1
Files 6
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

13 Oct 2026 04:46AM UTC coverage: 94.04% (-0.8%) from 94.816%
38348109883

push

github

imor
fix: undefined behaviour in worker

The `epfd` and `curl_mhandle` variables were stored in shared memory and if the
background worker process terminated before these were initialized, the cleanup
in `net_on_exit` function ran on stale values from the last exited background
worker which caused undefined behaviour by trying to cleanup that stale value.
It also closed a stale fd which could close an unrelated fd.

The fix is to move the state outside the shared memory. `epfd` is made a static
variable in event.c and `curl_mhandle` a static variable in worker.c. After
these changes, the rest is adjusting the code to make it compile. Other smaller
fixes are related to the initialization and cleanup of `epfd`, `timerfd`,
`curl_mhandle`, and curl library itself. We now make sure we cleanup the
appropriate resources only when they were successfully initialized.

Fixes #276. Note that the old code exhibited undefined behaviour which could
manifest as a segfault, but that depends on many factors like address layout and
is not guaranteed.

40 of 46 new or added lines in 3 files covered. (86.96%)

568 of 604 relevant lines covered (94.04%)

484.69 hits per line

Uncovered Changes

Lines Coverage ∆ File
6
82.26
-8.65% src/event.c
Jobs
ID Job ID Ran Files Coverage
1 38348109883.1 13 Oct 2026 04:50AM UTC 6
94.04
GitHub Action Run
Source Files on build 38348109883
  • Tree
  • List 6
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #38348109883
  • f44e3c5d on github
  • Prev Build on master (#37842893467)
  • Next Build on master (#38350296192)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc