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

bdwgc / bdwgc / 45934051674
79%

Build:
DEFAULT BRANCH: master
Ran 27 Nov 2026 03:31AM UTC
Jobs 1
Files 37
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 Nov 2026 03:25AM UTC coverage: 79.393% (+0.06%) from 79.333%
45934051674

push

github

ivmai
Avoid VEH registration changes in stopped-world sections on Windows
(fix of commits e578ea9a3, 4e4545a24)

Issue #924 (bdwgc).

In the `NO_SEH_AVAILABLE` build, `AddVectoredExceptionHandler()` and
`RemoveVectoredExceptionHandler()` were called from
`GC_setup_temporary_fault_handler()` and `GC_reset_fault_handler()` for
every marking iteration.  Those OS calls can acquire process-wide
exception-handler locks, which is unsafe while the GC allocator lock is held
and all client threads are suspended.

Keep GC's handler ahead of client handlers for the entire stopped-world
marking phase instead: register it before suspending threads and remove it
after resuming them.  While the world is stopped,
`GC_setup_temporary_fault_handler()` and `GC_reset_fault_handler()` only
update the owning thread ID, so no registration changes occur and no
suspended thread can hold the OS handler lock.  Incremental marking with the
world running retains the original per-`GC_mark_some()` registration
behavior.

Every direct caller of `GC_mark_some()` now manages the per-GC VEH
registration itself via the new `GC_setup_fault_handler_per_gc()` and
`GC_reset_fault_handler_per_gc()` pair, replacing the old nested
temporary-handler bookkeeping.

* alloc.c (GC_collect_a_little_inner): Do not call `ENTER_GC()` and
`EXIT_GC()` unless `GC_mark_deficit < max_deficit`; change `for()` to
`while()` statement.
* alloc.c (GC_collect_a_little_inner): Call
`GC_setup_fault_handler_per_gc()` and `GC_reset_fault_handler_per_gc()`
around a block containing repeatative `GC_mark_some()` calls.
* finalize.c (GC_complete_ongoing_collection): Likewise.
* alloc.c (GC_stopped_mark): Call `GC_setup_fault_handler_per_gc()` and
`GC_reset_fault_handler_per_gc()` around `STOP_WORLD ... START_WORLD`
block.
* include/private/gc_priv.h (GC_setup_fault_handler_per_gc,
GC_reset_fault_handler_per_gc): Declare as `GC_INNER` function or
define as empty macro.
* os_dep.c [WRAP_MARK_SOME && MSWIN32 && NO_SEH_AVAILABLE]
(... (continued)

16 of 20 new or added lines in 1 file covered. (80.0%)

20 existing lines in 6 files now uncovered.

7189 of 9055 relevant lines covered (79.39%)

9424254.02 hits per line

Uncovered Changes

Lines Coverage ∆ File
4
86.59
-0.45% alloc.c

Coverage Regressions

Lines Coverage ∆ File
5
70.32
-0.44% finalize.c
5
83.0
-1.98% mallocx.c
4
91.74
-0.62% allchblk.c
4
86.59
-0.45% alloc.c
1
84.9
0.88% mark.c
1
76.83
-0.15% misc.c
Jobs
ID Job ID Ran Files Coverage
1 45934051674.1 27 Nov 2026 03:31AM UTC 37
79.39
GitHub Action Run
Source Files on build 45934051674
  • Tree
  • List 37
  • Changed 9
  • Source Changed 4
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #45934051674
  • 4caa187c on github
  • Prev Build on master (#45478715820)
  • Next Build on master (#46627560088)
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