RVM

Possible fix for FreeListPageResource.releasePages()

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.9.2, 2.9.3
  • Fix Version/s: 3.0.1
  • Component/s: MMTk
  • Labels:
    None
  • Patch Submitted:
    Yes
  • Number of attachments :
    1

Description

When adding a RawPageSpace and doing many acquire() and release() calls, I sometimes get a crash because the following line in FreeListPageResource.freeContiguousChunk() fails, i.e., returns -1:

int tmp = freeList.alloc(Space.PAGES_IN_CHUNK, chunkStart); // then alloc the entire chunk

Many Log.write()s later I think there may be a corner case in FreeListPageResource.releasePages() that needs slightly different handling. The attached patch eliminates the errors I was getting, but could an MMTk expert please check the change and verify that it's correct since I don't fully understand the code?

thanks,
Mike

Activity

Hide
Steve Blackburn added a comment -

Fixed in RVM-14985.

Apologies for not looking at this earlier. Work on RVM-648 took me to the same bug :-/ I ended up refactoring and improving the code to make it a bit clearer.

Show
Steve Blackburn added a comment - Fixed in RVM-14985. Apologies for not looking at this earlier. Work on RVM-648 took me to the same bug :-/ I ended up refactoring and improving the code to make it a bit clearer.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: