patchDotGNU Portable.NET - Patches: patch #7806, Fixed a memory leak in the...


You are not allowed to post comments on this tracker with your current authentication level.

patch #7806: Fixed a memory leak in the libjitjit block administration

Submitter:  Patrick van Beem <pvbeem>
Submitted:  Mon 25 Jun 2012 06:09:55 AM UTC
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  avd Open/Closed:  Open

Mon 25 Jun 2012 06:18:21 AM UTC, comment #1: 

It's in file \jit\jit-block.c

Patrick van Beem <pvbeem>
Mon 25 Jun 2012 06:09:55 AM UTC, original submission:  

There was a memory leak in the libjit block administration for functions. The deleted block chain was not buildup correctly. Therefore, blocks deleted during optimization were never freed.

Changed this:

/* Block may not be deleted right when it was found useless from
   the control flow perspective as it might be referenced from
   elsewhere, for instance, from some jit_value_t */
static void
delete_block(jit_block_t block)
block->succs = 0;
block->preds = 0;
block->insns = 0;

block->next = block->func->builder->deleted_blocks;
block->func->builder->deleted_blocks = block->next;


block->insns = 0;

jit_block_t oldhead = block->func->builder->deleted_blocks;
block->func->builder->deleted_blocks = block;
block->next = oldhead;
block->prev = NULL;
if (oldhead)
oldhead->prev = block;

Patrick van Beem <pvbeem>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by avd (Updated the item)
  • -email is unavailable- added by pvbeem (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.


    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-10-30 avd StatusNone Done
        Assigned toNone avd

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code