Skip to content

Commit eea3435

Browse files
committed
YJIT: fix leak, remove unused field on block_t
This field was never used and is now covered by jit_mov_gc_ptr.
1 parent 783968a commit eea3435

File tree

4 files changed

+0
-6
lines changed

4 files changed

+0
-6
lines changed

ujit_codegen.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1416,8 +1416,6 @@ gen_oswb_iseq(jitstate_t* jit, ctx_t* ctx, struct rb_call_data * cd, const rb_ca
14161416
return UJIT_CANT_COMPILE;
14171417
}
14181418

1419-
rb_gc_register_mark_object((VALUE)iseq); // FIXME: intentional LEAK!
1420-
14211419
// Create a size-exit to fall back to the interpreter
14221420
uint8_t* side_exit = ujit_side_exit(jit, ctx);
14231421

ujit_core.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ add_block_version(blockid_t blockid, block_t* block)
201201
{
202202
// By writing the new block to the iseq, the iseq now
203203
// contains new references to Ruby objects. Run write barriers.
204-
RB_OBJ_WRITTEN(iseq, Qundef, block->dependencies.iseq);
205204
RB_OBJ_WRITTEN(iseq, Qundef, block->dependencies.cc);
206205
RB_OBJ_WRITTEN(iseq, Qundef, block->dependencies.cme);
207206

ujit_core.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ typedef struct ujit_block_version
128128
struct {
129129
VALUE cc;
130130
VALUE cme;
131-
VALUE iseq;
132131
} dependencies;
133132

134133
// Index one past the last instruction in the iseq

ujit_iface.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,6 @@ rb_ujit_iseq_mark(const struct rb_iseq_constant_body *body)
689689
rb_gc_mark_movable((VALUE)block->blockid.iseq);
690690
rb_gc_mark_movable(block->dependencies.cc);
691691
rb_gc_mark_movable(block->dependencies.cme);
692-
rb_gc_mark_movable(block->dependencies.iseq);
693692

694693
// Walk over references to objects in generated code.
695694
uint32_t *offset_element;
@@ -718,7 +717,6 @@ rb_ujit_iseq_update_references(const struct rb_iseq_constant_body *body)
718717

719718
block->dependencies.cc = rb_gc_location(block->dependencies.cc);
720719
block->dependencies.cme = rb_gc_location(block->dependencies.cme);
721-
block->dependencies.iseq = rb_gc_location(block->dependencies.iseq);
722720

723721
// Walk over references to objects in generated code.
724722
uint32_t *offset_element;

0 commit comments

Comments
 (0)