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 authentification level.

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

Submitted by:  Patrick van Beem <pvbeem>
Submitted on:  Mon 25 Jun 2012 06:09:55 AM UTC  
 
Category: NonePriority: 5 - Normal
Status: DonePrivacy: Public
Assigned to: Aleksey Demakov <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)
{
jit_free(block->succs);
block->succs = 0;
jit_free(block->preds);
block->preds = 0;
jit_free(block->insns);
block->insns = 0;

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

to:

:
:
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>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 30 Oct 2012 09:19:32 AM UTCavdStatusNone=>Done
      Assigned toNone=>avd

    Back to the top


    Powered by Savane 3.1-cleanup