Skip to content

Fix AllocationAge overflow issue#23997

Open
LinHu2016 wants to merge 3 commits into
eclipse-openj9:masterfrom
LinHu2016:allocationAgeUpdate
Open

Fix AllocationAge overflow issue#23997
LinHu2016 wants to merge 3 commits into
eclipse-openj9:masterfrom
LinHu2016:allocationAgeUpdate

Conversation

@LinHu2016

@LinHu2016 LinHu2016 commented May 27, 2026

Copy link
Copy Markdown
Contributor

During setAllocationAgeForMergedRegion(), newAllocationAge is calculated
from getAllocationAgeSizeProduct()/sedBytes(region->getSize() -
region->getMemoryPool()->getFreeMemoryAndDarkMatterBytes()).
Dark matter overestimation causes usedBytes to be underestimated.
This leads to AllocationAge > tarokMaximumAgeInBytes, causing overflow.
The overflow results in inaccurate projections and potential Boundaries
Overflow.

  • Introduces _usedAllocationBytes field to track actual copied bytes.
  • Updates setAllocationAgeSizeProduct() to accept usedAllocationBytes
    parameter.
  • Uses getUsedAllocationBytes() instead of derived calculations.

Signed-off-by: lhu linhu@ca.ibm.com

@LinHu2016 LinHu2016 force-pushed the allocationAgeUpdate branch from 3da0645 to c16bf74 Compare May 28, 2026 00:11
@LinHu2016

Copy link
Copy Markdown
Contributor Author

@amicic @dmitripivkine please review the changes, Thanks

@LinHu2016 LinHu2016 force-pushed the allocationAgeUpdate branch 5 times, most recently from 0756fd9 to 375f008 Compare June 22, 2026 13:05
@LinHu2016 LinHu2016 force-pushed the allocationAgeUpdate branch 2 times, most recently from 821d23e to 8e7dd08 Compare June 23, 2026 16:57
During setAllocationAgeForMergedRegion(), newAllocationAge is calculated
from getAllocationAgeSizeProduct()/sedBytes(region->getSize() -
region->getMemoryPool()->getFreeMemoryAndDarkMatterBytes()).
Dark matter overestimation causes usedBytes to be underestimated.
This leads to AllocationAge > tarokMaximumAgeInBytes, causing overflow.
The overflow results in inaccurate projections and potential Boundaries
Overflow.

 - Introduces _usedAllocationBytes field to track actual copied bytes.
 - Updates setAllocationAgeSizeProduct() to accept usedAllocationBytes
parameter.
 - Uses getUsedAllocationBytes() instead of derived calculations.

Signed-off-by: lhu <linhu@ca.ibm.com>
Signed-off-by: lhu <linhu@ca.ibm.com>
@LinHu2016 LinHu2016 force-pushed the allocationAgeUpdate branch from 8e7dd08 to 7c65f0d Compare June 25, 2026 13:09
Signed-off-by: lhu <linhu@ca.ibm.com>
@LinHu2016 LinHu2016 force-pushed the allocationAgeUpdate branch from 7c65f0d to 5c4f201 Compare June 25, 2026 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant