Skip to content

[Do not merge] wbcheck: Experimental pluggable GC to detect missing write barriers #13557

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 70 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
840bf02
Initial work towards nogc
jhawthorn Jun 3, 2025
1cca3ab
Vibes
jhawthorn Jun 3, 2025
b5001d7
Should this be in gitignore?
jhawthorn Jun 3, 2025
dd695c3
Slightly more working
jhawthorn Jun 3, 2025
0343b04
More hacks
jhawthorn Jun 3, 2025
ccfa154
Kind working nogc
jhawthorn Jun 7, 2025
9701cf5
Copy nogc into wbcheck
jhawthorn Jun 7, 2025
937aa5f
work on wbcheck
jhawthorn Jun 7, 2025
b0992f3
work on wbcheck
jhawthorn Jun 7, 2025
0bc4dc5
Check hash table for pointer to heap
jhawthorn Jun 7, 2025
05305a7
Do finalizer stuff
jhawthorn Jun 7, 2025
c298712
Actually run finalizers
jhawthorn Jun 7, 2025
ba3066b
Collect references on last_object
jhawthorn Jun 7, 2025
99027da
Add write barrier tracking
jhawthorn Jun 7, 2025
7933c80
Cleanup debugging
jhawthorn Jun 7, 2025
8f5f18b
Add locking
jhawthorn Jun 7, 2025
77baf86
Implement each_object
jhawthorn Jun 7, 2025
a8be4fd
Also take a barrier
jhawthorn Jun 7, 2025
a4f3dd5
Working towards verification
jhawthorn Jun 7, 2025
dae690a
Debug via ENV
jhawthorn Jun 7, 2025
85fe0ed
Validation of write barriers
jhawthorn Jun 7, 2025
1a99192
Improve debug printing
jhawthorn Jun 8, 2025
720dd32
Keep track of total errors
jhawthorn Jun 8, 2025
8a76dd6
Rename to wbcheck_object_list_t
jhawthorn Jun 8, 2025
2320379
Ensure write barrier is used in require_libraries
jhawthorn Jun 8, 2025
40fd3c7
Fix a couple false positives
jhawthorn Jun 8, 2025
f2bd974
Add write barriers on Hash#rehash
jhawthorn Jun 8, 2025
146d8bd
Add an assert
jhawthorn Jun 8, 2025
07b5246
Extract error reporting to own function
jhawthorn Jun 8, 2025
5923dfd
Remove nogc
jhawthorn Jun 8, 2025
e855866
Skip special constants
jhawthorn Jun 8, 2025
d50a545
Fix whitespace
jhawthorn Jun 8, 2025
b1b906b
Check for special const outside lock
jhawthorn Jun 9, 2025
245b38d
Fix missing write barriers in compile.c
jhawthorn Jun 9, 2025
b542f36
Improvements
jhawthorn Jun 9, 2025
fa8c81b
Attempt fix
jhawthorn Jun 9, 2025
17748c6
Use a lock around mallocs' maybe_gc
jhawthorn Jun 9, 2025
3a1e030
Add WBCHECK_VERIFY_AFTER_WB
jhawthorn Jun 10, 2025
f3decd6
More locking
jhawthorn Jun 10, 2025
3ebae02
WIPWIP
jhawthorn Jun 11, 2025
ce3618e
Store mark and writebarriers separately
jhawthorn Jun 12, 2025
55d97ab
Remove impossible case
jhawthorn Jun 12, 2025
475b5e8
Don't merge
jhawthorn Jun 12, 2025
b6405b7
Add warning
jhawthorn Jun 12, 2025
2bd887e
Revert "WIPWIP"
jhawthorn Jun 12, 2025
ef26b18
Update mark bits as we go in ibf load
jhawthorn Jun 12, 2025
2fd2d36
More work
jhawthorn Jun 12, 2025
ebd9ed0
Always mark ISEQ_ORIGINAL_ISEQ ??
jhawthorn Jun 12, 2025
381cba2
Implement zombies
jhawthorn Jun 14, 2025
2bcd84f
Use RBASIC_SET_CLASS not CLASS_SET_RAW
jhawthorn Jun 14, 2025
10bc2f8
Add an optimization to wbcheck_compare_references
jhawthorn Jun 14, 2025
66723db
Hook in to mark instead of calling reachable_objects_from
jhawthorn Jun 14, 2025
8f8c3a6
Add missing writebarrier to rb_func_proc_dup
jhawthorn Jun 15, 2025
74238aa
Use size hint for wbcheck references
jhawthorn Jun 15, 2025
b8b5d26
Use a state machine to avoid reverification
jhawthorn Jun 15, 2025
1a9ddad
Prefer using state
jhawthorn Jun 15, 2025
81d33dc
Use macro
jhawthorn Jun 16, 2025
df8cfc7
Use combined sizes as capacity hint
jhawthorn Jun 16, 2025
18211c7
Use RB_GC_VM_LOCK macro
jhawthorn Jun 18, 2025
70a8afb
Use macro in wbcheck.c
jhawthorn Jun 18, 2025
c9f14a4
Use write barrier version for rb_proc_call_kw
jhawthorn Jun 18, 2025
cd544cd
Simulated GC count
jhawthorn Jun 19, 2025
14cf4e0
Copy initializers and wb_protected as part of rb_gc_impl_copy_attributes
jhawthorn Jun 19, 2025
04ff6fa
Hack: xmalloc/xfree every time we insert in st_update
jhawthorn Jun 19, 2025
d0c18bc
Issue writebarrier_remember after set const tbl
jhawthorn Jun 26, 2025
ad4ff2a
wbcheck: Use non-barrier vm lock
jhawthorn Jun 27, 2025
b2d3335
ZJIT HAX
jhawthorn Jul 17, 2025
6999d28
ZJIT: writebarrier_remember post extend gc_offsets
jhawthorn Jul 17, 2025
c7bf294
ZJIT: Support invalidating method redefinition
st0012 Jul 11, 2025
24ec122
More precise writebarriers in ZJIT
jhawthorn Jul 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Copy nogc into wbcheck
  • Loading branch information
jhawthorn committed Jul 17, 2025
commit 9701cf5ac2b176afd69a17ff77ceba8c75de9af4
3 changes: 3 additions & 0 deletions gc/wbcheck/extconf.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
require_relative '../extconf_base'

create_gc_makefile("wbcheck")
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy