Skip to content

Commit

Permalink
Add missing write barrier in IOU_initialize
Browse files Browse the repository at this point in the history
Since it's the initialize method, it's extremely
unlikely that `self` would have reached the old
generation, hence almost impossible to run
into this bug short of using `GC.stress`.

But still, that write barrier is technically
needed.
  • Loading branch information
byroot committed Sep 10, 2024
1 parent b996100 commit e5ea69f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/iou/ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ VALUE IOURing_initialize(VALUE self) {
iour->unsubmitted_sqes = 0;
iour->br_counter = 0;

iour->pending_ops = rb_hash_new();
RB_OBJ_WRITE(self, &iour->pending_ops, rb_hash_new());

unsigned prepared_limit = 1024;
int flags = 0;
Expand Down

0 comments on commit e5ea69f

Please sign in to comment.